com.jp.protection.gui.dialogs.pro
Class DefaultLicenseHostIssueResolver

java.lang.Object
  extended by com.jp.protection.gui.dialogs.pro.DefaultLicenseHostIssueResolver
All Implemented Interfaces:
LicenseHostIssueResolver

public class DefaultLicenseHostIssueResolver
extends java.lang.Object
implements LicenseHostIssueResolver

Default implementation of the "resolver" interface which introduces methods responsible for the resolving of the issues and conflicts occurring during the license checking. This implementation will show the Licensing Wizard which aid the end-user in finding or obtaining the license or it will show the License Activation Wizard if the license need to be activated.


Field Summary
protected  LicenseActivationWizard fLicenseActivationWizard
           
protected  LicenseHost fLicenseHost
           
protected  LicenseLockWizard fLicenseLockWizard
           
protected  LicenseUpgradeWizard fLicenseUpgradeWizard
           
protected  LicensingWizardPro fLicensingWizard
           
protected  java.lang.String fLogin
           
protected  java.awt.Component fOwner
           
protected  java.lang.String fPassword
           
protected  ProductInfo fProductInfo
           
protected  boolean fSilentActivation
           
(package private) static java.util.ResourceBundle res
           
 
Constructor Summary
DefaultLicenseHostIssueResolver(LicenseHost aLicenseHost, java.awt.Component anOwner)
          Creates a new instance of Issue Resolver
 
Method Summary
protected  LicenseLockWizard createLicenseLockWizard()
           
protected  LicenseUpgradeWizard createLicenseUpgradeWizard()
           
protected  LicensingWizardPro createLicensingWizard()
           
 java.lang.String getActivationFacadeProviderName()
          Returns name of the LicensingFacadeProvider that is used by the Activation Wizard to get access to the license activation functionality
 int getActivationWizardOptions()
          Returns options describing behavior of the Activation Wizard as a set of the LicenseActivationWizard.OPTION_ constants.
 LicenseActivationWizard getLicenseActivationWizard()
          Returns cached License Activation Wizard instance.
 LicenseLockWizard getLicenseLockWizard()
          Returns License Lock Wizard instance
 int getLicenseLockWizardOptions()
          Returns options describing behavior of the License Lock Wizard as a set of the LicenseLockWizard.OPTION_ constants.
protected  LicenseUpgradeWizard getLicenseUpgradeWizard()
           
 java.lang.String getLicensingFacadeProviderName()
          Returns name of LicensingFacadeProvider is used by Licensing Wizard to get access to the licensing functionality
 LicensingWizardPro getLicensingWizard()
          Returns cached Licensing Wizard instance.
 int getLicensingWizardOptions()
          Returns options that describes behavior of the Licensing Wizard as a set of LicensingWizard.OPTION_ constants.
 java.lang.String getLogin()
          Returns login name that should be passed to the Licensing Facade
 java.lang.String getPassword()
          Returns password that should be passed to the Licensing Facade
 ProductInfo getProductInfo()
          Returns product information
 boolean isSilentActivation()
          Returns whether resolver should silently try to activate license using Licensing Facade without showing any messages.
 boolean resolveLicenseActivationLockViolation(LicenseHost aSource)
           This method is responsible for resolving an issue when license has been locked to a particular computer system but was moved to another computer system.
 boolean resolveLicenseCanNotBeUpgraded(LicenseHost aSource)
          This method is responsible for resolving an issue when upgrade license is invalid because no required license(s) of previous version was found
 boolean resolveLicenseExpired(LicenseHost aSource)
           This method is responsible for resolving an issue when license is expired.
 boolean resolveLicenseInvalid(LicenseHost aSource)
           This method is responsible for resolving an issue when license is invalid e.g.
 boolean resolveLicenseMissingActivation(LicenseHost aSource, java.lang.String aLicenseKey)
           This method is responsible for resolving an issue when license should be, but not yet activated.
 boolean resolveLicenseNotLocked(LicenseHost aSource)
          This method is responsible for resolving an issue when lock for the license could not be acquired using the Licensing Server.
 void setActivationFacadeProviderName(java.lang.String aName)
          Specifies name of LicensingFacadeProvider should be used by Activation Wizard to get access to the activation functionality
 void setActivationWizardLogo(javax.swing.Icon anIcon)
          Specifies logo icon shown of the left of License Activation Wizard
 void setActivationWizardOptions(int anOptions)
          Specifies options describing behavior of the Activation Wizard as a set of the LicenseActivationWizard.OPTION_ constants.
 void setLicenseLockWizardLogo(javax.swing.Icon anIcon)
          Specifies logo icon shown of the left of License Lock Wizard
 void setLicenseLockWizardOptions(int anOptions)
          Specifies options describing behavior of the License Lock Wizard as a set of LicenseLockWizard.OPTION_ constants.
 void setLicensingFacadeProviderName(java.lang.String aName)
          Specifies name of LicensingFacadeProvider should be used by Licensing Wizard to get access to the licensing functionality
 void setLicensingWizardLogo(javax.swing.Icon anIcon)
          Specifies logo icon shown of the left of License Wizard
 void setLicensingWizardOptions(int anOptions)
          Specifies options that describes behavior of the Licensing Wizard as a set of LicensingWizard.OPTION_ constants.
 void setLogin(java.lang.String aLogin)
          Specifies login name that should be passed to the Licensing Facade
 void setPassword(java.lang.String aPassword)
          Specifies password that should be passed to the Licensing Facade
 void setProductInfo(ProductInfo aProductInfo)
          Specifies product information
 void setSilentActivation(boolean aSilentActivation)
          Specifies that the Resolver should silently try to activate the license using the Licensing Facade without showing of any messages to the end-user.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

