Class AcceptedAgreement

java.lang.Object
com.iizix.server.agreement.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.
Author:
Christopher Mindus
  • Field Details Link icon

    • agreement Link icon

      public final LicenseAgreement agreement
      The agreement accepted.
    • languageCode Link icon

      public final String languageCode
      The language code.
    • user Link icon

      public final AuthenticatedUser user
      The User.
    • remoteAddress Link icon

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

    • AcceptedAgreement Link icon

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

    • getIPAddress Link icon

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

      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).