mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-31 17:39:05 +00:00
RM-3339 - added db enterprise schema
This commit is contained in:
@@ -7,6 +7,7 @@
|
|||||||
<bean id="rm.modulePatchExecuter" parent="module.baseComponent" class="org.alfresco.module.org_alfresco_module_rm.patch.ModulePatchExecuterImpl">
|
<bean id="rm.modulePatchExecuter" parent="module.baseComponent" class="org.alfresco.module.org_alfresco_module_rm.patch.ModulePatchExecuterImpl">
|
||||||
<property name="moduleId" value="org_alfresco_module_rm"/>
|
<property name="moduleId" value="org_alfresco_module_rm"/>
|
||||||
<property name="description" value="RM patch executer"/>
|
<property name="description" value="RM patch executer"/>
|
||||||
|
<property name="moduleSchemaKeyName" value="module-schema"/>
|
||||||
<property name="sinceVersion" value="2.2"/>
|
<property name="sinceVersion" value="2.2"/>
|
||||||
<property name="executeOnceOnly" value="false"/>
|
<property name="executeOnceOnly" value="false"/>
|
||||||
<property name="moduleSchema" value="2501"/>
|
<property name="moduleSchema" value="2501"/>
|
||||||
|
@@ -55,7 +55,7 @@ public class ModulePatchExecuterImpl extends AbstractModuleComponent
|
|||||||
private static final int START_SCHEMA = 0;
|
private static final int START_SCHEMA = 0;
|
||||||
|
|
||||||
/** attribute key */
|
/** attribute key */
|
||||||
private static final String KEY_MODULE_SCHEMA = "module-schema";
|
private String moduleSchemaKeyName;
|
||||||
|
|
||||||
/** configured module schema version */
|
/** configured module schema version */
|
||||||
protected int moduleSchema = START_SCHEMA;
|
protected int moduleSchema = START_SCHEMA;
|
||||||
@@ -66,6 +66,14 @@ public class ModulePatchExecuterImpl extends AbstractModuleComponent
|
|||||||
/** module patches */
|
/** module patches */
|
||||||
protected Map<String, ModulePatch> modulePatches = new HashMap<String, ModulePatch>(21);
|
protected Map<String, ModulePatch> modulePatches = new HashMap<String, ModulePatch>(21);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param moduleSchemaKeyName configured module schema key name
|
||||||
|
*/
|
||||||
|
public void setModuleSchemaKeyName(String moduleSchemaKeyName)
|
||||||
|
{
|
||||||
|
this.moduleSchemaKeyName = moduleSchemaKeyName;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param attributeService attribute service
|
* @param attributeService attribute service
|
||||||
*/
|
*/
|
||||||
@@ -149,9 +157,9 @@ public class ModulePatchExecuterImpl extends AbstractModuleComponent
|
|||||||
protected int getCurrentSchema()
|
protected int getCurrentSchema()
|
||||||
{
|
{
|
||||||
Integer result = START_SCHEMA;
|
Integer result = START_SCHEMA;
|
||||||
if (attributeService.exists(KEY_MODULE_SCHEMA, getModuleId()))
|
if (attributeService.exists(moduleSchemaKeyName, getModuleId()))
|
||||||
{
|
{
|
||||||
result = (Integer)attributeService.getAttribute(KEY_MODULE_SCHEMA, getModuleId());
|
result = (Integer)attributeService.getAttribute(moduleSchemaKeyName, getModuleId());
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
@@ -163,7 +171,7 @@ public class ModulePatchExecuterImpl extends AbstractModuleComponent
|
|||||||
*/
|
*/
|
||||||
protected void updateSchema(int newSchema)
|
protected void updateSchema(int newSchema)
|
||||||
{
|
{
|
||||||
attributeService.setAttribute(Integer.valueOf(newSchema), KEY_MODULE_SCHEMA, getModuleId());
|
attributeService.setAttribute(Integer.valueOf(newSchema), moduleSchemaKeyName, getModuleId());
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Reference in New Issue
Block a user