com.jp.protection.pub
Class ProtectionFactory

java.lang.Object
  extended by com.jp.protection.pub.ProtectionFactoryBase
      extended by com.jp.protection.pub.ProtectionFactory
Direct Known Subclasses:
ProtectionFactoryPro

public class ProtectionFactory
extends ProtectionFactoryBase

Factory class responsible for the creation of the instances of various Protection! classes depending on the Protection! edition (Standard or Professional) these features are either initialized or not.


Field Summary
protected static ProtectionFactory fInstance
           
protected static java.lang.Class fProtectionFactoryClass
           
 
Fields inherited from class com.jp.protection.pub.ProtectionFactoryBase
PROPERTY_LICENSE_FACADE_URL, PROPERTY_LICENSE_FOLDER, PROPERTY_LICENSE_NAME, PROPERTY_LICENSE_RESOURCE_FOLDER, PROPERTY_LICENSE_WRITER_OUTPUT, PROPERTY_LICENSE_WRITER_SEARCH_LICENSE_RESOURCE, PROTECTION_BACKEND_LICENSE_NAME, PROTECTION_LICENSE_FOLDER, PROTECTION_LICENSE_NAME, PROTECTION_LICENSE_RESOURCE_FOLDER, PROTECTION_SALES_LICENSE_NAME, SUB_VERSION, VERSION
 
Constructor Summary
ProtectionFactory()
           
 
Method Summary
static LicenseAboutDialog createLicenseAboutDialog(java.awt.Component anOwner, ProductInfo aProductInfo)
          Creates licensing about dialog
protected  LicenseAboutDialog createLicenseAboutDialogInt(java.awt.Component anOwner, ProductInfo aProductInfo)
           
static LicenseAcceptanceDelegate createLicenseAcceptanceDelegate()
          Creates an instance of dummy implementation of the license acceptance delegate that assumes that license agreement is already accepted by some way outside application.
static LicenseAcceptanceDelegate createLicenseAcceptanceDelegate(java.awt.Component anOwner, java.lang.String aTitle)
          Creates an instance of default implementation of the license acceptance delegate.
protected static LicenseAcceptanceDelegate createLicenseAcceptanceDelegateInt()
           
protected  LicenseAcceptanceDelegate createLicenseAcceptanceDelegateInt(java.awt.Component anOwner, java.lang.String aTitle)
           
static LicenseHost createLicenseHost()
          Creates a new instance of the license host
static LicenseHost createLicenseHost(LicenseReader aLicenseReader)
          Creates a new instance of the license host and assigns a license reader to it
static LicenseHost createLicenseHost(LicenseReader aLicenseReader, LicenseHostListener aLicenseHostListener)
          Creates a new instance of the license host, assigns a license reader to it and adds license host listener to both license reader and license host
protected  LicenseHost createLicenseHostInt(LicenseReader aLicenseReader, LicenseHostListener aLicenseHostListener)
           
static LicenseHostIssueResolver createLicenseHostIssueResolver(LicenseHost aLicenseHost, java.awt.Component anOwner, ProductInfo aProductInfo)
          Creates an instance of default implementation of the license host issue resolver.
protected  LicenseHostIssueResolver createLicenseHostIssueResolverInt(LicenseHost aLicenseHost, java.awt.Component anOwner, ProductInfo aProductInfo)
           
static LicenseListener createLicenseListener()
          Creates a new instance of the license listener.
static LicenseListener createLicenseListener(java.awt.Component anOwner)
          Creates a new instance of the license listener
protected  LicenseListener createLicenseListenerInt(java.awt.Component anOwner)
           
static LicenseReader createLicenseReader()
          Creates a new instance of the license reader
protected  LicenseReader createLicenseReaderInt()
           
static LicenseReaderIssueResolver createLicenseReaderIssueResolver(LicenseReader aLicenseReader)
          Creates an instance of default implementation of the license reader issue resolver.
