Package de.xima.fc.license
Class LicenseServerUtil
- java.lang.Object
-
- de.xima.fc.license.LicenseServerUtil
-
public class LicenseServerUtil extends Object
Utility class for creating jquery-ajax request and java-http requests to the product management server- Author:
- XIMA MEDIA GmbH, Dresden
-
-
Constructor Summary
Constructors Constructor Description LicenseServerUtil()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description String
buildCheckLicenseKeyAjaxRequest(String key, String versionKey, String successCall, String errorCallback)
Builds an jquery-ajax-query for checking an license keyString
buildCheckLicenseVersionAjaxRequest(String key, String versionKey, String completeCallback)
Builds an jquery-ajax-query for cheking an license versionString
buildDemoLicenseAjaxRequest(String firstname, String lastname, String customername, String email, String parentKey, String successCall, String errorCallback)
Builds an jquery-ajax-query for creating an demo-licenseString
buildSwapHardwareIdAjaxRequest(String licenseKey, String swapTargetId, String successCall, String errorCallback)
Builds an jquery-ajax-query for swapping an hardware-idString
getSystemInfo()
static ELicenseVersionState
getSystemLicenseVersionState()
Gets the systemLicenseStatestatic void
setSystemLicenseVersionState(ELicenseVersionState systemLicenseState)
Sets the systemLicenseStatevoid
updateClientLicense(String key)
Tries to update an client-license by the given keyELicenseVersionState
updateSystemLicenseVersionState()
Updates the system license state by an server-side http query
-
-
-
Method Detail
-
getSystemLicenseVersionState
public static ELicenseVersionState getSystemLicenseVersionState()
Gets the systemLicenseState- Returns:
- the systemLicenseState
-
setSystemLicenseVersionState
public static void setSystemLicenseVersionState(ELicenseVersionState systemLicenseState)
Sets the systemLicenseState- Parameters:
systemLicenseState
- to set
-
updateSystemLicenseVersionState
public ELicenseVersionState updateSystemLicenseVersionState()
Updates the system license state by an server-side http query- Returns:
- the new system license version state
-
updateClientLicense
public void updateClientLicense(String key)
Tries to update an client-license by the given key- Parameters:
key
- the key of the client license to update
-
buildDemoLicenseAjaxRequest
public String buildDemoLicenseAjaxRequest(String firstname, String lastname, String customername, String email, String parentKey, String successCall, String errorCallback)
Builds an jquery-ajax-query for creating an demo-license- Parameters:
firstname
- the firstname of the license ownerlastname
- the lastname of the license ownercustomername
- the name of the customeremail
- the email of the ownerparentKey
- the parent license key ornull
successCall
- the name of the ajax-success callback methoderrorCallback
- the name of the ajax-error callback method- Returns:
- the jquery-javascript-string
-
buildCheckLicenseKeyAjaxRequest
public String buildCheckLicenseKeyAjaxRequest(String key, String versionKey, String successCall, String errorCallback)
Builds an jquery-ajax-query for checking an license key- Parameters:
key
- the key to checkversionKey
- the version key to checksuccessCall
- the name of the ajax-success callback methoderrorCallback
- the name of the ajax-error callback method- Returns:
- the jquery-javascript-string
-
buildSwapHardwareIdAjaxRequest
public String buildSwapHardwareIdAjaxRequest(String licenseKey, String swapTargetId, String successCall, String errorCallback)
Builds an jquery-ajax-query for swapping an hardware-id- Parameters:
licenseKey
- the license keyswapTargetId
- the hardware-id to swapsuccessCall
- the name of the ajax-success callback methoderrorCallback
- the name of the ajax-error callback method- Returns:
- the jquery-javascript-string
-
buildCheckLicenseVersionAjaxRequest
public String buildCheckLicenseVersionAjaxRequest(String key, String versionKey, String completeCallback)
Builds an jquery-ajax-query for cheking an license version- Parameters:
key
- the license key to checkversionKey
- the version key to checkcompleteCallback
- the name of the ajax-complete callback method- Returns:
- the jquery-javascript-string
-
getSystemInfo
public String getSystemInfo()
- Returns:
- an string with the system information
-
-