Class AcceptedAgreement


public class AcceptedAgreement extends Object
The user acceptance of agreement. This class is used when displaying the agreement to the user and when he/she/it accepts it, it is saved in the database.
Christopher Mindus
  • Field Details

    • agreement

      public final LicenseAgreement agreement
      The agreement accepted.
    • languageCode

      public final String languageCode
      The language code.
    • user

      public final AuthenticatedUser user
      The User.
    • remoteAddress

      public final InetAddress remoteAddress
      The remote internet address that accepted it, null for none.
  • Constructor Details

    • AcceptedAgreement

      public AcceptedAgreement(LicenseAgreement agreement, String languageCode, AuthenticatedUser user, ClientSessionGyro clientGyro)
      Constructs a user acceptance of an agreement.
      agreement - The agreement accepted.
      languageCode - The language code.
      user - The user who accepted the agreement.
      clientGyro - The client session.
  • Method Details

    • getIPAddress

      public String getIPAddress()
      Gets the IP address to use, max 41 characters.
      The IP v4 or v6 address, maximum 41 characters.
    • setAccepted

      public void setAccepted()
      Marks the agreement as accepted and saves it in the database. No exception is thrown, however everything is logged in the server (both the acceptance and exceptions).