Package com.iizix.server.agreement
Class AcceptedAgreement
java.lang.Object
com.iizix.server.agreement.AcceptedAgreement
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 SummaryFieldsModifier and TypeFieldDescription- final LicenseAgreementThe agreement accepted.- final StringThe language code.- final InetAddressThe remote internet address that accepted it, null for none.- final AuthenticatedUserThe User.
- Constructor SummaryConstructorsConstructorDescription- AcceptedAgreement- (LicenseAgreement agreement, String languageCode, AuthenticatedUser user, ClientSessionGyro clientGyro) Constructs a user acceptance of an agreement.
- Method SummaryModifier and TypeMethodDescriptionGets the IP address to use, max 41 characters.- voidMarks the agreement as accepted and saves it in the database.
- Field Details- agreementThe agreement accepted.
- languageCodeThe language code.
- userThe User.
- remoteAddressThe remote internet address that accepted it, null for none.
 
- Constructor Details- AcceptedAgreementpublic 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- getIPAddressGets the IP address to use, max 41 characters.- Returns:
- The IP v4 or v6 address, maximum 41 characters.
 
- setAcceptedpublic 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).