static LicenseReaderIssueResolver createLicenseReaderIssueResolver(LicenseReader aLicenseReader, java.awt.Component aOwner, ProductInfo aProductInfo)
          Creates an instance of default implementation of the license reader issue resolver.
protected  LicenseReaderIssueResolver createLicenseReaderIssueResolverInt(LicenseReader aLicenseReader, java.awt.Component aOwner, ProductInfo aProductInfo)
           
static LicensingWizard createLicensingWizard(LicenseReader aLicenseReader, java.awt.Component aOwner, ProductInfo aProductInfo)
          Creates licensing wizard instance
protected  LicensingWizard createLicensingWizardInt(LicenseReader aLicenseReader, java.awt.Component aOwner, ProductInfo aProductInfo)
           
static ProtectionFactory getInstance()
          Returns an instance of the protection factory
protected  void initLicensingWizard(LicensingWizard aLicensingWizard, LicenseReader aLicenseReader, ProductInfo aProductInfo)
           
static void initProfessional()
          Initializes factory to enable creation of the Protection! Professional edition classes
 
Methods inherited from class com.jp.protection.pub.ProtectionFactoryBase
getAPIVersion
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

fProtectionFactoryClass

protected static java.lang.Class fProtectionFactoryClass

fInstance

protected static ProtectionFactory fInstance
Constructor Detail

ProtectionFactory

public ProtectionFactory()
Method Detail

initProfessional

public static void initProfessional()
Initializes factory to enable creation of the Protection! Professional edition classes


getInstance

public static ProtectionFactory getInstance()
Returns an instance of the protection factory

Returns:
an instance of the ProtectionFactory

createLicensingWizard

public static LicensingWizard createLicensingWizard(LicenseReader aLicenseReader,
                                                    java.awt.Component aOwner,
                                                    ProductInfo aProductInfo)
Creates licensing wizard instance

Parameters:
aLicenseReader - a license reader that can be used by the wizard
aOwner - an owner for the wizard
aProductInfo - a product information
Returns:
a new instance of the LicensingWizard

createLicenseAboutDialog

public static LicenseAboutDialog createLicenseAboutDialog(java.awt.Component anOwner,
                                                          ProductInfo aProductInfo)
Creates licensing about dialog

Parameters:
anOwner - an owner for the dialog
aProductInfo - a product information
Returns:
a new instance of the LicenseAboutDialog

createLicenseReader

public static LicenseReader createLicenseReader()
Creates a new instance of the license reader

Returns:
a new instance of the LicenseReader

createLicenseHost

public static LicenseHost createLicenseHost()
Creates a new instance of the license host

Returns:
a new instance of the LicenseHost

createLicenseHost

public static LicenseHost createLicenseHost(LicenseReader aLicenseReader)
Creates a new instance of the license host and assigns a license reader to it

Parameters:
aLicenseReader - license reader to be assigned to the license host
Returns:
a new instance of the LicenseHost

createLicenseHost

public static LicenseHost createLicenseHost(LicenseReader aLicenseReader,
                                            LicenseHostListener aLicenseHostListener)
Creates a new instance of the license host, assigns a license reader to it and adds license host listener to both license reader and license host

Parameters:
aLicenseReader - license reader to be assigned to the license host
aLicenseHostListener - listener to add
Returns:
a new instanced of the LicenseHost

createLicenseListener

public static LicenseListener createLicenseListener(java.awt.Component anOwner)
Creates a new instance of the license listener

Parameters:
anOwner - optional owner component can be used by the listener's implementation as aowner to the dialogs and messages
Returns:
an new instance of the LicenseListener

createLicenseListener

public static LicenseListener createLicenseListener()
Creates a new instance of the license listener. This call is equivalent to a call to the createLicenseListener(null)

Returns:
an new instance of the LicenseListener

createLicenseReaderIssueResolver

