com.jp.protection.gui.dialogs
Class DefaultLicenseReaderIssueResolver

java.lang.Object
  extended by com.jp.protection.gui.dialogs.DefaultLicenseReaderIssueResolver
All Implemented Interfaces:
LicenseReaderIssueResolver, LicenseReaderIssueResolverExt
Direct Known Subclasses:
DefaultLicenseReaderIssueResolverPro

public class DefaultLicenseReaderIssueResolver
extends java.lang.Object
implements LicenseReaderIssueResolverExt

Default implementation of "resolver" interface which introduces methods responsible for the resolving of the issues and conflicts occurring during the license locating and reading. It shows Licensing Wizard which provides ways to find or obtain licenses.


Field Summary
protected  LicenseReader fLicenseReader
           
protected  LicensingWizard fLicensingWizard
           
protected  java.awt.Component fOwner
           
protected  ProductInfo fProductInfo
           
(package private) static java.util.ResourceBundle res
           
 
Constructor Summary
DefaultLicenseReaderIssueResolver(LicenseReader aLicenseReader)
          Creates a new instance of Issue Resolver with no owner
DefaultLicenseReaderIssueResolver(LicenseReader aLicenseReader, java.awt.Component anOwner)
          Creates a new instance of Issue Resolver
DefaultLicenseReaderIssueResolver(LicenseReader aLicenseReader, java.awt.Component anOwner, ProductInfo aProductInfo)
          Creates a new instance of Issue Resolver
 
Method Summary
protected  LicensingWizard createLicensingWizard()
           
 LicensingWizard getLicensingWizard()
          Returns cached Licensing Wizard instance.
 int getLicensingWizardOptions()
          Returns options that describes behavior of the Licensing Wizard as a set of LicensingWizard.OPTION_ constants.
 ProductInfo getProductInfo()
          Returns product information
 boolean resolveLicenseCorrupted(LicenseReader aSource)
           This method is responsible for resolving an issue when license is corrupted.
 boolean resolveLicenseMissing(LicenseReader aSource)
           This method is responsible for the resolving an issue when license is missing.
 void setLicensingWizardLogo(javax.swing.Icon anIcon)
          Specifies logo icon shown of the left of Licensing Wizard
 void setLicensingWizardOptions(int anOptions)
          Specifies options that describes behavior of the Licensing Wizard as a set of LicensingWizard.OPTION_ constants.
 void setProductInfo(ProductInfo aProductInfo)
          Specifies product information
 boolean updateLicense(LicenseReader aSource)
           This method is responsible for updating a license to keep it up-to-date.
 
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

fOwner

protected java.awt.Component fOwner

fLicensingWizard

protected LicensingWizard fLicensingWizard

fProductInfo

protected ProductInfo fProductInfo

fLicenseReader

protected LicenseReader fLicenseReader
Constructor Detail

DefaultLicenseReaderIssueResolver

public DefaultLicenseReaderIssueResolver(LicenseReader aLicenseReader,
                                         java.awt.Component anOwner,
                                         ProductInfo aProductInfo)
Creates a new instance of Issue Resolver

Parameters:
aLicenseReader - License Reader instance used to properly find license location
anOwner - a component from which Licensing Wizard should be displayed

DefaultLicenseReaderIssueResolver

public DefaultLicenseReaderIssueResolver(LicenseReader aLicenseReader,
                                         java.awt.Component anOwner)
Creates a new instance of Issue Resolver

Parameters:
aLicenseReader - License Reader instance used to properly find license location
anOwner - a component from which Licensing Wizard should be displayed

DefaultLicenseReaderIssueResolver

public DefaultLicenseReaderIssueResolver(LicenseReader aLicenseReader)
Creates a new instance of Issue Resolver with no owner

Parameters:
aLicenseReader - License Reader instance used to properly find license location
Method Detail

getProductInfo

public ProductInfo getProductInfo()
Returns product information

Returns:
product information

setProductInfo

public void setProductInfo(ProductInfo aProductInfo)
Specifies product information

Parameters:
aProductInfo - product information to specify

getLicensingWizard

public LicensingWizard getLicensingWizard()
Returns cached Licensing Wizard instance. If it is not created yet, creates and caches it.

Returns:
Licensing Wizard instance

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

setLicensingWizardLogo

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

Parameters:
anIcon - logo icon

createLicensingWizard

protected LicensingWizard createLicensingWizard()

resolveLicenseMissing

public boolean resolveLicenseMissing(LicenseReader aSource)
Description copied from interface: LicenseReaderIssueResolver

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

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

Specified by:
resolveLicenseMissing in interface LicenseReaderIssueResolver
Parameters:
aSource - identifies the license reader calling this method
Returns:
true if issue is resolved; false otherwise

resolveLicenseCorrupted

public boolean resolveLicenseCorrupted(LicenseReader aSource)
Description copied from interface: LicenseReaderIssueResolver

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

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

Specified by:
resolveLicenseCorrupted in interface LicenseReaderIssueResolver
Parameters:
aSource - identifies the license reader calling this method
Returns:
true if issue is resolved; false otherwise

updateLicense

public boolean updateLicense(LicenseReader aSource)
Description copied from interface: LicenseReaderIssueResolverExt

This method is responsible for updating a license to keep it up-to-date. Implementation of this method should:

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

Specified by:
updateLicense in interface LicenseReaderIssueResolverExt
Parameters:
aSource - identifies the license reader calling this method
Returns:
true if license has been updated or removed; false otherwise