Package com.wibu.cm

Class CodeMeterAct


  • public class CodeMeterAct
    extends CodeMeter
    CodeMeterAct Java-API-Documentation. This class extends the CodeMeter class for accessing CmAct licenses.
    • Field Detail

      • CM_GF_ACT_CREATE_LICENSE_INFO

        public static final long CM_GF_ACT_CREATE_LICENSE_INFO
        CmAct License management
        See Also:
        Constant Field Values
      • CM_GF_ACT_SETUP_LICENSE

        public static final long CM_GF_ACT_SETUP_LICENSE
        See Also:
        Constant Field Values
      • CM_GF_ACT_SETUP_LICENSE_STEP1

        public static final long CM_GF_ACT_SETUP_LICENSE_STEP1
        See Also:
        Constant Field Values
      • CM_GF_ACT_SETUP_LICENSE_STEP2

        public static final long CM_GF_ACT_SETUP_LICENSE_STEP2
        See Also:
        Constant Field Values
      • CM_GF_ACT_UPDATE_LICENSE_DATA

        public static final long CM_GF_ACT_UPDATE_LICENSE_DATA
        See Also:
        Constant Field Values
      • CM_GF_ACT_ACTIVATION_CODE

        public static final long CM_GF_ACT_ACTIVATION_CODE
        See Also:
        Constant Field Values
      • CM_GF_ACT_LICENSE_BY_CODE

        public static final long CM_GF_ACT_LICENSE_BY_CODE
        See Also:
        Constant Field Values
      • CM_GF_ACT_CREATE_ACTIVATION_STEP1

        public static final long CM_GF_ACT_CREATE_ACTIVATION_STEP1
        See Also:
        Constant Field Values
      • CM_GF_ACT_CREATE_ACTIVATION_STEP2

        public static final long CM_GF_ACT_CREATE_ACTIVATION_STEP2
        See Also:
        Constant Field Values
      • CM_GF_ACT_CREATE_ACTIVATION_STEP3

        public static final long CM_GF_ACT_CREATE_ACTIVATION_STEP3
        See Also:
        Constant Field Values
      • CM_GF_ACT_GET_INSTALLATION_ID

        public static final long CM_GF_ACT_GET_INSTALLATION_ID
        See Also:
        Constant Field Values
      • CM_GF_ACT_SPLIT_INSTALLATION_ID

        public static final long CM_GF_ACT_SPLIT_INSTALLATION_ID
        See Also:
        Constant Field Values
      • CM_GF_ACT_GET_TEMPLATE_KEY

        public static final long CM_GF_ACT_GET_TEMPLATE_KEY
        See Also:
        Constant Field Values
      • CM_GF_ACT_SPLIT_ACTIVATION_CODE

        public static final long CM_GF_ACT_SPLIT_ACTIVATION_CODE
        See Also:
        Constant Field Values
      • CM_GF_ACT_GETFILEINFO2

        public static final long CM_GF_ACT_GETFILEINFO2
        See Also:
        Constant Field Values
      • CM_GF_ACT_UNLOAD_LICENSE

        public static final long CM_GF_ACT_UNLOAD_LICENSE
        for CmActLicenseControl( CM_GF_ACT_REMOVE, ... )
        See Also:
        Constant Field Values
      • CM_GF_ACT_REMOVE_LICENSE

        public static final long CM_GF_ACT_REMOVE_LICENSE
        See Also:
        Constant Field Values
      • CMACT_ACTIVATION_INVALID

        public static final long CMACT_ACTIVATION_INVALID
        definition of the mulPreferredActivationMethod flags (CMACTLICENSEINFO)
        See Also:
        Constant Field Values
      • CMACT_ACTIVATION_PHONE

        public static final long CMACT_ACTIVATION_PHONE
        See Also:
        Constant Field Values
      • CMACT_ACTIVATION_EMAIL

        public static final long CMACT_ACTIVATION_EMAIL
        See Also:
        Constant Field Values
      • CMACT_ACTIVATION_PORTAL

        public static final long CMACT_ACTIVATION_PORTAL
        See Also:
        Constant Field Values
      • CMACT_ACTIVATION_SERVICE

        public static final long CMACT_ACTIVATION_SERVICE
        See Also:
        Constant Field Values
      • CMACT_MAX_LEN_PRODUCTNAME

        public static final int CMACT_MAX_LEN_PRODUCTNAME
        Definition of some constraints (length)
        See Also:
        Constant Field Values
      • CMACT_MAX_LEN_VENDORTEXT

        public static final int CMACT_MAX_LEN_VENDORTEXT
        See Also:
        Constant Field Values
      • CMACT_MAX_LEN_ACTIVATION_CODE

        public static final int CMACT_MAX_LEN_ACTIVATION_CODE
        See Also:
        Constant Field Values
      • CMACT_MAX_LEN_LICENSORDATA

        public static final int CMACT_MAX_LEN_LICENSORDATA
        See Also:
        Constant Field Values
      • CMACT_MAX_LEN_PLUGIN_NAME

        public static final int CMACT_MAX_LEN_PLUGIN_NAME
        See Also:
        Constant Field Values
      • CMACT_MAX_NUM_PRODUCT_DESCS

        public static final int CMACT_MAX_NUM_PRODUCT_DESCS
        See Also:
        Constant Field Values
      • CMACT_FILETYPE_LICENSEINFORMATIONFILE

        public static final long CMACT_FILETYPE_LICENSEINFORMATIONFILE
        definition of the mulFileType flags (CMACTFILEINFO)
        See Also:
        Constant Field Values
      • CMACT_FILETYPE_LICENSEINFORMATIONFILE_BOXMEMORY

        public static final long CMACT_FILETYPE_LICENSEINFORMATIONFILE_BOXMEMORY
        See Also:
        Constant Field Values
      • CMACT_FILETYPE_LICENSEREQUESTFILE

        public static final long CMACT_FILETYPE_LICENSEREQUESTFILE
        See Also:
        Constant Field Values
      • CMACT_FILETYPE_LICENSEACTIVATIONFILE

        public static final long CMACT_FILETYPE_LICENSEACTIVATIONFILE
        See Also:
        Constant Field Values
      • CMACT_FILETYPE_LICENSEFILE

        public static final long CMACT_FILETYPE_LICENSEFILE
        See Also:
        Constant Field Values
      • CMACT_FILETYPE_LICENSEREQUESTFILE_BOXMEMORY

        public static final long CMACT_FILETYPE_LICENSEREQUESTFILE_BOXMEMORY
        See Also:
        Constant Field Values
    • Constructor Detail

      • CodeMeterAct

        public CodeMeterAct()
        Default constructor. Tries to load the native library and may throw an exception if the library is missing!
    • Method Detail

      • cmActLicenseControl

        public boolean cmActLicenseControl​(long jHandle,
                                           long ctrl,
                                           byte[] buffer)
        Send license data to the codemeter server. The size of the data should not exceed 128 kB.
        Parameters:
        jHandle - contains a valid handle
        ctrl - must be set to CM_GF_ACT_REGISTER
        buffer - data
        Returns:
        false if an error occurred.
      • cmActLicenseControl

        public boolean cmActLicenseControl​(long jHandle,
                                           long ctrl,
                                           boolean deletePermanently)
        Removes (permanently) a license..
        Parameters:
        jHandle - contains a valid handle
        ctrl - must be set to CM_GF_ACT_REMOVE
        deletePermanently - flag, set to 1 if you want to remove the license
        Returns:
        false if an error occurred.
      • cmActLicenseControl

        public boolean cmActLicenseControl​(long jHandle,
                                           long ctrl,
                                           CodeMeterAct.CMACTLICENSEDATA cmLicenseData)
        Creates an empty box memory (licensor site)
        Parameters:
        jHandle - contains a valid handle
        ctrl - must be set to CM_GF_ACT_SETUP_LICENSE
        cmLicenseData - contains the initial license data
        Returns:
        false if an error occurred.
      • cmActLicenseControl

        public boolean cmActLicenseControl​(long jHandle,
                                           long ctrl,
                                           byte[] buffer,
                                           CodeMeterAct.CMACTFILEINFO fileInfo)
        Retrieves information about a license file
        Parameters:
        jHandle - contains a valid handle
        ctrl - must be set to CM_GF_ACT_GETFILEINFO
        buffer - input
        fileInfo - output
        Returns:
        false if an error occurred.
      • cmActLicenseControl

        public boolean cmActLicenseControl​(long jHandle,
                                           long ctrl,
                                           byte[] buffer,
                                           CodeMeterAct.CMACTFILEINFO2 fileInfo)
        Retrieves information about a license file
        Parameters:
        jHandle - contains a valid handle
        ctrl - must be set to CM_GF_ACT_GETFILEINFO2
        buffer - input
        fileInfo - output
        Returns:
        false if an error occurred.
      • cmActLicenseControl

        public boolean cmActLicenseControl​(long jHandle,
                                           long ctrl,
                                           CodeMeterAct.CMACTLICENSEDATA license,
                                           byte[] buffer)
        Create a license information file for file based activation.
        Parameters:
        jHandle - contains a valid handle
        ctrl - must be set to CM_GF_ACT_CREATE_LICENSE_INFO
        license - data (input)
        buffer - output
        Returns:
        false if an error occurred.
      • cmActLicenseControl

        public boolean cmActLicenseControl​(long jHandle,
                                           long ctrl,
                                           CodeMeterAct.CMACTREQUEST request,
                                           byte[] buffer)
        Create a license request file
        Parameters:
        jHandle - contains a valid handle
        ctrl - must be set to CM_GF_ACT_REQUEST
        request - data (input)
        buffer - output
        Returns:
        false if an error occurred.
      • cmActLicenseControl

        public byte[] cmActLicenseControl​(long jHandle,
                                          long ctrl,
                                          CodeMeterAct.CMACTREQUEST request)
        Create a license request file
        Parameters:
        jHandle - contains a valid handle
        ctrl - must be set to CM_GF_ACT_REQUEST
        request - data (input)
        Returns:
        a byte array containing the context or null.
      • cmActLicenseControl

        public boolean cmActLicenseControl​(long jHandle,
                                           long ctrl,
                                           CodeMeterAct.CMACTDIGEST digest)
        Acivation via phone, step 1
        Parameters:
        jHandle - contains a valid handle
        ctrl - must be set to CM_GF_ACT_SETUP_LICENSE_STEP1
        digest - data (output)
        Returns:
        false if an error occurred.
      • cmActLicenseControl

        public boolean cmActLicenseControl​(long jHandle,
                                           long ctrl,
                                           CodeMeterAct.CMACTSIGNATURE signature,
                                           byte[] buffer)
        Acivation via phone, step 2 / creation of license activation step 3
        Parameters:
        jHandle - contains a valid handle
        ctrl - must be set to CM_GF_ACT_SETUP_LICENSE_STEP2 or CM_GF_ACT_SETUP_LICENSE_STEP3
        signature - data (input)
        buffer - output
        Returns:
        false if an error occurred.
      • cmActLicenseControl

        public boolean cmActLicenseControl​(long jHandle,
                                           long ctrl,
                                           byte[] buffer,
                                           CodeMeterAct.CMACTSYMKEY symkey)
        Creation of license activation file, step 1
        Parameters:
        jHandle - contains a valid handle
        ctrl - must be set to CM_GF_ACT_CREATE_ACTIVATION_STEP1
        buffer - contains the license information file contents (input)
        symkey - output
        Returns:
        false if an error occurred.
      • cmActLicenseControl

        public boolean cmActLicenseControl​(long jHandle,
                                           long ctrl,
                                           byte[] buffer,
                                           CodeMeterAct.CMACTDIGEST digests)
        Creation of license activation file, step 2
        Parameters:
        jHandle - contains a valid handle
        ctrl - must be set to CM_GF_ACT_CREATE_ACTIVATION_STEP2
        buffer - (input)
        digests - output
        Returns:
        false if an error occurred.
      • cmActLicenseControl

        public boolean cmActLicenseControl​(long jHandle,
                                           long ctrl,
                                           CodeMeterAct.CMACTACTIVATION cmactActivation)
        Get or split the Installation ID
        Parameters:
        jHandle - contains a valid handle
        ctrl - must be either CM_GF_ACT_GET_INSTALLATION_ID or CM_GF_ACT_SPLIT_INSTALLATION_ID
        cmactActivation -
        Returns:
        false if an error occurred.
      • cmActLicenseControl

        public boolean cmActLicenseControl​(long jHandle,
                                           long ctrl,
                                           CodeMeterAct.CMACTACTIVATION cmactActivation,
                                           java.lang.StringBuffer activationCode)
        create an activation code
        Parameters:
        jHandle - contains a valid handle
        ctrl - must be either CM_GF_ACT_GET_INSTALLATION_ID or CM_GF_ACT_SPLIT_INSTALLATION_ID
        cmactActivation - (input)
        activationCode - (output)
        Returns:
        false if an error occurred.
      • cmActLicenseControl

        public boolean cmActLicenseControl​(long jHandle,
                                           long ctrl,
                                           java.lang.String activationCode)
        activate license by code
        Parameters:
        jHandle - contains a valid handle
        ctrl - must be CM_GF_ACT_LICENSE_BY_CODE
        activationCode - the activation code (input)
        Returns:
        false if an error occurred.
      • cmActLicenseControl

        public static boolean cmActLicenseControl​(long jHandle,
                                                  long ctrl,
                                                  long firmCode,
                                                  byte[] boxTemplateKey)
        get a template key
        Parameters:
        jHandle -
        ctrl - must be CM_GF_ACT_GET_TEMPLATE_KEY
        firmCode - firm code
        boxTemplateKey - out: the box template key
        Returns:
        true on success
      • cmGetInfo

        public boolean cmGetInfo​(long jHandle,
                                 long ctrl,
                                 CodeMeterAct.CMACTLICENSEINFO licenseInfo)
        Retrieve CodeMeterAct license information
        Parameters:
        jHandle - contains a valid handle
        ctrl - must be set to CM_GEI_LICENSE_INFO
        licenseInfo - input
        Returns:
        false if an error occurred.
      • cmGetInfo

        public boolean cmGetInfo​(long jHandle,
                                 long ctrl,
                                 CodeMeterAct.CMACTLICENSEINFO2 licenseInfo)
        Retrieve CodeMeterAct license information
        Parameters:
        jHandle - contains a valid handle
        ctrl - must be set to CM_GEI_LICENSE_INFO2
        licenseInfo - input
        Returns:
        false if an error occurred.