Package com.iizix.server.agreement
Class AcceptedAgreement
- java.lang.Object
- com.iizix.server.agreement.AcceptedAgreement
 
- public class AcceptedAgreement extends java.lang.ObjectThe 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 Summary- Fields - Modifier and Type - Field - Description - LicenseAgreement- agreementThe agreement accepted.- java.lang.String- languageCodeThe language code.- java.net.InetAddress- remoteAddressThe remote internet address that accepted it, null for none.- AuthenticatedUser- userThe User.
 - Constructor Summary- Constructors - Constructor - Description - AcceptedAgreement(LicenseAgreement agreement, java.lang.String languageCode, AuthenticatedUser user, ClientSessionGyro clientGyro)Constructs a user acceptance of an agreement.
 - Method Summary- All Methods Instance Methods Concrete Methods - Modifier and Type - Method - Description - java.lang.String- getIPAddress()Gets the IP address to use, max 41 characters.- void- setAccepted()Marks the agreement as accepted and saves it in the database.
 
- Field Detail- agreement- public final LicenseAgreement agreement The agreement accepted.
 - languageCode- public final java.lang.String languageCode The language code.
 - user- public final AuthenticatedUser user The User.
 - 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).