Package com.iizix.license
Interface IGenericLicenseSystem
- All Superinterfaces:
- IBasicUserInfoDetailNames
- All Known Subinterfaces:
- IAppBuilderLicenseSystem,- IDesignerLicenseSystem,- IServerLicenseSystem
The generic license system interface.
- Author:
- Christopher Mindus
- Field Summary- Fields inherited from interface com.iizix.user.IBasicUserInfoDetailNames- DETAIL_AdditionalEmail, DETAIL_Address, DETAIL_Address_2, DETAIL_Address_3, DETAIL_City, DETAIL_CompanyDivision, DETAIL_CompanyName, DETAIL_Country, DETAIL_CroppedUploadedProfileImage, DETAIL_DBAdministrationUserName, DETAIL_Descr, DETAIL_DeveloperGroupID, DETAIL_DeveloperID, DETAIL_Email, DETAIL_EmailVerify, DETAIL_FirstName, DETAIL_FixedPassword, DETAIL_FullName, DETAIL_HomeFax, DETAIL_HomeMobile, DETAIL_HomePhone, DETAIL_JobTitle, DETAIL_LargeProfileImage, DETAIL_LastName, DETAIL_LocalizedFirstName, DETAIL_LocalizedFullName, DETAIL_LocalizedLastName, DETAIL_LocalizedMiddleName, DETAIL_LocalizedTitle, DETAIL_MiddleName, DETAIL_Phone, DETAIL_Phone_2, DETAIL_PinCode, DETAIL_RecoveryAnswer, DETAIL_RecoveryQuestion, DETAIL_StateProvince, DETAIL_ThumbnailProfileImage, DETAIL_Title, DETAIL_UploadedProfileImage, DETAIL_UploadedProfileImageCrop, DETAIL_WorkFax, DETAIL_WorkMobile, DETAIL_WorkPhone, DETAIL_ZipCode, detailsSet, profilePictureDetailsList
- Method SummaryModifier and TypeMethodDescription- activate- (GenericCallback<Void, - String> callback) Activates the license.- boolean- addListener- (ILicenseServerListener listener) Adds a dispose listener for license server communication.- void- assignCallback- (ILicenseCallback callback) Assigns the callback for major failures.- void- assignFeedBack- (IUserInterfaceFeedback<ValidateReply> feedback) Assigns the validation feedback (UI).- completeRegistration- (GenericCallback<Void, - String> callback) Completes the registration.- void- dispose()Disposes of the license system.- extendTrial- (GenericCallback<Void, - String> callback) Requests an additional 7 days extension for the trial.Gets the database administrator user name used when creating the license.Gets the DETAIL_* map.Gets the unique installation ID.- default ProfilePictureGets the "uploaded" profile picture.- getProfilePicture- (String type) Gets the profile picture.- getSignature- (Object which) Returns the license system signature.Gets the signed in user.- longGets the trial duration.- longGets the trial extension time in milliseconds.- longGets the trial started time.- long[]In case there is a time period the license is valid, this method returns the beginning (including) and ending time (excluding) in milliseconds since the epoch.- boolean- initialize- (PropFactory serverFactory, Object caller, Object signature, Object which, File dir) Initializes the license system.- booleanReturns the connection state to the license server.- booleanReturns if the installation is in trial mode.- void- performOfflineRegistration- (Map<String, - String> offLineDetails, Object caller) Performs offline registration.- void- preClose()Requests disconnection from the license server, this will end when no more communication tasks in progress, and there are no pending open requests through- preOpen().- void- preOpen()Opens connection to license server in order to be fast in response later on...- boolean- removeListener- (ILicenseServerListener listener) Removes a dispose listener for the client session.- booleanRemoves all the profile pictures.- requestEmailVerification- (String email, GenericCallback<Void, - String> callback) Requests to send an email to verify the email.- resetPassword- (String email, GenericCallback<Void, - String> callback) Resets the password for a user by sending a mail.- void- save()Saves the license file.- boolean- setProfilePicture- (ProfilePicture profilePicture) Sets a profile picture.- boolean- setRecoveryEmail- (String recoveryEmail) Adds, removes or changes the additional email for recovery.- signIn- (String email, String password, String newPassword, BiFunction<SigninResult, - String, - Void> callback) Sign in user.- boolean- signOut()Signs out of the License System.- signUp- (String email, String password, Map<String, - String> details, GenericCallback<Void, - String> callback) Sign up user.- validate()Validates the license.- verifyEmailCode- (String email, String code, GenericCallback<Void, - String> callback) Verifies a code for an email sent to the user.- verifyEmailTaken- (String email, GenericCallback<Void, - String> callback) Verifies if an email is taken for sign in.
- Method Details- initializeboolean initialize- (PropFactory serverFactory, Object caller, Object signature, Object which, File dir) Initializes the license system.- Parameters:
- serverFactory- The server factory.
- caller- The licensed caller instance.
- which- Which signature is specified.
- signature- The signature.
- dir- Directory where to store data.
- Returns:
- true for success, false if the license fails initialization and requires shut-down of the caller.
 
