Package org.exoplatform.commons.info
Class ProductInformations
- java.lang.Object
-
- org.exoplatform.commons.info.ProductInformations
-
- All Implemented Interfaces:
org.picocontainer.Startable
public class ProductInformations extends Object implements org.picocontainer.Startable
- Version:
- $Revision$
- Author:
- Anouar Chattouna
-
-
Field Summary
Fields Modifier and Type Field Description static StringDELAYstatic StringEDITIONstatic StringENTERPRISE_EDITIONstatic StringEXPRESS_EDITIONstatic StringKEY_GENERATION_DATEstatic StringNB_USERSstatic StringPRODUCT_BUILD_NUMBERstatic StringPRODUCT_CODEstatic StringPRODUCT_GROUP_IDstatic StringPRODUCT_INFORMATIONstatic StringPRODUCT_KEYstatic StringPRODUCT_NAMEstatic StringPRODUCT_REVISIONstatic StringPRODUCT_VERSION_DECLARATION_NODE_NAMEnode name where the Product version declaration isstatic StringPRODUCT_VERSIONS_DECLARATION_FILEstatic StringUPGRADE_PRODUCT_SERVICE_NODE_NAMEService application data node namestatic StringWORKING_WORSPACE_NAME
-
Constructor Summary
Constructors Constructor Description ProductInformations(org.exoplatform.container.configuration.ConfigurationManager cmanager, org.exoplatform.container.xml.InitParams initParams, org.exoplatform.commons.api.settings.SettingService settingService)
-
Method Summary
-
-
-
Field Detail
-
PRODUCT_INFORMATION
public static final String PRODUCT_INFORMATION
- See Also:
- Constant Field Values
-
ENTERPRISE_EDITION
public static final String ENTERPRISE_EDITION
- See Also:
- Constant Field Values
-
EXPRESS_EDITION
public static final String EXPRESS_EDITION
- See Also:
- Constant Field Values
-
EDITION
public static final String EDITION
- See Also:
- Constant Field Values
-
KEY_GENERATION_DATE
public static final String KEY_GENERATION_DATE
- See Also:
- Constant Field Values
-
DELAY
public static final String DELAY
- See Also:
- Constant Field Values
-
PRODUCT_CODE
public static final String PRODUCT_CODE
- See Also:
- Constant Field Values
-
PRODUCT_KEY
public static final String PRODUCT_KEY
- See Also:
- Constant Field Values
-
NB_USERS
public static final String NB_USERS
- See Also:
- Constant Field Values
-
PRODUCT_NAME
public static final String PRODUCT_NAME
- See Also:
- Constant Field Values
-
PRODUCT_GROUP_ID
public static final String PRODUCT_GROUP_ID
- See Also:
- Constant Field Values
-
PRODUCT_REVISION
public static final String PRODUCT_REVISION
- See Also:
- Constant Field Values
-
PRODUCT_BUILD_NUMBER
public static final String PRODUCT_BUILD_NUMBER
- See Also:
- Constant Field Values
-
WORKING_WORSPACE_NAME
public static final String WORKING_WORSPACE_NAME
- See Also:
- Constant Field Values
-
PRODUCT_VERSIONS_DECLARATION_FILE
public static final String PRODUCT_VERSIONS_DECLARATION_FILE
- See Also:
- Constant Field Values
-
UPGRADE_PRODUCT_SERVICE_NODE_NAME
public static final String UPGRADE_PRODUCT_SERVICE_NODE_NAME
Service application data node name- See Also:
- Constant Field Values
-
PRODUCT_VERSION_DECLARATION_NODE_NAME
public static final String PRODUCT_VERSION_DECLARATION_NODE_NAME
node name where the Product version declaration is- See Also:
- Constant Field Values
-
-
Method Detail
-
getEdition
public String getEdition()
-
getNumberOfUsers
public String getNumberOfUsers()
-
getDateOfLicence
public String getDateOfLicence()
-
getDuration
public String getDuration()
-
getProductName
public String getProductName()
-
getProductCode
public String getProductCode()
-
getProductKey
public String getProductKey()
-
getVersion
public String getVersion() throws MissingProductInformationException
- Returns:
- This method returns the current product's version.
- Throws:
MissingProductInformationException
-
getVersion
public String getVersion(String productGroupId) throws MissingProductInformationException
- Returns:
- This method return the product version, selected by its maven groupId.
- Throws:
MissingProductInformationException
-
getBuildNumber
public String getBuildNumber() throws MissingProductInformationException
- Returns:
- the product.buildNumber property value.
- Throws:
MissingProductInformationException
-
getRevision
public String getRevision() throws MissingProductInformationException
- Returns:
- the product.revision property value.
- Throws:
MissingProductInformationException
-
getCurrentProductGroupId
public String getCurrentProductGroupId() throws MissingProductInformationException
- Returns:
- the current product's maven group id.
- Throws:
MissingProductInformationException
-
getPreviousVersion
public String getPreviousVersion() throws MissingProductInformationException
- Returns:
- the platform.version property. This method return the platform version.
- Throws:
MissingProductInformationException
-
getPreviousVersion
public String getPreviousVersion(String productGroupId) throws MissingProductInformationException
- Returns:
- the platform.version property. This method return the platform version.
- Throws:
MissingProductInformationException
-
getPreviousBuildNumber
public String getPreviousBuildNumber() throws MissingProductInformationException
- Returns:
- an empty string if the properties file is not found, otherwise the platform.buildNumber property. This method return the build number of the platform.
- Throws:
MissingProductInformationException
-
getPreviousRevision
public String getPreviousRevision() throws MissingProductInformationException
- Returns:
- the value of product.revision property. This method return the current revison of the platform.
- Throws:
MissingProductInformationException
-
isFirstRun
public boolean isFirstRun()
-
start
public void start()
This service will store the declared product versions at startup.- Specified by:
startin interfaceorg.picocontainer.Startable
-
stop
public void stop()
This method is called by eXo Kernel when stopping the parent ExoContainer- Specified by:
stopin interfaceorg.picocontainer.Startable
-
initProductInformation
public void initProductInformation(Properties properties)
-
setUnlockInformation
public void setUnlockInformation(Properties unlockInformation)
-
setPreviousVersionsIfFirstRun
public void setPreviousVersionsIfFirstRun(String defaultVersion)
-
setProductInformationProperties
public void setProductInformationProperties(Properties productInformationProperties)
-
getProductInformationProperties
public Properties getProductInformationProperties()
-
setFirstRun
public void setFirstRun(boolean firstRun)
-
-