public interface IGenericLicenseSystem extends IBasicUserInfoDetailNames
ALL_DETAILS, DETAIL_AdditionalEmail, DETAIL_Address, DETAIL_Address_2, DETAIL_Address_3, DETAIL_City, DETAIL_CompanyName, DETAIL_Country, DETAIL_DBAdministrationUserName, 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_MiddleName, DETAIL_PinCode, DETAIL_StateProvince, DETAIL_ThumbnailProfileImage, DETAIL_Title, DETAIL_UploadedProfileImage, DETAIL_WorkFax, DETAIL_WorkMobile, DETAIL_WorkPhone, DETAIL_ZipCode, detailsSet, PROFILE_PICTURE_DETAILS
Modifier and Type | Method and Description |
---|---|
String |
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).
|
String |
completeRegistration(GenericCallback<Void,String> callback)
Completes the registration.
|
void |
dispose()
Disposes of the license system.
|
String |
extendTrial(GenericCallback<Void,String> callback)
Requests an additional 7 days extension for the trial.
|
String |
getDatabaseAdministratorUser()
Gets the database administrator user name used when creating the license.
|
Map<String,String> |
getDetails()
Gets the DETAIL_* map.
|
String |
getInstallationID()
Gets the unique installation ID.
|
String |
getLoggedInUser()
Gets the logged in user.
|
default ProfilePicture |
getProfilePicture()
Gets the "uploaded" profile picture.
|
ProfilePicture |
getProfilePicture(String type)
Gets the profile picture.
|
Object |
getSignature(Object which)
Returns the license system signature.
|
long |
getTrialDuration()
Gets the trial duration.
|
long |
getTrialExtension()
Gets the trial extension time in milliseconds.
|
long |
getTrialStarted()
Gets the trial started time.
|
long[] |
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.
|
boolean |
initialize(PropFactory serverFactory,
Object caller,
Object signature,
Object which,
File dir)
Initializes the license system.
|
boolean |
isConnected()
Returns the connection state to the license server.
|
boolean |
isTrialMode()
Returns if the installation is in trial mode.
|
String |
login(String email,
String password,
String newPassword,
BiFunction<LoginResult,String,Void> callback)
Login user.
|
boolean |
logout()
Logs out of the License System.
|
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.
|
boolean |
removeProfilePictures()
Removes all the profile pictures.
|
String |
requestEmailVerification(String email,
GenericCallback<Void,String> callback)
Requests to send an email to verify the email.
|
String |
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.
|
String |
signUp(String email,
String password,
Map<String,String> details,
GenericCallback<Void,String> callback)
Sign up user.
|
ValidateReply |
validate()
Validates the license.
|
String |
verifyEmailCode(String email,
String code,
GenericCallback<Void,String> callback)
Verifies a code for an email sent to the user.
|
String |
verifyEmailTaken(String email,
GenericCallback<Void,String> callback)
Verifies if an email is taken for login.
|
isDetailInInternalServerDatabase
boolean initialize(PropFactory serverFactory, Object caller, Object signature, Object which, File dir)
serverFactory
- The server factory.caller
- The licensed caller instance.which
- Which signature is specified.signature
- The signature.dir
- Directory where to store data.void dispose()
void assignCallback(ILicenseCallback callback)
callback
- The failure callback.void assignFeedBack(IUserInterfaceFeedback<ValidateReply> feedback)
feedback
- The feedback to a potential UI.Object getSignature(Object which)
which
- Which signature to return.void save() throws LicenseException
LicenseException
- If the file failed to be saved.String completeRegistration(GenericCallback<Void,String> callback) throws LicenseException
callback
- The callback with the response String parameter: null for OK, otherwise the message string.LicenseException
- For License System errors.boolean isConnected()
void preOpen()
preClose()
, otherwise the communication link to the license server will
remain open.void preClose()
preOpen()
.boolean addListener(ILicenseServerListener listener)
listener
- The listener to add.NullPointerException
- If the listener is null
.boolean removeListener(ILicenseServerListener listener)
listener
- The listener to remove.ValidateReply validate()
String getInstallationID()
Map<String,String> getDetails()
See the DETAIL_* values in IBasicUserInfoDetailNames
.
long[] getValidityPeriod()
In case there is no beginning or ending set, the array consists
of a zero
entry. If there is no time period limitation
at all, this method returns an array with of size 2 with zero's.
zero
there
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.boolean isTrialMode()
Note: "Trial Mode" may still remain if this is a paid subscription, even if registered.
long getTrialDuration()
long getTrialStarted()
long getTrialExtension()
String login(String email, String password, String newPassword, BiFunction<LoginResult,String,Void> callback)
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 LoginResult
and a String for error, null String for success.NullPointerException
- If any of the parameters are null.String resetPassword(String email, GenericCallback<Void,String> callback) throws NullPointerException
email
- The email string (lower case, trimmed).callback
- The callback with the response String parameter: null for OK, otherwise the message string.NullPointerException
- If any of the parameters are null.String signUp(String email, String password, Map<String,String> details, GenericCallback<Void,String> callback) throws NullPointerException
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.NullPointerException
- If any of the parameters are null.void performOfflineRegistration(Map<String,String> offLineDetails, Object caller)
offLineDetails
- The details for offline registration.caller
- The caller.IllegalArgumentException
- If details and caller do not match, or the license system is online.SecurityException
- If called from wrong party.String activate(GenericCallback<Void,String> callback)
callback
- The callback for the activation result.
The String in the callback argument is null for success, or an error message.String extendTrial(GenericCallback<Void,String> callback)
callback
- The callback for the activation result.
The String in the callback argument is null for success, or an error message.String getLoggedInUser()
boolean logout()
boolean setRecoveryEmail(String recoveryEmail)
recoveryEmail
- The new or updated recovery email address,
null to remove it.String verifyEmailTaken(String email, GenericCallback<Void,String> callback)
email
- The email string (lower case, trimmed).callback
- The callback with the response String parameter: null for OK, otherwise the message string.NullPointerException
- If any of the parameters are null.String requestEmailVerification(String email, GenericCallback<Void,String> callback)
email
- The email string (lower case, trimmed).callback
- The callback with the response String parameter: null for OK, otherwise the message string.NullPointerException
- If any of the parameters are null.String verifyEmailCode(String email, String code, GenericCallback<Void,String> callback)
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.NullPointerException
- If any of the parameters are null.boolean removeProfilePictures()
default ProfilePicture getProfilePicture()
ProfilePicture getProfilePicture(String type)
type
- The type of image: DETAIL_UploadedProfileImage,
DETAIL_LargeProfileImage, DETAIL_ThumbnailProfileImage, or null
for the largest available.IllegalArgumentException
- If type
is not
IBasicUserInfoDetailNames.DETAIL_UploadedProfileImage
or null
,
IBasicUserInfoDetailNames.DETAIL_LargeProfileImage
; or
IBasicUserInfoDetailNames.DETAIL_ThumbnailProfileImage
.boolean setProfilePicture(ProfilePicture profilePicture)
profilePicture
- The profile picture to set.String getDatabaseAdministratorUser()
iizi® is a registered trademark of Mindus SARL. © Copyright 2019 Mindus SARL. All rights reserved.