mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-24 17:32:48 +00:00
Added support to limit module execution to a specific range of repository versions.
e.g. the PHP SDK module has the following: module.repo.version.min=2.0 module.repo.version.max=2.1 This limits it to being installed on 2.0 or 2.1 versions of Alfresco. Roy can change this, if required. git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@5532 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -50,6 +50,7 @@ import org.alfresco.service.namespace.NamespaceService;
|
||||
import org.alfresco.service.namespace.QName;
|
||||
import org.alfresco.service.transaction.TransactionService;
|
||||
import org.alfresco.util.AbstractLifecycleBean;
|
||||
import org.alfresco.util.VersionNumber;
|
||||
import org.apache.commons.logging.Log;
|
||||
import org.apache.commons.logging.LogFactory;
|
||||
import org.springframework.beans.factory.InitializingBean;
|
||||
@@ -453,6 +454,11 @@ public class DescriptorServiceImpl extends AbstractLifecycleBean implements Desc
|
||||
return "Unknown";
|
||||
}
|
||||
|
||||
public VersionNumber getVersionNumber()
|
||||
{
|
||||
return new VersionNumber("1.0.0");
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.alfresco.service.descriptor.Descriptor#getVersion()
|
||||
*/
|
||||
@@ -503,9 +509,17 @@ public class DescriptorServiceImpl extends AbstractLifecycleBean implements Desc
|
||||
*/
|
||||
public abstract class BaseDescriptor implements Descriptor
|
||||
{
|
||||
/* (non-Javadoc)
|
||||
* @see org.alfresco.service.descriptor.Descriptor#getVersion()
|
||||
*/
|
||||
public VersionNumber getVersionNumber()
|
||||
{
|
||||
StringBuilder version = new StringBuilder();
|
||||
version.append(getVersionMajor());
|
||||
version.append(".");
|
||||
version.append(getVersionMinor());
|
||||
version.append(".");
|
||||
version.append(getVersionRevision());
|
||||
return new VersionNumber(version.toString());
|
||||
}
|
||||
|
||||
public String getVersion()
|
||||
{
|
||||
StringBuilder version = new StringBuilder(getVersionMajor());
|
||||
|
Reference in New Issue
Block a user