|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.jp.protection.pub.launch.HeadlessProtectionLauncher
com.jp.protection.pub.launch.ProtectionLauncher
public class ProtectionLauncher
This class represents the entry point to the licensing functionality. It holds all the Protection! configuration data and provides various access and utility methods. The sample use case would be as follows:
ProtectionLauncherConfigReader reader = new ProtectionLauncherConfigReader();
reader.setDecryptKeyBytes(...);
reader.setSecurityAlgorithm("RSA - 512");
ProtectionLauncher launcher = ProtectionLauncher.getProtectionLauncher(reader, ProtectionLauncher.class,
  "DemoCalc.launcher", owner);
launcher.checkLicense();
Field Summary | |
---|---|
protected javax.swing.ImageIcon |
fActivationWizardLogo
|
protected int |
fActivationWizardOptions
|
protected javax.swing.ImageIcon |
fDeactivationWizardLogo
|
protected int |
fDeactivationWizardOptions
|
protected javax.swing.ImageIcon |
fLicenseLockWizardLogo
|
protected int |
fLicenseLockWizardOptions
|
protected javax.swing.ImageIcon |
fLicensingWizardLogo
|
protected int |
fLicensingWizardOptions
|
protected static java.text.MessageFormat |
FMT_CHECKOUT_FAIL
|
protected static java.text.MessageFormat |
FMT_CHECKOUT_SUCCESS
|
protected java.awt.Component |
fOwner
|
(package private) static java.util.ResourceBundle |
res
|
Fields inherited from class com.jp.protection.pub.launch.HeadlessProtectionLauncher |
---|
fLauncherConfig, fLicenseHost, fLicenseListener, fLicenseReader, fVerbose |
Constructor Summary | |
---|---|
ProtectionLauncher(ProtectionLauncherConfig aLauncherConfig)
Creates a new instance of the launcher. |
|
ProtectionLauncher(ProtectionLauncherConfig aLauncherConfig,
java.awt.Component anOwner)
Creates a new instance of the launcher. |
|
ProtectionLauncher(ProtectionLauncherConfig aLauncherConfig,
java.awt.Component anOwner,
LicenseReader aLicenseReader)
Creates a new instance of the launcher. |
Method Summary | |
---|---|
boolean |
checkoutLicense()
Checks out a License for offline use without need to lock the License using Licensing Server |
boolean |
checkoutLicense(boolean isShowMessage)
Checks out a License for offline use without need to lock the License using Licensing Server. |
protected LicenseAcceptanceDelegate |
createLicenseAcceptanceDelegate()
|
protected LicenseDeactivationWizard |
createLicenseDeactivationWizard(java.awt.Component anOwner)
|
protected LicenseHost |
createLicenseHost()
|
protected LicenseHostIssueResolver |
createLicenseHostIssueResolver()
|
protected LicenseReaderIssueResolver |
createLicenseReaderIssueResolver()
|
protected LicensingWizard |
createLicensingWizard(java.awt.Component anOwner)
|
int |
deactivateLicense(java.awt.Component anOwner)
Provides ability to deactivate license by use of Deactivation Assistant |
static ProtectionLauncher |
getProtectionLauncher(ProtectionLauncherConfigReader aReader,
java.lang.Class aBaseCLass,
java.lang.String aLauncherConfigResourceName)
Creates a new launcher instance and initializes it with configuration loaded from resource. |
static ProtectionLauncher |
getProtectionLauncher(ProtectionLauncherConfigReader aReader,
java.lang.Class aBaseCLass,
java.lang.String aLauncherConfigResourceName,
java.awt.Component anOwner)
Creates a new launcher instance and initializes it with configuration loaded from resource. |
static ProtectionLauncher |
getProtectionLauncher(ProtectionLauncherConfigReader aReader,
java.lang.Class aBaseCLass,
java.lang.String aLauncherConfigResourceName,
java.awt.Component anOwner,
LicenseReader aLicenseReader)
Creates a new launcher instance and initializes it with configuration loaded from resource. |
void |
init()
Initializes launcher instance |
protected void |
initLicenseHost()
|
protected void |
initLicenseListener()
|
protected void |
initLicenseReader()
|
protected void |
initProfessional(ProtectionLauncherConfig config)
|
boolean |
isAutoUpdateLicenseFromLicensingServer()
Returns whether automatic update of license from Licening Server is enabled. |
protected javax.swing.ImageIcon |
loadIcon(java.lang.String aFileName,
java.lang.String aResource)
|
void |
setActivationWizardLogo(javax.swing.ImageIcon anActivationWizardLogo)
Specifies image used as the logo for Activation Assistant |
protected void |
setActivationWizardOptions(int anOptions)
|
void |
setAutoUpdateLicenseFromLicensingServer(boolean autoUpdateLicenseFromLicensingServer)
Specifies that automatic update of license from Licening Server is enabled. |
protected void |
setDeactivationWizardLogo(javax.swing.ImageIcon aDeactivationWizardLogo)
|
protected void |
setDeactivationWizardOptions(int anOptions)
|
protected void |
setLicenseLockWizardLogo(javax.swing.ImageIcon aLicenseLockWizardLogo)
|
protected void |
setLicenseLockWizardOptions(int anOptions)
|
void |
setLicensingWizardLogo(javax.swing.ImageIcon aLicensingWizardLogo)
Specifies image used as the logo for Licensing Assistant |
protected void |
setLicensingWizardOptions(int anOptions)
|
void |
showAboutDialog()
Shows About dialog which displays product and company information, license details, company logo and copyright note |
boolean |
updateLicenseFromLicensingServer()
Utility method that allows to update license from Licensing Server. |
boolean |
upgradeLicense(java.awt.Component anOwner)
Provides ability to upgrade existing license by showing Licensing Assistant to the user allowing him/her to use various ways to get upgrade. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected java.awt.Component fOwner
protected javax.swing.ImageIcon fLicensingWizardLogo
protected javax.swing.ImageIcon fActivationWizardLogo
protected int fLicensingWizardOptions
protected int fActivationWizardOptions
protected javax.swing.ImageIcon fDeactivationWizardLogo
protected int fDeactivationWizardOptions
protected javax.swing.ImageIcon fLicenseLockWizardLogo
protected int fLicenseLockWizardOptions
static java.util.ResourceBundle res
protected static final java.text.MessageFormat FMT_CHECKOUT_SUCCESS
protected static final java.text.MessageFormat FMT_CHECKOUT_FAIL
Constructor Detail |
---|
public ProtectionLauncher(ProtectionLauncherConfig aLauncherConfig)
aLauncherConfig
- launcher configurationpublic ProtectionLauncher(ProtectionLauncherConfig aLauncherConfig, java.awt.Component anOwner)
aLauncherConfig
- launcher configurationanOwner
- owner for all dialogs can be shown by the launcherpublic ProtectionLauncher(ProtectionLauncherConfig aLauncherConfig, java.awt.Component anOwner, LicenseReader aLicenseReader)
aLauncherConfig
- launcher configurationanOwner
- owner for all dialogs can be shown by the launcheraLicenseReader
- LicenseReader custom license reader should be used by the launcher to locate
and read licensesMethod Detail |
---|
public void showAboutDialog()
protected void initLicenseReader()
initLicenseReader
in class HeadlessProtectionLauncher
public void init()
HeadlessProtectionLauncher
init
in class HeadlessProtectionLauncher
protected LicenseReaderIssueResolver createLicenseReaderIssueResolver()
createLicenseReaderIssueResolver
in class HeadlessProtectionLauncher
protected void initLicenseListener()
initLicenseListener
in class HeadlessProtectionLauncher
protected void initLicenseHost()
initLicenseHost
in class HeadlessProtectionLauncher
protected LicenseHostIssueResolver createLicenseHostIssueResolver()
createLicenseHostIssueResolver
in class HeadlessProtectionLauncher
protected LicenseAcceptanceDelegate createLicenseAcceptanceDelegate()
createLicenseAcceptanceDelegate
in class HeadlessProtectionLauncher
protected LicenseHost createLicenseHost()
createLicenseHost
in class HeadlessProtectionLauncher
protected void initProfessional(ProtectionLauncherConfig config)
initProfessional
in class HeadlessProtectionLauncher
protected javax.swing.ImageIcon loadIcon(java.lang.String aFileName, java.lang.String aResource)
public void setLicensingWizardLogo(javax.swing.ImageIcon aLicensingWizardLogo)
aLicensingWizardLogo
- image to specifypublic void setActivationWizardLogo(javax.swing.ImageIcon anActivationWizardLogo)
anActivationWizardLogo
- image to specifyprotected void setLicensingWizardOptions(int anOptions)
protected void setActivationWizardOptions(int anOptions)
protected void setDeactivationWizardLogo(javax.swing.ImageIcon aDeactivationWizardLogo)
protected void setDeactivationWizardOptions(int anOptions)
protected void setLicenseLockWizardLogo(javax.swing.ImageIcon aLicenseLockWizardLogo)
protected void setLicenseLockWizardOptions(int anOptions)
public boolean upgradeLicense(java.awt.Component anOwner)
anOwner
- a component from which Licensing Assistant should be displayed
true
if new license is acquired, properly read and validated;
false
otherwiseprotected LicensingWizard createLicensingWizard(java.awt.Component anOwner)
public int deactivateLicense(java.awt.Component anOwner)
anOwner
- a component from which Deactivation Assistant should be displayed
LicenseDeactivationWizard.DEACTIVATE_
constants.protected LicenseDeactivationWizard createLicenseDeactivationWizard(java.awt.Component anOwner)
public static ProtectionLauncher getProtectionLauncher(ProtectionLauncherConfigReader aReader, java.lang.Class aBaseCLass, java.lang.String aLauncherConfigResourceName, java.awt.Component anOwner, LicenseReader aLicenseReader) throws java.io.IOException
aReader
- reader used to read launcher configurationaBaseCLass
- base class used to to load configuration resourceaLauncherConfigResourceName
- name of resourceanOwner
- owner for all dialogs can be shown by the launcheraLicenseReader
- LicenseReader custom license reader should be used by the launcher to locate
and read licenses
java.io.IOException
- when any error occured during configuration loadpublic static ProtectionLauncher getProtectionLauncher(ProtectionLauncherConfigReader aReader, java.lang.Class aBaseCLass, java.lang.String aLauncherConfigResourceName, java.awt.Component anOwner) throws java.io.IOException
aReader
- reader used to read launcher configurationaBaseCLass
- base class used to to load configuration resourceaLauncherConfigResourceName
- name of resourceanOwner
- owner for all dialogs can be shown by the launcher
java.io.IOException
- when any error occured during configuration loadpublic static ProtectionLauncher getProtectionLauncher(ProtectionLauncherConfigReader aReader, java.lang.Class aBaseCLass, java.lang.String aLauncherConfigResourceName) throws java.io.IOException
aReader
- reader used to read launcher configurationaBaseCLass
- base class used to to load configuration resourceaLauncherConfigResourceName
- name of resource
java.io.IOException
- when any error occured during configuration loadpublic void setAutoUpdateLicenseFromLicensingServer(boolean autoUpdateLicenseFromLicensingServer)
getLicenseReader().getIssueResolver()
is not an instance of
DefaultLicenseReaderIssueResolverPro
this call does nothing.
autoUpdateLicenseFromLicensingServer
- true
if automatic update of license from Licening Server should be enabled;
false
otherwise.public boolean isAutoUpdateLicenseFromLicensingServer()
true
if automatic update of license from Licensing Server is enabled;
false
otherwise.public boolean updateLicenseFromLicensingServer()
true
if update was successful; false
otherwisepublic boolean checkoutLicense()
checkoutLicense
in class HeadlessProtectionLauncher
true
if license has been successfully checked out; false
otherwisepublic boolean checkoutLicense(boolean isShowMessage)
isShowMessage
- true
if a message with the result of operation should be shown; false
otherwise
true
if license has been successfully checked out; false
otherwise
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |