mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-10-08 14:51:49 +00:00
RM-389 - RM 2.0: 'Custom Metadata' has 'Record Series' after upgrade from RM 1.0
* migrated record series, despite extending record category, don't have the record category custom properties shown in the UI * record series is labeled as 'deprecated' in the edit custom properties console * some re-org of 'compatibility' code git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/modules/recordsmanagement/BRANCHES/V2.0@37271 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -1,13 +1,7 @@
|
|||||||
dod_dod5015.description=DOD5015 Content Model
|
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.title=Record Series (Deprecated)
|
||||||
dod_dod5015.type.dod_recordSeries.description=Record Series
|
dod_dod5015.type.dod_recordSeries.description=Record Series (Deprecated)
|
||||||
|
|
||||||
dod_dod5015.type.dod_recordCategory.title=Record Category
|
|
||||||
dod_dod5015.type.dod_recordCategory.description=Record Category
|
|
||||||
|
|
||||||
dod_dod5015.aspect.dod_scannedRecord.title=Scanned Record
|
dod_dod5015.aspect.dod_scannedRecord.title=Scanned Record
|
||||||
dod_dod5015.aspect.dod_scannedRecord.description=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.title=Content Management System
|
||||||
dod_dod5015.property.dod_contentManagementSystem.description=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
|
|
||||||
|
|
||||||
|
@@ -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.title=Publish In Progress
|
||||||
rma_recordsmanagement.property.rma_publishInProgress.description=Indicates whether a publish is currently 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
|
||||||
|
|
||||||
|
|
@@ -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 <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
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";
|
||||||
|
}
|
@@ -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.RecordsManagementPolicies.OnRemoveReference;
|
||||||
import org.alfresco.module.org_alfresco_module_rm.caveat.RMListOfValuesConstraint;
|
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.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.RecordsManagementCustomModel;
|
||||||
import org.alfresco.module.org_alfresco_module_rm.model.RecordsManagementModel;
|
import org.alfresco.module.org_alfresco_module_rm.model.RecordsManagementModel;
|
||||||
import org.alfresco.repo.content.MimetypeMap;
|
import org.alfresco.repo.content.MimetypeMap;
|
||||||
@@ -428,25 +428,25 @@ public class RecordsManagementAdminServiceImpl implements RecordsManagementAdmin
|
|||||||
if (prefixString == null)
|
if (prefixString == null)
|
||||||
{
|
{
|
||||||
// Backward compatibility from previous RM V1.0 custom models
|
// 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;
|
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;
|
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;
|
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
|
// Only add the deprecated record series type as customisable if
|
||||||
// a v1.0 installation has added custom properties
|
// a v1.0 installation has added custom properties
|
||||||
if (aspectDef.getProperties().size() != 0)
|
if (aspectDef.getProperties().size() != 0)
|
||||||
{
|
{
|
||||||
type = DOD5015Model.TYPE_RECORD_SERIES;
|
type = CompatibilityModel.TYPE_RECORD_SERIES;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -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_URI = "http://www.alfresco.org/model/dod5015/1.0";
|
||||||
public static final String DOD_PREFIX = "dod";
|
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
|
// DOD 5015 Custom Type aspects and their properties
|
||||||
// Scanned Record
|
// Scanned Record
|
||||||
public static final QName ASPECT_SCANNED_RECORD = QName.createQName(DOD_URI, "scannedRecord");
|
public static final QName ASPECT_SCANNED_RECORD = QName.createQName(DOD_URI, "scannedRecord");
|
||||||
|
@@ -24,6 +24,7 @@ import java.util.Set;
|
|||||||
|
|
||||||
import org.alfresco.model.ImapModel;
|
import org.alfresco.model.ImapModel;
|
||||||
import org.alfresco.module.org_alfresco_module_rm.FilePlanComponentKind;
|
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.DispositionSchedule;
|
||||||
import org.alfresco.module.org_alfresco_module_rm.disposition.DispositionScheduleImpl;
|
import org.alfresco.module.org_alfresco_module_rm.disposition.DispositionScheduleImpl;
|
||||||
import org.alfresco.module.org_alfresco_module_rm.disposition.DispositionService;
|
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)
|
protected void addCustomPropertyFieldsToGroup(Form form, NodeRef nodeRef)
|
||||||
{
|
{
|
||||||
Set<QName> customisables = rmAdminService.getCustomisable(nodeRef);
|
Set<QName> 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)
|
for (QName customisable : customisables)
|
||||||
{
|
{
|
||||||
addPropertyFieldsToGroup(form, rmAdminService.getCustomPropertyDefinitions(customisable), CUSTOM_RM_FIELD_GROUP_ID);
|
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)
|
protected void addRecordMetadataPropertyFieldsToGroup(Form form, NodeRef nodeRef)
|
||||||
{
|
{
|
||||||
Set<QName> aspects = rmService.getRecordMetaDataAspects();
|
Set<QName> aspects = rmService.getRecordMetaDataAspects();
|
||||||
|
|
||||||
for (QName aspect : aspects)
|
for (QName aspect : aspects)
|
||||||
{
|
{
|
||||||
if (nodeService.hasAspect(nodeRef, aspect) == true)
|
if (nodeService.hasAspect(nodeRef, aspect) == true)
|
||||||
|
@@ -18,7 +18,7 @@
|
|||||||
*/
|
*/
|
||||||
package org.alfresco.module.org_alfresco_module_rm.script;
|
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.module.org_alfresco_module_rm.model.RecordsManagementModel;
|
||||||
import org.alfresco.service.namespace.QName;
|
import org.alfresco.service.namespace.QName;
|
||||||
|
|
||||||
@@ -53,7 +53,7 @@ public class BaseCustomPropertyWebScript extends AbstractRmWebScript
|
|||||||
}
|
}
|
||||||
else if ("recordSeries".equalsIgnoreCase(elementName) == true)
|
else if ("recordSeries".equalsIgnoreCase(elementName) == true)
|
||||||
{
|
{
|
||||||
return DOD5015Model.TYPE_RECORD_SERIES;
|
return CompatibilityModel.TYPE_RECORD_SERIES;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user