res

static java.util.ResourceBundle res

fLicenseHost

protected LicenseHost fLicenseHost

fLicensingWizard

protected LicensingWizardPro fLicensingWizard

fLicenseLockWizard

protected LicenseLockWizard fLicenseLockWizard

fLogin

protected java.lang.String fLogin

fPassword

protected java.lang.String fPassword

fLicenseActivationWizard

protected LicenseActivationWizard fLicenseActivationWizard

fOwner

protected java.awt.Component fOwner

fProductInfo

protected ProductInfo fProductInfo

fSilentActivation

protected boolean fSilentActivation

fLicenseUpgradeWizard

protected LicenseUpgradeWizard fLicenseUpgradeWizard
Constructor Detail

DefaultLicenseHostIssueResolver

public DefaultLicenseHostIssueResolver(LicenseHost aLicenseHost,
                                       java.awt.Component anOwner)
Creates a new instance of Issue Resolver

Parameters:
aLicenseHost - License Host instance used to provide various utility methods
anOwner - a component from which Licensing Wizard should be displayed
Method Detail

getLicensingWizard

public LicensingWizardPro getLicensingWizard()
Returns cached Licensing Wizard instance. If is the Licensing Wizard instance has not yet been created then creates it and then caches it.

Returns:
Licensing Wizard instance

createLicensingWizard

protected LicensingWizardPro createLicensingWizard()

getLicenseLockWizard

public LicenseLockWizard getLicenseLockWizard()
Returns License Lock Wizard instance

Returns:
License Lock Wizard instance
Since:
3.0

createLicenseLockWizard

protected LicenseLockWizard createLicenseLockWizard()

getProductInfo

public ProductInfo getProductInfo()
Returns product information

Returns:
product information

setProductInfo

public void setProductInfo(ProductInfo aProductInfo)
Specifies product information

Parameters:
aProductInfo - product information

getLicenseActivationWizard

public LicenseActivationWizard getLicenseActivationWizard()
Returns cached License Activation Wizard instance. If the License Activation Wizard instance has not yet been created then creates it and then caches it.

Returns:
License Activation Wizard instance

getLogin

public java.lang.String getLogin()
Returns login name that should be passed to the Licensing Facade

Returns:
login name

setLogin

public void setLogin(java.lang.String aLogin)
Specifies login name that should be passed to the Licensing Facade

Parameters:
aLogin - login name

getPassword

public java.lang.String getPassword()
Returns password that should be passed to the Licensing Facade

Returns:
password

setPassword

public void setPassword(java.lang.String aPassword)
Specifies password that should be passed to the Licensing Facade

Parameters:
aPassword - password

getLicensingWizardOptions

public int getLicensingWizardOptions()
Returns options that describes behavior of the Licensing Wizard as a set of LicensingWizard.OPTION_ constants.

Returns:
options

setLicensingWizardOptions

public void setLicensingWizardOptions(int anOptions)
Specifies options that describes behavior of the Licensing Wizard as a set of LicensingWizard.OPTION_ constants.

Parameters:
anOptions - options to specify

getLicensingFacadeProviderName

public java.lang.String getLicensingFacadeProviderName()
Returns name of LicensingFacadeProvider is used by Licensing Wizard to get access to the licensing functionality

Returns:
name of LicensingFacadeProvider

setLicensingFacadeProviderName

public void setLicensingFacadeProviderName(java.lang.String aName)
Specifies name of LicensingFacadeProvider should be used by Licensing Wizard to get access to the licensing functionality

Parameters:
aName - name of LicensingFacadeProvider

setLicensingWizardLogo

public void setLicensingWizardLogo(javax.swing.Icon anIcon)
Specifies logo icon shown of the left of License Wizard

Parameters:
anIcon - logo icon

getActivationWizardOptions

public int getActivationWizardOptions()
Returns options describing behavior of the Activation Wizard as a set of the LicenseActivationWizard.OPTION_ constants.

Returns:
options

setActivationWizardOptions

public void setActivationWizardOptions(int anOptions)
Specifies options describing behavior of the Activation Wizard as a set of the LicenseActivationWizard.OPTION_ constants.

Parameters:
anOptions - options

setLicenseLockWizardOptions

public void setLicenseLockWizardOptions(int anOptions)
Specifies options describing behavior of the License Lock Wizard as a set of LicenseLockWizard.OPTION_ constants.

Parameters:
anOptions - options
Since:
3.0

getLicenseLockWizardOptions

