RM-2333. Rename ClassificationAuthority to ClassificationAgency. +review RM

This addresses parts of RM-2341, RM-2342, RM-2343 and RM-2344. It replaces authority with agency in the content model
, the services and their APIs, the UI layer and the rm-automation tests.


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/modules/recordsmanagement/HEAD@107108 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Neil McErlean
2015-06-25 13:24:38 +00:00
parent b7373ed3cf
commit cdcd367e68
16 changed files with 45 additions and 45 deletions

View File

@@ -103,7 +103,7 @@ public class ContentClassificationServiceImplUnitTest implements ClassifiedConte
when(mockSecurityClearanceService.isCurrentUserClearedForClassification("levelId1")).thenReturn(true);
// Call the method under test.
contentClassificationServiceImpl.classifyContent("levelId1", "classificationAuthority",
contentClassificationServiceImpl.classifyContent("levelId1", "classificationAgency",
Sets.newHashSet("reasonId1", "reasonId2"), content);
verify(mockNodeService).addAspect(eq(content), eq(ClassifiedContentModel.ASPECT_CLASSIFIED),
@@ -112,12 +112,12 @@ public class ContentClassificationServiceImplUnitTest implements ClassifiedConte
Map<QName, Serializable> properties = propertiesCaptor.getValue();
HashSet<QName> expectedPropertyKeys = Sets.newHashSet(ClassifiedContentModel.PROP_INITIAL_CLASSIFICATION,
ClassifiedContentModel.PROP_CURRENT_CLASSIFICATION,
ClassifiedContentModel.PROP_CLASSIFICATION_AUTHORITY,
ClassifiedContentModel.PROP_CLASSIFICATION_AGENCY,
ClassifiedContentModel.PROP_CLASSIFICATION_REASONS);
assertEquals("Aspect created with unexpected set of keys.", expectedPropertyKeys, properties.keySet());
assertEquals("Unexpected initial classification.", level.getId(), properties.get(ClassifiedContentModel.PROP_INITIAL_CLASSIFICATION));
assertEquals("Unexpected current classification.", level.getId(), properties.get(ClassifiedContentModel.PROP_CURRENT_CLASSIFICATION));
assertEquals("Unexpected authority.", "classificationAuthority", properties.get(ClassifiedContentModel.PROP_CLASSIFICATION_AUTHORITY));
assertEquals("Unexpected agency.", "classificationAgency", properties.get(ClassifiedContentModel.PROP_CLASSIFICATION_AGENCY));
Set<String> expectedReasonIds = Sets.newHashSet("reasonId1", "reasonId2");
assertEquals("Unexpected set of reasons.", expectedReasonIds, properties.get(ClassifiedContentModel.PROP_CLASSIFICATION_REASONS));
}
@@ -131,7 +131,7 @@ public class ContentClassificationServiceImplUnitTest implements ClassifiedConte
when(mockNodeService.getType(notAPieceOfContent)).thenReturn(ContentModel.TYPE_FOLDER);
// Call the method under test.
contentClassificationServiceImpl.classifyContent("levelId1", "classificationAuthority",
contentClassificationServiceImpl.classifyContent("levelId1", "classificationAgency",
Sets.newHashSet("reasonId1", "reasonId2"), notAPieceOfContent);
}
@@ -145,7 +145,7 @@ public class ContentClassificationServiceImplUnitTest implements ClassifiedConte
when(mockNodeService.hasAspect(classifiedContent, ClassifiedContentModel.ASPECT_CLASSIFIED)).thenReturn(true);
// Call the method under test.
contentClassificationServiceImpl.classifyContent("levelId1", "classificationAuthority",
contentClassificationServiceImpl.classifyContent("levelId1", "classificationAgency",
Sets.newHashSet("reasonId1", "reasonId2"), classifiedContent);
}
@@ -175,7 +175,7 @@ public class ContentClassificationServiceImplUnitTest implements ClassifiedConte
when(mockSecurityClearanceService.isCurrentUserClearedForClassification("levelId1")).thenReturn(false);
// Call the method under test.
contentClassificationServiceImpl.classifyContent("levelId1", "classificationAuthority",
contentClassificationServiceImpl.classifyContent("levelId1", "classificationAgency",
Sets.newHashSet("reasonId1", "reasonId2"), classifiedContent);
}

View File

@@ -19,7 +19,7 @@
package org.alfresco.module.org_alfresco_module_rm.script.classification;
import static com.google.common.collect.Sets.newHashSet;
import static org.alfresco.module.org_alfresco_module_rm.script.classification.ClassifyContentPost.CLASSIFICATION_AUTHORITY;
import static org.alfresco.module.org_alfresco_module_rm.script.classification.ClassifyContentPost.CLASSIFICATION_AGENCY;
import static org.alfresco.module.org_alfresco_module_rm.script.classification.ClassifyContentPost.CLASSIFICATION_LEVEL_ID;
import static org.alfresco.module.org_alfresco_module_rm.script.classification.ClassifyContentPost.CLASSIFICATION_REASONS;
import static org.alfresco.util.WebScriptUtils.getStringValueFromJSONObject;
@@ -61,7 +61,7 @@ public class ClassifyContentPostUnitTest extends BaseWebScriptUnitTest
private static final String ID = "id";
private static final String SUCCESS = "success";
private static final String LEVEL_ID = "aLevelId";
private static final String AUTHORITY = "anAuthority";
private static final String AGENCY = "anAgency";
private static final String REASON1_ID = "reason1Id";
private static final String REASON2_ID = "reason2Id";
@@ -116,7 +116,7 @@ public class ClassifyContentPostUnitTest extends BaseWebScriptUnitTest
assertEquals(getStringValueFromJSONObject(json, SUCCESS), Boolean.TRUE.toString());
// Verify that the classify content method was called
verify(mockedContentClassificationService, times(1)).classifyContent(LEVEL_ID, AUTHORITY, newHashSet(REASON1_ID, REASON2_ID), record);
verify(mockedContentClassificationService, times(1)).classifyContent(LEVEL_ID, AGENCY, newHashSet(REASON1_ID, REASON2_ID), record);
}
/**
@@ -128,7 +128,7 @@ public class ClassifyContentPostUnitTest extends BaseWebScriptUnitTest
{
JSONObject content = new JSONObject();
putValuetoJSONObject(content, CLASSIFICATION_LEVEL_ID, LEVEL_ID);
putValuetoJSONObject(content, CLASSIFICATION_AUTHORITY, AUTHORITY);
putValuetoJSONObject(content, CLASSIFICATION_AGENCY, AGENCY);
JSONObject classificationReason1 = new JSONObject();
putValuetoJSONObject(classificationReason1, ID, REASON1_ID);