com.jp.protection.pub.pro.integration.ws
Class LicensingFacadeWS

java.lang.Object
  extended by com.jp.protection.pub.pro.integration.ws.LicensingFacadeWS
All Implemented Interfaces:
LicensingFacade

public class LicensingFacadeWS
extends java.lang.Object
implements LicensingFacade

Implementation of LicensingFacade capable of remotely working with Protection! Web Services Application to get and activate licenses


Nested Class Summary
static class LicensingFacadeWS.Provider
          Implementation of the provider that creates an instance of the LicensingFacade capable of remotely working with Protection! Web Services Application to get and activate licenses
 
Field Summary
protected  com.jp.protection.pub.pro.integration.ws.gen.LicensingFacade_PortType fLicensingFacade
           
protected  java.lang.String fLogin
           
protected  java.lang.String fPassword
           
static java.lang.String[] PROPERTIES_LICENSE_DESCR
           
static java.lang.String[] PROPERTIES_LICENSE_INFO
           
 
Fields inherited from interface com.jp.protection.pub.pro.integration.LicensingFacade
ARGUMENT_ACTIVATION_KEY, ARGUMENT_ACTIVATION_LOCK_KEY, ARGUMENT_HOST_NAME, ARGUMENT_IP_ADDRESS, ARGUMENT_LICENSE_FEATURE_PREFIX, ARGUMENT_LICENSE_PROPERTY_FREFIX, ARGUMENT_LOCALE, ARGUMENT_USE_COUNT_LEFT, ARGUMENT_USER
 
Constructor Summary
LicensingFacadeWS(java.net.URL aConnectionURL)
          Creates a new instance of LicensingFacadeWS
LicensingFacadeWS(java.net.URL aConnectionURL, java.lang.String aLogin, java.lang.String aPassword)
          Creates a new instance of LicensingFacadeWS and allows specifying login and password attributes can be used in order to get and activate licenses
 
Method Summary
 LicensingFacadeResult activateLicense(byte[] aLicenseBytes, dev.entities.Customer aUser, java.lang.String aLicenseKey, java.lang.String aLogin, java.lang.String aPassword, java.util.Map anArguments)
          Activates a license specified as an array of bytes.
protected  com.jp.protection.pub.pro.integration.ws.gen.LicenseDescr convertLicenseDescr(LicenseDescr aLicenseDescr)
           
protected  com.jp.protection.pub.pro.integration.ws.gen.LicenseInfo convertLicenseInfo(LicenseInfo aLicenseInfo)
           
protected  LicensingFacadeResult convertLicensingFacadeResult(com.jp.protection.pub.pro.integration.ws.gen.LicensingFacadeResultWS_Proxy aLicensingFacadeResult)
           
protected  com.jp.protection.pub.pro.integration.ws.gen.Customer convertUser(dev.entities.Customer aCustomer)
           
 LicensingFacadeResult deactivateLicense(byte[] aLicenseBytes, java.lang.String aDeactivationKey, java.lang.String aLogin, java.lang.String aPassword, java.util.Map anArguments)
          Deactivates a license at the vendors side.
 LicensingFacadeResult getLicense(LicenseDescr aLicenseDescr, dev.entities.Customer aCustomer, java.lang.String aLogin, java.lang.String aPassword, java.util.Map anArguments)
          Generates a license according to the provided license descriptor.
 LicensingFacadeResult getLicense(LicenseInfo aLicenseInfo, dev.entities.Customer aCustomer, java.lang.String aLogin, java.lang.String aPassword, java.util.Map anArguments)
          Generates a license according to provided license information.
 LicensingFacadeResult getLicense(java.lang.String aSerialNumber, dev.entities.Customer aCustomer, java.lang.String aLogin, java.lang.String aPassword, java.util.Map anArguments)
          Generates a license according to the provided Serial Number.
 java.lang.String getVersion()
          Returns the version of implementation.
protected  java.util.HashMap prepareMap(java.util.Map aMap)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

fLicensingFacade

protected com.jp.protection.pub.pro.integration.ws.gen.LicensingFacade_PortType fLicensingFacade

fLogin

protected java.lang.String fLogin

fPassword

protected java.lang.String fPassword

PROPERTIES_LICENSE_INFO

public static final java.lang.String[] PROPERTIES_LICENSE_INFO

PROPERTIES_LICENSE_DESCR

public static final java.lang.String[] PROPERTIES_LICENSE_DESCR
Constructor Detail

LicensingFacadeWS

public LicensingFacadeWS(java.net.URL aConnectionURL)
Creates a new instance of LicensingFacadeWS

Parameters:
aConnectionURL - URL of Web Service to connect

LicensingFacadeWS

public LicensingFacadeWS(java.net.URL aConnectionURL,
                         java.lang.String aLogin,
                         java.lang.String aPassword)
Creates a new instance of LicensingFacadeWS and allows specifying login and password attributes can be used in order to get and activate licenses

Parameters:
aConnectionURL - URL of Web Service to connect
aLogin - login name
aPassword - password
Method Detail

prepareMap

protected java.util.HashMap prepareMap(java.util.Map aMap)