public static LicenseReaderIssueResolver createLicenseReaderIssueResolver(LicenseReader aLicenseReader,
                                                                          java.awt.Component aOwner,
                                                                          ProductInfo aProductInfo)
Creates an instance of default implementation of the license reader issue resolver.

Parameters:
aLicenseReader - a license reader that can be used to locate and read licenses
aOwner - an owner for the dialogs that can be shown by the resolver during work
aProductInfo - a product information
Returns:
a new instance of the LicenseReaderIssueResolver

createLicenseReaderIssueResolver

public static LicenseReaderIssueResolver createLicenseReaderIssueResolver(LicenseReader aLicenseReader)
Creates an instance of default implementation of the license reader issue resolver. This call is equivalent to a call to the createLicenseReaderIssueResolverInt(aLicenseReader, null, null)

Parameters:
aLicenseReader - a license reader that can be used to locate and read licenses
Returns:
a new instance of the LicenseReaderIssueResolver

createLicenseHostIssueResolver

public static LicenseHostIssueResolver createLicenseHostIssueResolver(LicenseHost aLicenseHost,
                                                                      java.awt.Component anOwner,
                                                                      ProductInfo aProductInfo)
Creates an instance of default implementation of the license host issue resolver.

Parameters:
aLicenseHost - a license host that can be used to obtain various properties
anOwner - an owner for the dialogs that can be shown by the resolver during work
aProductInfo - a product information
Returns:
a new instance of the LicenseHostIssueResolver

createLicenseAcceptanceDelegate

public static LicenseAcceptanceDelegate createLicenseAcceptanceDelegate(java.awt.Component anOwner,
                                                                        java.lang.String aTitle)
Creates an instance of default implementation of the license acceptance delegate.

Parameters:
anOwner - an owner for the dialogs that can be shown by the delegate during work
aTitle - a title for the license acceptance dialog
Returns:
a new instance of the LicenseAcceptanceDelegate

createLicenseAcceptanceDelegate

public static LicenseAcceptanceDelegate createLicenseAcceptanceDelegate()
Creates an instance of dummy implementation of the license acceptance delegate that assumes that license agreement is already accepted by some way outside application.

Returns:
a new instance of the LicenseAcceptanceDelegate

createLicenseAcceptanceDelegateInt

protected static LicenseAcceptanceDelegate createLicenseAcceptanceDelegateInt()

createLicenseHostInt

protected LicenseHost createLicenseHostInt(LicenseReader aLicenseReader,
                                           LicenseHostListener aLicenseHostListener)

createLicenseListenerInt

protected LicenseListener createLicenseListenerInt(java.awt.Component anOwner)

createLicenseReaderIssueResolverInt

protected LicenseReaderIssueResolver createLicenseReaderIssueResolverInt(LicenseReader aLicenseReader,
                                                                         java.awt.Component aOwner,
                                                                         ProductInfo aProductInfo)

createLicenseReaderInt

protected LicenseReader createLicenseReaderInt()

createLicenseAboutDialogInt

protected LicenseAboutDialog createLicenseAboutDialogInt(java.awt.Component anOwner,
                                                         ProductInfo aProductInfo)

createLicenseAcceptanceDelegateInt

protected LicenseAcceptanceDelegate createLicenseAcceptanceDelegateInt(java.awt.Component anOwner,
                                                                       java.lang.String aTitle)

createLicenseHostIssueResolverInt

protected LicenseHostIssueResolver createLicenseHostIssueResolverInt(LicenseHost aLicenseHost,
                                                                     java.awt.Component anOwner,
                                                                     ProductInfo aProductInfo)

createLicensingWizardInt

protected LicensingWizard createLicensingWizardInt(LicenseReader aLicenseReader,
                                                   java.awt.Component aOwner,
                                                   ProductInfo aProductInfo)

initLicensingWizard

protected void initLicensingWizard(LicensingWizard aLicensingWizard,
                                   LicenseReader aLicenseReader,
                                   ProductInfo aProductInfo)