- disposevoid dispose()Disposes of the license system.
- assignCallbackAssigns the callback for major failures.- Parameters:
- callback- The failure callback.
 
- assignFeedBackAssigns the validation feedback (UI).- Parameters:
- feedback- The feedback to a potential UI.
 
- getSignatureReturns the license system signature.- Parameters:
- which- Which signature to return.
- Returns:
- The signature.
 
- saveSaves the license file. If the license system has not been initialized, nothing will happen.- Throws:
- LicenseException- If the file failed to be saved.
 
- completeRegistrationCompletes the registration.- Parameters:
- callback- The callback with the response String parameter: null for OK, otherwise the message string.
- Returns:
- An immediate error message, or null for callback to be invoked later.
- Throws:
- LicenseException- For License System errors.
 
- isConnectedboolean isConnected()Returns the connection state to the license server.- Returns:
- true if connected to the license server, false otherwise.
 
- preOpenvoid preOpen()Opens connection to license server in order to be fast in response later on... Multiple calls to this method can be done, must each call MUST be followed by- preClose(), otherwise the communication link to the license server will remain open.
- preClosevoid preClose()Requests disconnection from the license server, this will end when no more communication tasks in progress, and there are no pending open requests through- preOpen().
- addListenerAdds a dispose listener for license server communication. Calling this method multiple times with the same listener will have no effect (but to return false).- Parameters:
- listener- The listener to add.
- Returns:
- true if the listener was added, false otherwise.
- Throws:
- NullPointerException- If the listener is- null.
 
- removeListenerRemoves a dispose listener for the client session.- Parameters:
- listener- The listener to remove.
- Returns:
- true if listener is successfully removed, false otherwise.
 
- validateValidateReply validate()Validates the license.- Returns:
- The validation result, never null.
 
- getInstallationIDString getInstallationID()Gets the unique installation ID. This installation ID is dependent on the installation location, the hardware it is installed on, etc. Each developer ID is allowed to have up to 10 such installations. There are functions to remove registered installations in the IIZI License App.- Returns:
- An installation ID that is unique for each IIZI installation, even on the same machine.
 
- getDetailsGets the DETAIL_* map.- See the DETAIL_* values in - IBasicUserInfoDetailNames.- Returns:
- A new map, or null if license file is not loaded.
 
- getValidityPeriodlong[] getValidityPeriod()In case there is a time period the license is valid, this method returns the beginning (including) and ending time (excluding) in milliseconds since the epoch.- In case there is no beginning or ending set, the array consists of a - zeroentry. If there is no time period limitation at all, this method returns an array with of size 2 with zero's.- Returns:
- The time limitation as an array, index 0 (zero) is the start of the period (inclusive). If zerothere is no start period specified. The index 1 (one) is the end of the period (exclusive), and set to zero, there is no end period.
 
- isTrialModeboolean isTrialMode()Returns if the installation is in trial mode.- Returns:
- true if in trial mode, false if it has been registered and no longer in trial mode.Note: "Trial Mode" may still remain if this is a paid subscription, even if registered. 
 
- getTrialDurationlong getTrialDuration()Gets the trial duration.- Returns:
- The trial duration in milliseconds, -1L for no trial!
 
- getTrialStartedlong getTrialStarted()Gets the trial started time.- Returns:
- The trial start in milliseconds since the epoch, -1L for no trial!
 
- getTrialExtensionlong getTrialExtension()Gets the trial extension time in milliseconds.- Returns:
- The trial extension time in milliseconds, zero for none.
 
- signInString signIn- (String email, String password, String newPassword, BiFunction<SigninResult, - String, - Void> callback) Sign in user. The details for the user replaces the current settings in the license file if sign in is successful (once the password has been changed if that was required).- Parameters:
- email- The email string (lower case, trimmed).
- password- The password (the password is not sent in the clear, event using TLS).
- newPassword- New password for user once validated, null for no change.
- callback- The callback with the response- SigninResultand a String for error, null String for success.
- Returns:
- null for OK, otherwise an error string.
- Throws:
- NullPointerException- If any of the parameters are null.
 