getLicense

public LicensingFacadeResult getLicense(LicenseDescr aLicenseDescr,
                                        dev.entities.Customer aCustomer,
                                        java.lang.String aLogin,
                                        java.lang.String aPassword,
                                        java.util.Map anArguments)
Description copied from interface: LicensingFacade
Generates a license according to the provided license descriptor. Valid login and password values should be specified to ensure that the user is eligible to get or activate certain type of license. This method is intended to be used by customers' applications to get evaluation licenses. It's quite safe to use as it allows to define only basic license attributes; exact license attributes will be specified by backend.

Specified by:
getLicense in interface LicensingFacade
Parameters:
aLicenseDescr - describes license to get
aCustomer - specifies customer information, which requests a license
aLogin - login name
aPassword - password
anArguments - additional arguments can be needed for proper license getting
Returns:
a LicensingFacadeResult instance.

getLicense

public LicensingFacadeResult getLicense(java.lang.String aSerialNumber,
                                        dev.entities.Customer aCustomer,
                                        java.lang.String aLogin,
                                        java.lang.String aPassword,
                                        java.util.Map anArguments)
Description copied from interface: LicensingFacade
Generates a license according to the provided Serial Number. Valid login and password values should be specified to ensure that the user is eligible to get or activate certain type of license.

Specified by:
getLicense in interface LicensingFacade
Parameters:
aSerialNumber - serial number
aCustomer - specifies customer information, which requests a license
aLogin - login name
aPassword - password
anArguments - additional arguments can be needed for proper license getting
Returns:
a LicensingFacadeResult instance.

getVersion

public java.lang.String getVersion()
Description copied from interface: LicensingFacade
Returns the version of implementation. Can be useful to avoid improper deployment issues.

Specified by:
getVersion in interface LicensingFacade
Returns:
version information

getLicense

public LicensingFacadeResult getLicense(LicenseInfo aLicenseInfo,
                                        dev.entities.Customer aCustomer,
                                        java.lang.String aLogin,
                                        java.lang.String aPassword,
                                        java.util.Map anArguments)
Description copied from interface: LicensingFacade
Generates a license according to provided license information. Valid login and password values should be specified to ensure that the user is eligible to get or activate certain type of license. This method is intended for internal vendors' use e.g. delivering licenses using Control Center or allowing stores/resellers to generate licenses according to all specified attributes. In most of cases it should be never used by custom applications as it provides too much potential control over licenses generation.

Specified by:
getLicense in interface LicensingFacade
Parameters:
aLicenseInfo - describes license to get
aCustomer - specifies customer information, which requests a license
aLogin - login name
aPassword - password
anArguments - additional arguments can be needed for proper license getting
Returns:
a LicensingFacadeResult instance.

activateLicense

public LicensingFacadeResult activateLicense(byte[] aLicenseBytes,
                                             dev.entities.Customer aUser,
                                             java.lang.String aLicenseKey,
                                             java.lang.String aLogin,
                                             java.lang.String aPassword,
                                             java.util.Map anArguments)
Description copied from interface: LicensingFacade
Activates a license specified as an array of bytes. Valid login and password values should be specified to ensure that the user is eligible to activate certain type of license.

Specified by:
activateLicense in interface LicensingFacade
Parameters:
aLicenseBytes - license to activate passed as array of bytes
aUser - specifies customer information, which requests a license
aLicenseKey - activation key
aLogin - login name
aPassword - password
anArguments - additional arguments can be needed for proper license activation
Returns:
a LicensingFacadeResult instance.

deactivateLicense

public LicensingFacadeResult deactivateLicense(byte[] aLicenseBytes,
                                               java.lang.String aDeactivationKey,
                                               java.lang.String aLogin,
                                               java.lang.String aPassword,
                                               java.util.Map anArguments)
Description copied from interface: LicensingFacade
Deactivates a license at the vendors side. The license should be previously deactivated at the customers side by call of LicenseHostPro.deactivateLicense() Valid login and password values should be specified to ensure that the user is eligible to activate certain type of license.

Specified by:
deactivateLicense in interface LicensingFacade
Parameters:
aLicenseBytes - license to deactivate passed as array of bytes
aDeactivationKey - deactivation key returned by LicenseHostPro.deactivateLicense() call
aLogin - login name
aPassword - password
anArguments - additional arguments can be needed for proper license deactivation
Returns:
a LicensingFacadeResult instance.

convertUser

protected com.jp.protection.pub.pro.integration.ws.gen.Customer convertUser(dev.entities.Customer aCustomer)

convertLicenseInfo

protected com.jp.protection.pub.pro.integration.ws.gen.LicenseInfo convertLicenseInfo(LicenseInfo aLicenseInfo)

convertLicenseDescr

protected com.jp.protection.pub.pro.integration.ws.gen.LicenseDescr convertLicenseDescr(LicenseDescr aLicenseDescr)

convertLicensingFacadeResult

protected LicensingFacadeResult convertLicensingFacadeResult(com.jp.protection.pub.pro.integration.ws.gen.LicensingFacadeResultWS_Proxy aLicensingFacadeResult)