org.exoplatform.commons.info
Class ProductInformations

java.lang.Object
  extended by 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
static String DELAY
           
static String EDITION
           
static String ENTERPRISE_EDITION
           
static String EXO_APPLICATIONS_DATA_NODE_ALIAS
          Constant that will be used in nodeHierarchyCreator.getJcrPath: it represents the Application data root node Alias
static String EXPRESS_EDITION
           
static String KEY_GENERATION_DATE
           
static String MIX_VERSIONABLE
          MixinType that will activate the versioning on a selected node
static String NB_USERS
           
static String PROCEED_UPGRADE_FIRST_TIME_KEY
           
static String PRODUCT_BUILD_NUMBER
           
static String PRODUCT_CODE
           
static String PRODUCT_GROUP_ID
           
static String PRODUCT_KEY
           
static String PRODUCT_REVISION
           
static String PRODUCT_VERSION_DECLARATION_NODE_NAME
          node name where the Product version declaration is
static String PRODUCT_VERSIONS_DECLARATION_FILE
           
static String UPGRADE_PRODUCT_SERVICE_NODE_NAME
          Service application data node name
static String WORKING_WORSPACE_NAME
           
 
Constructor Summary
ProductInformations(org.exoplatform.services.jcr.RepositoryService repositoryService, org.exoplatform.services.jcr.ext.app.SessionProviderService sessionProviderService, org.exoplatform.services.jcr.ext.hierarchy.NodeHierarchyCreator nodeHierarchyCreator, org.exoplatform.container.configuration.ConfigurationManager cmanager, org.exoplatform.container.xml.InitParams initParams, org.exoplatform.portal.config.UserACL userAcl)
           
 
Method Summary
 String getBuildNumber()
           
 String getCurrentProductGroupId()
           
 String getDateOfLicence()
           
 String getDuration()
           
 String getEdition()
           
 String getNumberOfUsers()
           
 String getPreviousBuildNumber()
           
 String getPreviousRevision()
           
 String getPreviousVersion()
           
 String getPreviousVersion(String productGroupId)
           
 String getProductCode()
           
 String getProductKey()
           
 String getProductVersionDeclarationNodePath()
           
 String getRevision()
           
 String getVersion()
           
 String getVersion(String productGroupId)
           
 String getWorkspaceName()
           
 boolean isFirstRun()
           
 void setPreviousVersionsIfFirstRun(String defaultVersion)
           
 void setUnlockInformation(Properties unlockInformation)
           
 void start()
          This method loads from the JCR the stored products versions.
 void stop()
          This method is called by eXo Kernel when stopping the parent ExoContainer
 void storeProductsInformationsInJCR()
           
 void storeUnlockInformation()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

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_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

PRODUCT_VERSIONS_DECLARATION_FILE

public static final String PRODUCT_VERSIONS_DECLARATION_FILE
See Also:
Constant Field Values

PROCEED_UPGRADE_FIRST_TIME_KEY

public static final String PROCEED_UPGRADE_FIRST_TIME_KEY
See Also:
Constant Field Values

WORKING_WORSPACE_NAME

public static final String WORKING_WORSPACE_NAME
See Also:
Constant Field Values

EXO_APPLICATIONS_DATA_NODE_ALIAS

public static final String EXO_APPLICATIONS_DATA_NODE_ALIAS
Constant that will be used in nodeHierarchyCreator.getJcrPath: it represents the Application data root node Alias

See Also:
Constant Field Values

MIX_VERSIONABLE

public static final String MIX_VERSIONABLE
MixinType that will activate the versioning on a selected node

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
Constructor Detail

ProductInformations

public ProductInformations(org.exoplatform.services.jcr.RepositoryService repositoryService,
                           org.exoplatform.services.jcr.ext.app.SessionProviderService sessionProviderService,
                           org.exoplatform.services.jcr.ext.hierarchy.NodeHierarchyCreator nodeHierarchyCreator,
                           org.exoplatform.container.configuration.ConfigurationManager cmanager,
                           org.exoplatform.container.xml.InitParams initParams,
                           org.exoplatform.portal.config.UserACL userAcl)
Method Detail

getEdition

public String getEdition()
                  throws MissingProductInformationException
Throws:
MissingProductInformationException

getNumberOfUsers

public String getNumberOfUsers()
                        throws MissingProductInformationException
Throws:
MissingProductInformationException

getDateOfLicence

public String getDateOfLicence()
                        throws MissingProductInformationException
Throws:
MissingProductInformationException

getDuration

public String getDuration()
                   throws MissingProductInformationException
Throws:
MissingProductInformationException

getProductCode

public String getProductCode()
                      throws MissingProductInformationException
Throws:
MissingProductInformationException

getProductKey

public String getProductKey()
                     throws MissingProductInformationException
Throws:
MissingProductInformationException

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 method loads from the JCR the stored products versions. If it's the first server start up, then store the declared one.

Specified by:
start in interface org.picocontainer.Startable

stop

public void stop()
This method is called by eXo Kernel when stopping the parent ExoContainer

Specified by:
stop in interface org.picocontainer.Startable

storeUnlockInformation

public void storeUnlockInformation()

storeProductsInformationsInJCR

public void storeProductsInformationsInJCR()

setUnlockInformation

public void setUnlockInformation(Properties unlockInformation)

getWorkspaceName

public String getWorkspaceName()

getProductVersionDeclarationNodePath

public String getProductVersionDeclarationNodePath()

setPreviousVersionsIfFirstRun

public void setPreviousVersionsIfFirstRun(String defaultVersion)


Copyright © 2003–2014 eXo Platform SAS. All rights reserved.