From 1049d16238c0353ea15131a7145de4c841abc4aa Mon Sep 17 00:00:00 2001 From: Tuna Aksoy Date: Wed, 29 Jul 2015 21:42:31 +0000 Subject: [PATCH] RM-2448 (Extend classified document properties view) RM-2449 (Extend classified record properties view) +review RM-137 git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/modules/recordsmanagement/HEAD@109185 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261 --- .../forms/RecordsManagementNodeFormFilter.java | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) 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 71c1fe0803..ec0a83b3d2 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 @@ -78,6 +78,7 @@ public class RecordsManagementNodeFormFilter extends RecordsManagementFormFilter protected static final String TRANSIENT_CURRENT_CLASSIFICATION = "clfCurrentClassification"; protected static final String TRANSIENT_INITIAL_CLASSIFICATION = "clfInitialClassification"; protected static final String TRANSIENT_CLASSIFICATION_REASON_LABELS = "clfClassificationReasonLabels"; + protected static final String TRANSIENT_DECLASSIFICATION_EXEMPTIONS = "clfDeclassificationExemptions"; /** Disposition service */ private DispositionService dispositionService; @@ -232,6 +233,21 @@ public class RecordsManagementNodeFormFilter extends RecordsManagementFormFilter } addTransientPropertyField(form, TRANSIENT_CLASSIFICATION_REASON_LABELS, DataTypeDefinition.TEXT, classificationReasonLabels); } + + @SuppressWarnings("unchecked") + List declassificationExemptions = (List) nodeService.getProperty(nodeRef, ClassifiedContentModel.PROP_DECLASSIFICATION_EXEMPTIONS); + if (declassificationExemptions != null && !declassificationExemptions.isEmpty()) + { + List declassificationExemptionLabels = new ArrayList<>(); + int size = declassificationExemptions.size(); + for (int i = 0; i < size; i++) + { + String id = declassificationExemptions.get(i); + String displayLabel = getClassificationSchemeService().getExemptionCategoryById(id).getDisplayLabel(); + declassificationExemptionLabels.add(id + ": " + displayLabel + (i < size - 1 ? "|": "")); + } + addTransientPropertyField(form, TRANSIENT_DECLASSIFICATION_EXEMPTIONS, DataTypeDefinition.TEXT, declassificationExemptionLabels); + } } }