diff --git a/rm-server/config/alfresco/module/org_alfresco_module_rm/dod5015/dod5015-model.properties b/rm-server/config/alfresco/module/org_alfresco_module_rm/dod5015/dod5015-model.properties
index 235924f786..d5ebc66db5 100644
--- a/rm-server/config/alfresco/module/org_alfresco_module_rm/dod5015/dod5015-model.properties
+++ b/rm-server/config/alfresco/module/org_alfresco_module_rm/dod5015/dod5015-model.properties
@@ -1,13 +1,7 @@
dod_dod5015.description=DOD5015 Content Model
-
-dod_dod5015.type.dod_filePlan.title=File Plan
-dod_dod5015.type.dod_filePlan.description=File Plan
-dod_dod5015.type.dod_recordSeries.title=Record Series
-dod_dod5015.type.dod_recordSeries.description=Record Series
-
-dod_dod5015.type.dod_recordCategory.title=Record Category
-dod_dod5015.type.dod_recordCategory.description=Record Category
+dod_dod5015.type.dod_recordSeries.title=Record Series (Deprecated)
+dod_dod5015.type.dod_recordSeries.description=Record Series (Deprecated)
dod_dod5015.aspect.dod_scannedRecord.title=Scanned Record
dod_dod5015.aspect.dod_scannedRecord.description=Scanned Record
@@ -77,6 +71,3 @@ dod_dod5015.property.dod_contact.description=Contact
dod_dod5015.property.dod_contentManagementSystem.title=Content Management System
dod_dod5015.property.dod_contentManagementSystem.description=Content Management System
-dod_dod5015.aspect.dod_ghosted.title=Ghosted Record
-dod_dod5015.aspect.dod_ghosted.description=Ghosted Record
-
diff --git a/rm-server/config/alfresco/module/org_alfresco_module_rm/messages/records-model.properties b/rm-server/config/alfresco/module/org_alfresco_module_rm/messages/records-model.properties
index 46622281e4..f738bd34e3 100644
--- a/rm-server/config/alfresco/module/org_alfresco_module_rm/messages/records-model.properties
+++ b/rm-server/config/alfresco/module/org_alfresco_module_rm/messages/records-model.properties
@@ -270,4 +270,7 @@ rma_recordsmanagement.property.rma_updatedProperties.description=The updated pro
rma_recordsmanagement.property.rma_publishInProgress.title=Publish In Progress
rma_recordsmanagement.property.rma_publishInProgress.description=Indicates whether a publish is currently in progress
+rma_recordsmanagement.aspect.dod_ghosted.title=Ghosted Record
+rma_recordsmanagement.aspect.dod_ghosted.description=Ghosted Record
+
\ No newline at end of file
diff --git a/rm-server/source/compatibility/org/alfresco/module/org_alfresco_module_rm/compatibility/CompatibilityModel.java b/rm-server/source/compatibility/org/alfresco/module/org_alfresco_module_rm/compatibility/CompatibilityModel.java
new file mode 100644
index 0000000000..9aeb7df40e
--- /dev/null
+++ b/rm-server/source/compatibility/org/alfresco/module/org_alfresco_module_rm/compatibility/CompatibilityModel.java
@@ -0,0 +1,39 @@
+/*
+ * Copyright (C) 2005-2011 Alfresco Software Limited.
+ *
+ * This file is part of Alfresco
+ *
+ * Alfresco is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * Alfresco is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with Alfresco. If not, see .
+ */
+package org.alfresco.module.org_alfresco_module_rm.compatibility;
+
+import org.alfresco.module.org_alfresco_module_rm.dod5015.DOD5015Model;
+import org.alfresco.service.namespace.QName;
+
+/**
+ * RM 1.0 compatibility model
+ *
+ * @author Roy Wetherall
+ */
+public interface CompatibilityModel extends DOD5015Model
+{
+ // Record series DOD type
+ public static final QName TYPE_RECORD_SERIES = QName.createQName(DOD_URI, "recordSeries");
+
+ // V1.0 custom property aspect names
+ public static final String NAME_CUSTOM_RECORD_PROPERTIES = "customRecordProperties";
+ public static final String NAME_CUSTOM_RECORD_FOLDER_PROPERTIES = "customRecordFolderProperties";
+ public static final String NAME_CUSTOM_RECORD_CATEGORY_PROPERTIES = "customRecordCategoryProperties";
+ public static final String NAME_CUSTOM_RECORD_SERIES_PROPERTIES = "customRecordSeriesProperties";
+}
diff --git a/rm-server/source/java/org/alfresco/module/org_alfresco_module_rm/RecordsManagementAdminServiceImpl.java b/rm-server/source/java/org/alfresco/module/org_alfresco_module_rm/RecordsManagementAdminServiceImpl.java
index 1f02c05ccd..ebb89d124f 100644
--- a/rm-server/source/java/org/alfresco/module/org_alfresco_module_rm/RecordsManagementAdminServiceImpl.java
+++ b/rm-server/source/java/org/alfresco/module/org_alfresco_module_rm/RecordsManagementAdminServiceImpl.java
@@ -39,7 +39,7 @@ import org.alfresco.module.org_alfresco_module_rm.RecordsManagementPolicies.OnCr
import org.alfresco.module.org_alfresco_module_rm.RecordsManagementPolicies.OnRemoveReference;
import org.alfresco.module.org_alfresco_module_rm.caveat.RMListOfValuesConstraint;
import org.alfresco.module.org_alfresco_module_rm.caveat.RMListOfValuesConstraint.MatchLogic;
-import org.alfresco.module.org_alfresco_module_rm.dod5015.DOD5015Model;
+import org.alfresco.module.org_alfresco_module_rm.compatibility.CompatibilityModel;
import org.alfresco.module.org_alfresco_module_rm.model.RecordsManagementCustomModel;
import org.alfresco.module.org_alfresco_module_rm.model.RecordsManagementModel;
import org.alfresco.repo.content.MimetypeMap;
@@ -428,25 +428,25 @@ public class RecordsManagementAdminServiceImpl implements RecordsManagementAdmin
if (prefixString == null)
{
// Backward compatibility from previous RM V1.0 custom models
- if ("customRecordProperties".equals(name) == true)
+ if (CompatibilityModel.NAME_CUSTOM_RECORD_PROPERTIES.equals(name) == true)
{
type = RecordsManagementModel.ASPECT_RECORD;
}
- else if ("customRecordFolderProperties".equals(name) == true)
+ else if (CompatibilityModel.NAME_CUSTOM_RECORD_FOLDER_PROPERTIES.equals(name) == true)
{
type = RecordsManagementModel.TYPE_RECORD_FOLDER;
}
- else if ("customRecordCategoryProperties".equals(name) == true)
+ else if (CompatibilityModel.NAME_CUSTOM_RECORD_CATEGORY_PROPERTIES.equals(name) == true)
{
type = RecordsManagementModel.TYPE_RECORD_CATEGORY;
}
- else if ("customRecordSeriesProperties".equals(name) == true)
+ else if (CompatibilityModel.NAME_CUSTOM_RECORD_SERIES_PROPERTIES.equals(name) == true)
{
// Only add the deprecated record series type as customisable if
// a v1.0 installation has added custom properties
if (aspectDef.getProperties().size() != 0)
{
- type = DOD5015Model.TYPE_RECORD_SERIES;
+ type = CompatibilityModel.TYPE_RECORD_SERIES;
}
}
}
diff --git a/rm-server/source/java/org/alfresco/module/org_alfresco_module_rm/dod5015/DOD5015Model.java b/rm-server/source/java/org/alfresco/module/org_alfresco_module_rm/dod5015/DOD5015Model.java
index 3b9420ca1c..1562e72f96 100644
--- a/rm-server/source/java/org/alfresco/module/org_alfresco_module_rm/dod5015/DOD5015Model.java
+++ b/rm-server/source/java/org/alfresco/module/org_alfresco_module_rm/dod5015/DOD5015Model.java
@@ -32,9 +32,6 @@ public interface DOD5015Model
public static final String DOD_URI = "http://www.alfresco.org/model/dod5015/1.0";
public static final String DOD_PREFIX = "dod";
- // Record series DOD type
- public static final QName TYPE_RECORD_SERIES = QName.createQName(DOD_URI, "recordSeries");
-
// DOD 5015 Custom Type aspects and their properties
// Scanned Record
public static final QName ASPECT_SCANNED_RECORD = QName.createQName(DOD_URI, "scannedRecord");
diff --git a/rm-server/source/java/org/alfresco/module/org_alfresco_module_rm/forms/RecordsManagementNodeFormFilter.java b/rm-server/source/java/org/alfresco/module/org_alfresco_module_rm/forms/RecordsManagementNodeFormFilter.java
index a2a78c185e..43a0d08512 100644
--- a/rm-server/source/java/org/alfresco/module/org_alfresco_module_rm/forms/RecordsManagementNodeFormFilter.java
+++ b/rm-server/source/java/org/alfresco/module/org_alfresco_module_rm/forms/RecordsManagementNodeFormFilter.java
@@ -24,6 +24,7 @@ import java.util.Set;
import org.alfresco.model.ImapModel;
import org.alfresco.module.org_alfresco_module_rm.FilePlanComponentKind;
+import org.alfresco.module.org_alfresco_module_rm.compatibility.CompatibilityModel;
import org.alfresco.module.org_alfresco_module_rm.disposition.DispositionSchedule;
import org.alfresco.module.org_alfresco_module_rm.disposition.DispositionScheduleImpl;
import org.alfresco.module.org_alfresco_module_rm.disposition.DispositionService;
@@ -148,6 +149,15 @@ public class RecordsManagementNodeFormFilter extends RecordsManagementFormFilter
protected void addCustomPropertyFieldsToGroup(Form form, NodeRef nodeRef)
{
Set customisables = rmAdminService.getCustomisable(nodeRef);
+
+ // Compatibility support: don't show category properties if node of type series
+ QName type = nodeService.getType(nodeRef);
+ if (CompatibilityModel.TYPE_RECORD_SERIES.equals(type) == true)
+ {
+ // remove record category from the list of customisable types to apply to the form
+ customisables.remove(TYPE_RECORD_CATEGORY);
+ }
+
for (QName customisable : customisables)
{
addPropertyFieldsToGroup(form, rmAdminService.getCustomPropertyDefinitions(customisable), CUSTOM_RM_FIELD_GROUP_ID);
@@ -157,6 +167,7 @@ public class RecordsManagementNodeFormFilter extends RecordsManagementFormFilter
protected void addRecordMetadataPropertyFieldsToGroup(Form form, NodeRef nodeRef)
{
Set aspects = rmService.getRecordMetaDataAspects();
+
for (QName aspect : aspects)
{
if (nodeService.hasAspect(nodeRef, aspect) == true)
diff --git a/rm-server/source/java/org/alfresco/module/org_alfresco_module_rm/script/BaseCustomPropertyWebScript.java b/rm-server/source/java/org/alfresco/module/org_alfresco_module_rm/script/BaseCustomPropertyWebScript.java
index e53ca97bf8..c6664e04d1 100644
--- a/rm-server/source/java/org/alfresco/module/org_alfresco_module_rm/script/BaseCustomPropertyWebScript.java
+++ b/rm-server/source/java/org/alfresco/module/org_alfresco_module_rm/script/BaseCustomPropertyWebScript.java
@@ -18,7 +18,7 @@
*/
package org.alfresco.module.org_alfresco_module_rm.script;
-import org.alfresco.module.org_alfresco_module_rm.dod5015.DOD5015Model;
+import org.alfresco.module.org_alfresco_module_rm.compatibility.CompatibilityModel;
import org.alfresco.module.org_alfresco_module_rm.model.RecordsManagementModel;
import org.alfresco.service.namespace.QName;
@@ -53,7 +53,7 @@ public class BaseCustomPropertyWebScript extends AbstractRmWebScript
}
else if ("recordSeries".equalsIgnoreCase(elementName) == true)
{
- return DOD5015Model.TYPE_RECORD_SERIES;
+ return CompatibilityModel.TYPE_RECORD_SERIES;
}
else
{