Package chemaxon.license
Class LicenseManager
java.lang.Object
chemaxon.license.LicenseManager
LicenseManager is a helper class to manage licenses of Chemaxon products.
The licenses are stored in xml files (license.cxl) and are digitally signatured by Chemaxon.
The default location of the license file is USER_HOME/chemaxon/license.cxl,
but this can arbitrarily be changed.
The old license files (licenses.dat) are supported till September 2008.
- Since:
- Marvin 5.0.1
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final String
Identifier of product: Alignmentstatic final String
Identifier of product: Calculations Packstatic final String
Identifier of product: JChem Cartridgestatic final String
Identifier of plugin: Charge Plugin Groupstatic final String
Identifier of product: ChemCurator Compoundstatic final String
Identifier of product: ChemCurator Fullstatic final String
Identifier of product: ChemLocator Personalstatic final String
Identifier of product: ChemLocator Serverstatic final String
Identifier of plugin: Conformation Plugin Groupstatic final String
Identifier of product: Document to Structurestatic final String
Identifier of product: Molecular Descriptorsstatic final String
Identifier of product: Fragmenterstatic final String
Identifier of plugin: Geometry Plugin Groupstatic final String
Identifier of plugin: HBDA Pluginstatic final String
Identifier of plugin: Huckel Analysis Pluginstatic final String
Identifier of product: Instant JChemstatic final String
Identifier of product: Instant JChem Pivotingstatic final String
Identifier of product: Instant JChem Serverstatic final String
Identifier of product: Instant JChem VIZstatic final String
Identifier of plugin: Isomers Plugin Groupstatic final String
Identifier of product: JChem Basestatic final String
Identifier of product: JChem for Excelstatic final String
Identifier of product: JChem for Officestatic final String
Identifier of product: JChem for SharePointstatic final String
Identifier of product: JChem for SharePoint Searchstatic final String
Identifier of product: JKlustorstatic final String
Identifier of product: Markush Editorstatic final String
Identifier of plugin: Markush Enumeration Pluginstatic final String
Identifier of product: Markush Searchstatic final String
Identifier of product: Marvin Appletsstatic final String
Identifier of product: Marvin Beansstatic final String
Identifier of product: MCESstatic final String
Identifier of product: Metabolizerstatic final String
Identifier of product: Molecular Descriptorsstatic final String
Identifier of product: Name to Structurestatic final String
Identifier of product: NMR pluginstatic final String
Identifier of plugin: Partitioning Plugin Groupstatic final String
Identifier of product: Plexusstatic final String
Identifier of product: Plexus Connectstatic final String
Identifier of product: Postgres Cartridgestatic final String
Identifier of product: Predictor Pluginstatic final String
Identifier of plugin: Protonation Plugin Groupstatic final String
Identifier of product: Reactorstatic final String
Identifier of plugin: Refractivity Pluginstatic final String
Identifier of product: Structure Checkerstatic final String
Identifier of product: Screenstatic final String
Identifier of product: 3D Screenstatic final String
Identifier of product: Standardizerstatic final String
Identifier of product: Structural Frameworks Pluginstatic final String
Identifier of product: Structure Checkerstatic final String
Identifier of product: Structure to Namestatic final String
Identifier of product: Web Services Server -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic JPanel
Creates the main panel which is used for end-user license managing.static String
Returns the common message used at license problems.static JPanel
Returns the common swing component used to indicate missing license.static JPanel
getLicenseExceptionPanel
(String product) Returns the common swing component used to indicate missing license.Returns the list of the plugin identifiers known by the license manager.getProductList
(boolean includePlugins) Returns the list of the product identifiers known by the license manager.static boolean
isLicensed
(String product) Returns true if the license manager recognizes the given product to be licensed.static void
refresh()
Re-reads licenses from the default locations.static void
setLicense
(String s) Sets a pre-read license file to the license manager to read and validate licenses from.static void
setLicenseFile
(String licensePath) Sets the license file location to the license manager to read and validate licenses from.
-
Field Details
-
MARVIN_APPLETS
Identifier of product: Marvin Applets- See Also:
-
MARVIN_BEANS
Identifier of product: Marvin Beans- See Also:
-
INSTANT_JCHEM
Identifier of product: Instant JChem- See Also:
-
INSTANT_JCHEM_VIZ
Identifier of product: Instant JChem VIZ- See Also:
-
INSTANT_JCHEM_SERVER
Identifier of product: Instant JChem Server- See Also:
-
INSTANT_JCHEM_PIVOTING
Identifier of product: Instant JChem Pivoting- See Also:
-
JCHEM
Identifier of product: JChem Base- See Also:
-
CARTRIDGE
Identifier of product: JChem Cartridge- See Also:
-
POSTGRES_CARTRIDGE
Identifier of product: Postgres Cartridge- See Also:
-
STANDARDIZER
Identifier of product: Standardizer- See Also:
-
SCREEN
Identifier of product: Screen- See Also:
-
MCES
Identifier of product: MCES- See Also:
-
SCREEN3D
Identifier of product: 3D Screen- See Also:
-
ALIGNMENT
Identifier of product: Alignment- See Also:
-
MOLECULAR_DESCRIPTORS
Identifier of product: Molecular Descriptors- See Also:
-
ECFP_FCFP
Identifier of product: Molecular Descriptors- See Also:
-
REACTOR
Identifier of product: Reactor- See Also:
-
FRAGMENTER
Identifier of product: Fragmenter- See Also:
-
JKLUSTOR
Identifier of product: JKlustor- See Also:
-
METABOLIZER
Identifier of product: Metabolizer- See Also:
-
MARKUSH_EDITOR
Identifier of product: Markush Editor- See Also:
-
MARKUSH_SEARCH
Identifier of product: Markush Search- See Also:
-
CHEM_CURATOR_COMPOUND
Identifier of product: ChemCurator Compound- See Also:
-
CHEM_CURATOR_FULL
Identifier of product: ChemCurator Full- See Also:
-
NAME_TO_STRUCTURE
Identifier of product: Name to Structure- See Also:
-
DOCUMENT_TO_STRUCTURE
Identifier of product: Document to Structure- See Also:
-
STRUCTURE_TO_NAME
Identifier of product: Structure to Name- See Also:
-
JCHEM_FOR_EXCEL
Identifier of product: JChem for Excel- See Also:
-
JCHEM_FOR_OFFICE
Identifier of product: JChem for Office- See Also:
-
CALCULATIONS_PACK
Identifier of product: Calculations Pack- See Also:
-
WEB_SERVICES_SERVER
Identifier of product: Web Services Server- See Also:
-
JCHEM_FOR_SHAREPOINT
Identifier of product: JChem for SharePoint- See Also:
-
JCHEM_FOR_SHAREPOINT_SEARCH
Identifier of product: JChem for SharePoint Search- See Also:
-
CHEMLOCATOR_PERSONAL
Identifier of product: ChemLocator Personal- See Also:
-
CHEMLOCATOR_SERVER
Identifier of product: ChemLocator Server- See Also:
-
STRUCTURE_CHECKER
Identifier of product: Structure Checker- See Also:
-
REGISTRATION_SYSTEM
Identifier of product: Structure Checker- See Also:
-
PLEXUS
Identifier of product: Plexus- See Also:
-
PROTONATION_PLUGIN_GROUP
Identifier of plugin: Protonation Plugin Group- See Also:
-
PARTITIONING_PLUGIN_GROUP
Identifier of plugin: Partitioning Plugin Group- See Also:
-
CHARGE_PLUGIN_GROUP
Identifier of plugin: Charge Plugin Group- See Also:
-
ISOMERS_PLUGIN_GROUP
Identifier of plugin: Isomers Plugin Group- See Also:
-
CONFORMATION_PLUGIN_GROUP
Identifier of plugin: Conformation Plugin Group- See Also:
-
GEOMETRY_PLUGIN_GROUP
Identifier of plugin: Geometry Plugin Group- See Also:
-
HUCKEL_ANALYSIS_PLUGIN
Identifier of plugin: Huckel Analysis Plugin- See Also:
-
REFRACTIVITY_PLUGIN
Identifier of plugin: Refractivity Plugin- See Also:
-
HBDA_PLUGIN
Identifier of plugin: HBDA Plugin- See Also:
-
MARKUSH_ENUM_PLUGIN
Identifier of plugin: Markush Enumeration Plugin- See Also:
-
STRUCTURAL_FRAMEWORKS_PLUGIN
Identifier of product: Structural Frameworks Plugin- See Also:
-
PREDICTOR_PLUGIN
Identifier of product: Predictor Plugin- See Also:
-
NMR
Identifier of product: NMR plugin- See Also:
-
PLEXUS_CONNECT
Identifier of product: Plexus Connect- See Also:
-
-
Constructor Details
-
LicenseManager
public LicenseManager()
-
-
Method Details
-
getProductList
Returns the list of the product identifiers known by the license manager.- Parameters:
includePlugins
- whether the list should contain the name of the plugins as well- Returns:
- list containing names as identifiers
-
getPluginList
Returns the list of the plugin identifiers known by the license manager.- Returns:
- list containing names as identifiers
-
getLicenseExceptionMessage
Returns the common message used at license problems.- Returns:
- error message string
-
getLicenseExceptionPanel
Returns the common swing component used to indicate missing license.- Parameters:
product
- identifier of a product- Returns:
- JPanel with detailed information about the missing license
-
getLicenseExceptionPanel
Returns the common swing component used to indicate missing license.- Parameters:
exc
- a LicenseException thrown at license checking- Returns:
- JPanel with detailed information about the missing license
-
createLicenseManagerPanel
Creates the main panel which is used for end-user license managing.- Returns:
- JPanel
-
setLicenseFile
public static void setLicenseFile(String licensePath) throws chemaxon.license.LicenseProcessingException Sets the license file location to the license manager to read and validate licenses from. This additive setting will not clear already read licenses. The old license file,licenses.dat
is not allowed to set for security reasons.- Parameters:
licensePath
- path of the license file that can be absolute file location or URL- Throws:
chemaxon.license.LicenseProcessingException
- when a problem occurs reading or validating licenses
-
setLicense
Sets a pre-read license file to the license manager to read and validate licenses from. This additive setting will not clear already read licenses. Non-server mode licenses and the old license keys are not allowed to set with this method for security reasons.- Parameters:
s
- license file content as String- Throws:
chemaxon.license.LicenseProcessingException
- when a problem occurs reading or validating licenses
-
refresh
public static void refresh()Re-reads licenses from the default locations. -
isLicensed
Returns true if the license manager recognizes the given product to be licensed.- Parameters:
product
- identifier of a product- Returns:
- informative state value
-