- resetPasswordString resetPassword- (String email, GenericCallback<Void, - String> callback) throws NullPointerExceptionResets the password for a user by sending a mail.- Parameters:
- email- The email string (lower case, trimmed).
- callback- The callback with the response String parameter: null for OK, otherwise the message string.
- Returns:
- null for OK, otherwise an error string.
- Throws:
- NullPointerException- If any of the parameters are null.
 
- signUpString signUp- (String email, String password, Map<String, - String> details, GenericCallback<Void, throws NullPointerException- String> callback) Sign up user.- Parameters:
- email- The email string (lower case, trimmed).
- password- The password (the password is not sent in the clear, event using TLS).
- details- Details for the user according to standard of- com.iizix.server.db.BasicUserInfo.
- callback- The callback with the response String parameter: null for OK, otherwise the message string.
- Returns:
- null for OK, otherwise an error string.
- Throws:
- NullPointerException- If any of the parameters are null.
 
- performOfflineRegistrationPerforms offline registration.- Parameters:
- offLineDetails- The details for offline registration.
- caller- The caller.
- Throws:
- IllegalArgumentException- If details and caller do not match, or the license system is online.
- SecurityException- If called from wrong party.
 
- activateActivates the license.- Parameters:
- callback- The callback for the activation result. The String in the callback argument is null for success, or an error message.
- Returns:
- null for OK, empty string for no need for activation, otherwise an error string. The callback will be invoked only if the return code is null.
 
- extendTrialRequests an additional 7 days extension for the trial.- Parameters:
- callback- The callback for the activation result. The String in the callback argument is null for success, or an error message.
- Returns:
- null for OK, empty string for no need for trial extension, otherwise an error string. The callback will be invoked only if the return code is null.
 
- getSignedInUserString getSignedInUser()Gets the signed in user.- Returns:
- The user that is signed in, or null if nobody is signed in.
 
- signOutboolean signOut()Signs out of the License System.- Returns:
- true for success, false if no user is logged in.
 
- setRecoveryEmailAdds, removes or changes the additional email for recovery. This routine also handles email verification requirements to the license server.- Parameters:
- recoveryEmail- The new or updated recovery email address, null to remove it.
- Returns:
- true for success, false for no change.
 
- verifyEmailTakenVerifies if an email is taken for sign in.- Parameters:
- email- The email string (lower case, trimmed).
- callback- The callback with the response String parameter: null for OK, otherwise the message string.
- Returns:
- null for OK, otherwise an error string.
- Throws:
- NullPointerException- If any of the parameters are null.
 
- requestEmailVerificationRequests to send an email to verify the email.- Parameters:
- email- The email string (lower case, trimmed).
- callback- The callback with the response String parameter: null for OK, otherwise the message string.
- Returns:
- null for OK, otherwise an error string.
- Throws:
- NullPointerException- If any of the parameters are null.
 
- verifyEmailCodeVerifies a code for an email sent to the user.- Parameters:
- email- The email string (lower case, trimmed).
- code- The code from the email verification mail.
- callback- The callback with the response String parameter: null for OK, otherwise the message string.
- Returns:
- null for OK, otherwise an error string.
- Throws:
- NullPointerException- If any of the parameters are null.
 
- removeProfilePicturesboolean removeProfilePictures()Removes all the profile pictures.- Returns:
- true for changed, false for no change.
 
- getProfilePictureGets the "uploaded" profile picture. It is up to the caller to clean-up potential temporary directory and/or file.- Returns:
- The profile picture instance, or null if none is present.
 
- getProfilePictureGets the profile picture. It is up to the caller to clean-up potential temporary directory and/or file.- Parameters:
- type- The type of image: DETAIL_UploadedProfileImage, DETAIL_LargeProfileImage, DETAIL_ThumbnailProfileImage, or null for the largest available.
- Returns:
- The profile picture instance, or null if none is present.
- Throws:
- IllegalArgumentException- If- typeis not- IBasicUserInfoDetailNames.DETAIL_UploadedProfileImageor- null,- IBasicUserInfoDetailNames.DETAIL_LargeProfileImage; or- IBasicUserInfoDetailNames.DETAIL_ThumbnailProfileImage.
 
- setProfilePictureSets a profile picture.- Parameters:
- profilePicture- The profile picture to set.
- Returns:
- true for changed, false for no change.
 
- getDatabaseAdministratorUserString getDatabaseAdministratorUser()Gets the database administrator user name used when creating the license.- Returns:
- The database administrator user name, or null if none is available.