public int getLicenseLockWizardOptions()
Returns options describing behavior of the License Lock Wizard as a set of the LicenseLockWizard.OPTION_ constants.

Returns:
options
Since:
3.0

getActivationFacadeProviderName

public java.lang.String getActivationFacadeProviderName()
Returns name of the LicensingFacadeProvider that is used by the Activation Wizard to get access to the license activation functionality

Returns:
name of LicensingFacadeProvider

setActivationFacadeProviderName

public void setActivationFacadeProviderName(java.lang.String aName)
Specifies name of LicensingFacadeProvider should be used by Activation Wizard to get access to the activation functionality

Parameters:
aName - name of LicensingFacadeProvider

setActivationWizardLogo

public void setActivationWizardLogo(javax.swing.Icon anIcon)
Specifies logo icon shown of the left of License Activation Wizard

Parameters:
anIcon - logo icon

setLicenseLockWizardLogo

public void setLicenseLockWizardLogo(javax.swing.Icon anIcon)
Specifies logo icon shown of the left of License Lock Wizard

Parameters:
anIcon - logo icon

resolveLicenseExpired

public boolean resolveLicenseExpired(LicenseHost aSource)
Description copied from interface: LicenseHostIssueResolver

This method is responsible for resolving an issue when license is expired. Implementation of this method should:

Usual implementation should execute remote call to some backend service knowledgeable of the proper licenses activation procedure.

Specified by:
resolveLicenseExpired in interface LicenseHostIssueResolver
Parameters:
aSource - identifies license host calling this method
Returns:
boolean true if issue is resolved; false otherwise

resolveLicenseInvalid

public boolean resolveLicenseInvalid(LicenseHost aSource)
Description copied from interface: LicenseHostIssueResolver

This method is responsible for resolving an issue when license is invalid e.g. product or version is not match. Implementation of this method should:

Usual implementation should execute remote call to some backend service knowledgeable of the proper licenses activation procedure.

Specified by:
resolveLicenseInvalid in interface LicenseHostIssueResolver
Parameters:
aSource - identifies license host calling this method
Returns:
boolean true if issue is resolved; false otherwise

isSilentActivation

public boolean isSilentActivation()
Returns whether resolver should silently try to activate license using Licensing Facade without showing any messages.

Returns:
true if silent activation is enabled; false otherwise.

setSilentActivation

public void setSilentActivation(boolean aSilentActivation)
Specifies that the Resolver should silently try to activate the license using the Licensing Facade without showing of any messages to the end-user. In such a case activation is fully transparent to the end-user. If silent activation is failed the end-user will be prompted for the input via the License Activation Assistant Wizard.

Parameters:
aSilentActivation - true if silent activation should be enabled; false otherwise.

resolveLicenseActivationLockViolation

public boolean resolveLicenseActivationLockViolation(LicenseHost aSource)
Description copied from interface: LicenseHostIssueResolver

This method is responsible for resolving an issue when license has been locked to a particular computer system but was moved to another computer system. Implementation of this method should:

Usual implementation should execute remote call to some backend service knowledgeable of the proper licenses activation procedure.

Specified by:
resolveLicenseActivationLockViolation in interface LicenseHostIssueResolver
Parameters:
aSource - identifies license host calling this method
Returns:
boolean true if issue is resolved; false otherwise

resolveLicenseMissingActivation

public boolean resolveLicenseMissingActivation(LicenseHost aSource,
                                               java.lang.String aLicenseKey)
Description copied from interface: LicenseHostIssueResolver

This method is responsible for resolving an issue when license should be, but not yet activated. Implementation of this method should:

Usual implementation should execute remote call to some backend service knowledgeable of the proper licenses activation procedure.

Specified by:
resolveLicenseMissingActivation in interface LicenseHostIssueResolver
Parameters:
aSource - identifies license host calling this method
aLicenseKey - a license key should be placed into a license
Returns:
boolean true if issue is resolved; false otherwise

resolveLicenseNotLocked

public boolean resolveLicenseNotLocked(LicenseHost aSource)
Description copied from interface: LicenseHostIssueResolver
This method is responsible for resolving an issue when lock for the license could not be acquired using the Licensing Server. Implementation of this method should take care of license lock acquiring e.g. by allowing the user to specify proper Licensing Server address or waiting for license lock availability.

Specified by:
resolveLicenseNotLocked in interface LicenseHostIssueResolver
Parameters:
aSource - identifies license host calling this method
Returns:
boolean true if issue is resolved; false otherwise

getLicenseUpgradeWizard

protected LicenseUpgradeWizard getLicenseUpgradeWizard()

createLicenseUpgradeWizard

protected LicenseUpgradeWizard createLicenseUpgradeWizard()

resolveLicenseCanNotBeUpgraded

public boolean resolveLicenseCanNotBeUpgraded(LicenseHost aSource)
Description copied from interface: LicenseHostIssueResolver
This method is responsible for resolving an issue when upgrade license is invalid because no required license(s) of previous version was found

Specified by:
resolveLicenseCanNotBeUpgraded in interface LicenseHostIssueResolver
Parameters:
aSource - identifies license host calling this method
Returns:
boolean true if issue is resolved; false otherwise