Package chemaxon.license
Class LicenseManager
- java.lang.Object
-
- chemaxon.license.LicenseManager
-
@PublicAPI public class LicenseManager extends Object
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
Fields Modifier and Type Field Description static String
ALIGNMENT
Identifier of product: Alignmentstatic String
CALCULATIONS_PACK
Identifier of product: Calculations Packstatic String
CARTRIDGE
Identifier of product: JChem Cartridgestatic String
CHARGE_PLUGIN_GROUP
Identifier of plugin: Charge Plugin Groupstatic String
CHEM_CURATOR_COMPOUND
Identifier of product: ChemCurator Compoundstatic String
CHEM_CURATOR_FULL
Identifier of product: ChemCurator Fullstatic String
CHEMLOCATOR_PERSONAL
Identifier of product: ChemLocator Personalstatic String
CHEMLOCATOR_SERVER
Identifier of product: ChemLocator Serverstatic String
CONFORMATION_PLUGIN_GROUP
Identifier of plugin: Conformation Plugin Groupstatic String
DOCUMENT_TO_STRUCTURE
Identifier of product: Document to Structurestatic String
ECFP_FCFP
Identifier of product: Molecular Descriptorsstatic String
FRAGMENTER
Identifier of product: Fragmenterstatic String
GEOMETRY_PLUGIN_GROUP
Identifier of plugin: Geometry Plugin Groupstatic String
HBDA_PLUGIN
Identifier of plugin: HBDA Pluginstatic String
HUCKEL_ANALYSIS_PLUGIN
Identifier of plugin: Huckel Analysis Pluginstatic String
INSTANT_JCHEM
Identifier of product: Instant JChemstatic String
INSTANT_JCHEM_PIVOTING
Identifier of product: Instant JChem Pivotingstatic String
INSTANT_JCHEM_SERVER
Identifier of product: Instant JChem Serverstatic String
INSTANT_JCHEM_VIZ
Identifier of product: Instant JChem VIZstatic String
ISOMERS_PLUGIN_GROUP
Identifier of plugin: Isomers Plugin Groupstatic String
JCHEM
Identifier of product: JChem Basestatic String
JCHEM_FOR_EXCEL
Identifier of product: JChem for Excelstatic String
JCHEM_FOR_OFFICE
Identifier of product: JChem for Officestatic String
JCHEM_FOR_SHAREPOINT
Identifier of product: JChem for SharePointstatic String
JCHEM_FOR_SHAREPOINT_SEARCH
Identifier of product: JChem for SharePoint Searchstatic String
JKLUSTOR
Identifier of product: JKlustorstatic String
MARKUSH_EDITOR
Identifier of product: Markush Editorstatic String
MARKUSH_ENUM_PLUGIN
Identifier of plugin: Markush Enumeration Pluginstatic String
MARKUSH_SEARCH
Identifier of product: Markush Searchstatic String
MARVIN_APPLETS
Identifier of product: Marvin Appletsstatic String
MARVIN_BEANS
Identifier of product: Marvin Beansstatic String
MCES
Identifier of product: MCESstatic String
METABOLIZER
Identifier of product: Metabolizerstatic String
MOLECULAR_DESCRIPTORS
Identifier of product: Molecular Descriptorsstatic String
NAME_TO_STRUCTURE
Identifier of product: Name to Structurestatic String
NMR
Identifier of product: NMR pluginstatic String
PARTITIONING_PLUGIN_GROUP
Identifier of plugin: Partitioning Plugin Groupstatic String
PLEXUS
Identifier of product: Plexusstatic String
PLEXUS_CONNECT
Identifier of product: Plexus Connectstatic String
POSTGRES_CARTRIDGE
Identifier of product: Postgres Cartridgestatic String
PREDICTOR_PLUGIN
Identifier of product: Predictor Pluginstatic String
PROTONATION_PLUGIN_GROUP
Identifier of plugin: Protonation Plugin Groupstatic String
REACTOR
Identifier of product: Reactorstatic String
REFRACTIVITY_PLUGIN
Identifier of plugin: Refractivity Pluginstatic String
REGISTRATION_SYSTEM
Identifier of product: Structure Checkerstatic String
SCREEN
Identifier of product: Screenstatic String
SCREEN3D
Identifier of product: 3D Screenstatic String
STANDARDIZER
Identifier of product: Standardizerstatic String
STRUCTURAL_FRAMEWORKS_PLUGIN
Identifier of product: Structural Frameworks Pluginstatic String
STRUCTURE_CHECKER
Identifier of product: Structure Checkerstatic String
STRUCTURE_TO_NAME
Identifier of product: Structure to Namestatic String
WEB_SERVICES_SERVER
Identifier of product: Web Services Server
-
Constructor Summary
Constructors Constructor Description LicenseManager()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static JPanel
createLicenseManagerPanel()
Creates the main panel which is used for end-user license managing.static String
getLicenseExceptionMessage()
Returns the common message used at license problems.static JPanel
getLicenseExceptionPanel(chemaxon.license.LicenseException exc)
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.static ArrayList<String>
getPluginList()
Returns the list of the plugin identifiers known by the license manager.static ArrayList<String>
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 Detail
-
MARVIN_APPLETS
public static final String MARVIN_APPLETS
Identifier of product: Marvin Applets- See Also:
- Constant Field Values
-
MARVIN_BEANS
public static final String MARVIN_BEANS
Identifier of product: Marvin Beans- See Also:
- Constant Field Values
-
INSTANT_JCHEM
public static final String INSTANT_JCHEM
Identifier of product: Instant JChem- See Also:
- Constant Field Values
-
INSTANT_JCHEM_VIZ
public static final String INSTANT_JCHEM_VIZ
Identifier of product: Instant JChem VIZ- See Also:
- Constant Field Values
-
INSTANT_JCHEM_SERVER
public static final String INSTANT_JCHEM_SERVER
Identifier of product: Instant JChem Server- See Also:
- Constant Field Values
-
INSTANT_JCHEM_PIVOTING
public static final String INSTANT_JCHEM_PIVOTING
Identifier of product: Instant JChem Pivoting- See Also:
- Constant Field Values
-
JCHEM
public static final String JCHEM
Identifier of product: JChem Base- See Also:
- Constant Field Values
-
CARTRIDGE
public static final String CARTRIDGE
Identifier of product: JChem Cartridge- See Also:
- Constant Field Values
-
POSTGRES_CARTRIDGE
public static final String POSTGRES_CARTRIDGE
Identifier of product: Postgres Cartridge- See Also:
- Constant Field Values
-
STANDARDIZER
public static final String STANDARDIZER
Identifier of product: Standardizer- See Also:
- Constant Field Values
-
SCREEN
public static final String SCREEN
Identifier of product: Screen- See Also:
- Constant Field Values
-
MCES
public static final String MCES
Identifier of product: MCES- See Also:
- Constant Field Values
-
SCREEN3D
public static final String SCREEN3D
Identifier of product: 3D Screen- See Also:
- Constant Field Values
-
ALIGNMENT
public static final String ALIGNMENT
Identifier of product: Alignment- See Also:
- Constant Field Values
-
MOLECULAR_DESCRIPTORS
public static final String MOLECULAR_DESCRIPTORS
Identifier of product: Molecular Descriptors- See Also:
- Constant Field Values
-
ECFP_FCFP
public static final String ECFP_FCFP
Identifier of product: Molecular Descriptors- See Also:
- Constant Field Values
-
REACTOR
public static final String REACTOR
Identifier of product: Reactor- See Also:
- Constant Field Values
-
FRAGMENTER
public static final String FRAGMENTER
Identifier of product: Fragmenter- See Also:
- Constant Field Values
-
JKLUSTOR
public static final String JKLUSTOR
Identifier of product: JKlustor- See Also:
- Constant Field Values
-
METABOLIZER
public static final String METABOLIZER
Identifier of product: Metabolizer- See Also:
- Constant Field Values
-
MARKUSH_EDITOR
public static final String MARKUSH_EDITOR
Identifier of product: Markush Editor- See Also:
- Constant Field Values
-
MARKUSH_SEARCH
public static final String MARKUSH_SEARCH
Identifier of product: Markush Search- See Also:
- Constant Field Values
-
CHEM_CURATOR_COMPOUND
public static final String CHEM_CURATOR_COMPOUND
Identifier of product: ChemCurator Compound- See Also:
- Constant Field Values
-
CHEM_CURATOR_FULL
public static final String CHEM_CURATOR_FULL
Identifier of product: ChemCurator Full- See Also:
- Constant Field Values
-
NAME_TO_STRUCTURE
public static final String NAME_TO_STRUCTURE
Identifier of product: Name to Structure- See Also:
- Constant Field Values
-
DOCUMENT_TO_STRUCTURE
public static final String DOCUMENT_TO_STRUCTURE
Identifier of product: Document to Structure- See Also:
- Constant Field Values
-
STRUCTURE_TO_NAME
public static final String STRUCTURE_TO_NAME
Identifier of product: Structure to Name- See Also:
- Constant Field Values
-
JCHEM_FOR_EXCEL
public static final String JCHEM_FOR_EXCEL
Identifier of product: JChem for Excel- See Also:
- Constant Field Values
-
JCHEM_FOR_OFFICE
public static final String JCHEM_FOR_OFFICE
Identifier of product: JChem for Office- See Also:
- Constant Field Values
-
CALCULATIONS_PACK
public static final String CALCULATIONS_PACK
Identifier of product: Calculations Pack- See Also:
- Constant Field Values
-
WEB_SERVICES_SERVER
public static final String WEB_SERVICES_SERVER
Identifier of product: Web Services Server- See Also:
- Constant Field Values
-
JCHEM_FOR_SHAREPOINT
public static final String JCHEM_FOR_SHAREPOINT
Identifier of product: JChem for SharePoint- See Also:
- Constant Field Values
-
JCHEM_FOR_SHAREPOINT_SEARCH
public static final String JCHEM_FOR_SHAREPOINT_SEARCH
Identifier of product: JChem for SharePoint Search- See Also:
- Constant Field Values
-
CHEMLOCATOR_PERSONAL
public static final String CHEMLOCATOR_PERSONAL
Identifier of product: ChemLocator Personal- See Also:
- Constant Field Values
-
CHEMLOCATOR_SERVER
public static final String CHEMLOCATOR_SERVER
Identifier of product: ChemLocator Server- See Also:
- Constant Field Values
-
STRUCTURE_CHECKER
public static final String STRUCTURE_CHECKER
Identifier of product: Structure Checker- See Also:
- Constant Field Values
-
REGISTRATION_SYSTEM
public static final String REGISTRATION_SYSTEM
Identifier of product: Structure Checker- See Also:
- Constant Field Values
-
PLEXUS
public static final String PLEXUS
Identifier of product: Plexus- See Also:
- Constant Field Values
-
PROTONATION_PLUGIN_GROUP
public static final String PROTONATION_PLUGIN_GROUP
Identifier of plugin: Protonation Plugin Group- See Also:
- Constant Field Values
-
PARTITIONING_PLUGIN_GROUP
public static final String PARTITIONING_PLUGIN_GROUP
Identifier of plugin: Partitioning Plugin Group- See Also:
- Constant Field Values
-
CHARGE_PLUGIN_GROUP
public static final String CHARGE_PLUGIN_GROUP
Identifier of plugin: Charge Plugin Group- See Also:
- Constant Field Values
-
ISOMERS_PLUGIN_GROUP
public static final String ISOMERS_PLUGIN_GROUP
Identifier of plugin: Isomers Plugin Group- See Also:
- Constant Field Values
-
CONFORMATION_PLUGIN_GROUP
public static final String CONFORMATION_PLUGIN_GROUP
Identifier of plugin: Conformation Plugin Group- See Also:
- Constant Field Values
-
GEOMETRY_PLUGIN_GROUP
public static final String GEOMETRY_PLUGIN_GROUP
Identifier of plugin: Geometry Plugin Group- See Also:
- Constant Field Values
-
HUCKEL_ANALYSIS_PLUGIN
public static final String HUCKEL_ANALYSIS_PLUGIN
Identifier of plugin: Huckel Analysis Plugin- See Also:
- Constant Field Values
-
REFRACTIVITY_PLUGIN
public static final String REFRACTIVITY_PLUGIN
Identifier of plugin: Refractivity Plugin- See Also:
- Constant Field Values
-
HBDA_PLUGIN
public static final String HBDA_PLUGIN
Identifier of plugin: HBDA Plugin- See Also:
- Constant Field Values
-
MARKUSH_ENUM_PLUGIN
public static final String MARKUSH_ENUM_PLUGIN
Identifier of plugin: Markush Enumeration Plugin- See Also:
- Constant Field Values
-
STRUCTURAL_FRAMEWORKS_PLUGIN
public static final String STRUCTURAL_FRAMEWORKS_PLUGIN
Identifier of product: Structural Frameworks Plugin- See Also:
- Constant Field Values
-
PREDICTOR_PLUGIN
public static final String PREDICTOR_PLUGIN
Identifier of product: Predictor Plugin- See Also:
- Constant Field Values
-
NMR
public static final String NMR
Identifier of product: NMR plugin- See Also:
- Constant Field Values
-
PLEXUS_CONNECT
public static final String PLEXUS_CONNECT
Identifier of product: Plexus Connect- See Also:
- Constant Field Values
-
-
Method Detail
-
getProductList
public static ArrayList<String> getProductList(boolean includePlugins)
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
public static ArrayList<String> getPluginList()
Returns the list of the plugin identifiers known by the license manager.- Returns:
- list containing names as identifiers
-
getLicenseExceptionMessage
public static String getLicenseExceptionMessage()
Returns the common message used at license problems.- Returns:
- error message string
-
getLicenseExceptionPanel
public static JPanel getLicenseExceptionPanel(String product)
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
public static JPanel getLicenseExceptionPanel(chemaxon.license.LicenseException exc)
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
public static JPanel 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
public static void setLicense(String s) throws chemaxon.license.LicenseProcessingException
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
public static boolean isLicensed(String product)
Returns true if the license manager recognizes the given product to be licensed.- Parameters:
product
- identifier of a product- Returns:
- informative state value
-
-