Class 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 Detail

      • LicenseServerUtil

        public LicenseServerUtil()
    • 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 owner
        lastname - the lastname of the license owner
        customername - the name of the customer
        email - the email of the owner
        parentKey - the parent license key or null
        successCall - the name of the ajax-success callback method
        errorCallback - 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 check
        versionKey - the version key to check
        successCall - the name of the ajax-success callback method
        errorCallback - 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 key
        swapTargetId - the hardware-id to swap
        successCall - the name of the ajax-success callback method
        errorCallback - 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 check
        versionKey - the version key to check
        completeCallback - the name of the ajax-complete callback method
        Returns:
        the jquery-javascript-string
      • getSystemInfo

        public String getSystemInfo()
        Returns:
        an string with the system information