Class AcceptedAgreement


  • public class AcceptedAgreement
    extends java.lang.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 Detail

      • languageCode

        public final java.lang.String languageCode
        The language code.
      • remoteAddress

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

      • AcceptedAgreement

        public AcceptedAgreement​(LicenseAgreement agreement,
                                 java.lang.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 Detail

      • getIPAddress

        public java.lang.String getIPAddress()
        Gets the IP address to use, max 41 characters.
        Returns:
        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).