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 9f8d6f1a4a
commit 5a88c1d5c8
16 changed files with 45 additions and 45 deletions

View File

@@ -3,7 +3,7 @@ clf_classifiedcontent.property.cm_initialClassification.title=Initial Classifica
clf_classifiedcontent.property.cm_initialClassification_description=The initial classification
clf_classifiedcontent.property.cm_currentClassification_title=Current Classification
clf_classifiedcontent.property.cm_currentClassification_description=The current classification. Set to the same as initial classification
clf_classifiedcontent.property.cm_classificationAuthority_title=Classification Authority
clf_classifiedcontent.property.cm_classificationAuthority_description=The classification authority
clf_classifiedcontent.property.cm_classificationAgency_title=Classification Agency
clf_classifiedcontent.property.cm_classificationAgency_description=The classification agency
clf_classifiedcontent.property.cm_classificationReasons_title=Classification Reasons
clf_classifiedcontent.property.cm_classificationReasons_description=Holds the id\'s of classification reasons

View File

@@ -3,7 +3,7 @@ clf_classifiedcontent.property.cm_initialClassification.title=Urspr\u00fcngliche
clf_classifiedcontent.property.cm_initialClassification_description=Die urspr\u00fcngliche Klassifizierung.
clf_classifiedcontent.property.cm_currentClassification_title=Momentane Klassifizierung
clf_classifiedcontent.property.cm_currentClassification_description=Die momentane Klassifizierung. Auf urspr\u00fcngliche Klassifizierung setzen
clf_classifiedcontent.property.cm_classificationAuthority_title=Klassifizierungsinstanz
clf_classifiedcontent.property.cm_classificationAuthority_description=Die Klassifizierungsinstanz
clf_classifiedcontent.property.cm_classificationAgency_title=Klassifizierungsinstanz
clf_classifiedcontent.property.cm_classificationAgency_description=Die Klassifizierungsinstanz
clf_classifiedcontent.property.cm_classificationReasons_title=Gr\u00fcnde f\u00fcr Klassifizierung
clf_classifiedcontent.property.cm_classificationReasons_description=Enth\u00e4lt die IDs der Klassifizierungsgr\u00fcnde

View File

@@ -3,7 +3,7 @@ clf_classifiedcontent.property.cm_initialClassification.title=Clasificaci\u00f3n
clf_classifiedcontent.property.cm_initialClassification_description=La clasificaci\u00f3n inicial
clf_classifiedcontent.property.cm_currentClassification_title=Clasificaci\u00f3n actual
clf_classifiedcontent.property.cm_currentClassification_description=La clasificaci\u00f3n actual. Configurado al igual que la clasificaci\u00f3n inicial
clf_classifiedcontent.property.cm_classificationAuthority_title=Autoridad de clasificaci\u00f3n
clf_classifiedcontent.property.cm_classificationAuthority_description=La autoridad de clasificaci\u00f3n
clf_classifiedcontent.property.cm_classificationAgency_title=Autoridad de clasificaci\u00f3n
clf_classifiedcontent.property.cm_classificationAgency_description=La autoridad de clasificaci\u00f3n
clf_classifiedcontent.property.cm_classificationReasons_title=Razones de clasificaci\u00f3n
clf_classifiedcontent.property.cm_classificationReasons_description=Mantiene las Id\

View File

@@ -3,7 +3,7 @@ clf_classifiedcontent.property.cm_initialClassification.title=Classement initial
clf_classifiedcontent.property.cm_initialClassification_description=Le classement initial
clf_classifiedcontent.property.cm_currentClassification_title=Classement actuel
clf_classifiedcontent.property.cm_currentClassification_description=Le classement actuel. D\u00e9finir de la m\u00eame mani\u00e8re que le classement initial
clf_classifiedcontent.property.cm_classificationAuthority_title=D\u00e9tenteur du classement
clf_classifiedcontent.property.cm_classificationAuthority_description=Le d\u00e9tenteur du classement
clf_classifiedcontent.property.cm_classificationAgency_title=D\u00e9tenteur du classement
clf_classifiedcontent.property.cm_classificationAgency_description=Le d\u00e9tenteur du classement
clf_classifiedcontent.property.cm_classificationReasons_title=Motifs du classement
clf_classifiedcontent.property.cm_classificationReasons_description=Contient les identifiants des motifs du classement

View File

@@ -3,7 +3,7 @@ clf_classifiedcontent.property.cm_initialClassification.title=Classificazione in
clf_classifiedcontent.property.cm_initialClassification_description=La classificazione iniziale
clf_classifiedcontent.property.cm_currentClassification_title=Classificazione attuale
clf_classifiedcontent.property.cm_currentClassification_description=La classificazione attuale. \u00c8 impostata su Classificazione iniziale
clf_classifiedcontent.property.cm_classificationAuthority_title=Autorit\u00e0 di classificazione
clf_classifiedcontent.property.cm_classificationAuthority_description=L'autorit\u00e0 di classificazione
clf_classifiedcontent.property.cm_classificationAgency_title=Autorit\u00e0 di classificazione
clf_classifiedcontent.property.cm_classificationAgency_description=L'autorit\u00e0 di classificazione
clf_classifiedcontent.property.cm_classificationReasons_title=Motivi di classificazione
clf_classifiedcontent.property.cm_classificationReasons_description=Include gli ID dei motivi di classificazione

View File

@@ -3,7 +3,7 @@ clf_classifiedcontent.property.cm_initialClassification.title=\u6700\u521d\u306e
clf_classifiedcontent.property.cm_initialClassification_description=\u6700\u521d\u306e\u5206\u985e
clf_classifiedcontent.property.cm_currentClassification_title=\u73fe\u5728\u306e\u5206\u985e
clf_classifiedcontent.property.cm_currentClassification_description=\u73fe\u5728\u306e\u5206\u985e\u3002 \u6700\u521d\u306e\u5206\u985e\u3068\u540c\u3058\u306b\u8a2d\u5b9a\u3057\u307e\u3059\u3002
clf_classifiedcontent.property.cm_classificationAuthority_title=\u5206\u985e\u6a29\u9650
clf_classifiedcontent.property.cm_classificationAuthority_description=\u5206\u985e\u6a29\u9650
clf_classifiedcontent.property.cm_classificationAgency_title=\u5206\u985e\u6a29\u9650
clf_classifiedcontent.property.cm_classificationAgency_description=\u5206\u985e\u6a29\u9650
clf_classifiedcontent.property.cm_classificationReasons_title=\u5206\u985e\u7406\u7531
clf_classifiedcontent.property.cm_classificationReasons_description=\u5206\u985e\u7406\u7531\u306e ID

View File

@@ -3,7 +3,7 @@ clf_classifiedcontent.property.cm_initialClassification.title=Aanvankelijke clas
clf_classifiedcontent.property.cm_initialClassification_description=De aanvankelijke classificatie
clf_classifiedcontent.property.cm_currentClassification_title=Huidige classificatie
clf_classifiedcontent.property.cm_currentClassification_description=De huidige classificatie. Instellen op dezelfde waarde als die voor de aanvankelijke classificatie
clf_classifiedcontent.property.cm_classificationAuthority_title=Classificatieautoriteit
clf_classifiedcontent.property.cm_classificationAuthority_description=De classificatieautoriteit
clf_classifiedcontent.property.cm_classificationAgency_title=Classificatieautoriteit
clf_classifiedcontent.property.cm_classificationAgency_description=De classificatieautoriteit
clf_classifiedcontent.property.cm_classificationReasons_title=Classificatieredenen
clf_classifiedcontent.property.cm_classificationReasons_description=Bevat de id\

View File

@@ -60,9 +60,9 @@
<constraint ref="clf:classificationLevelRestriction" />
</constraints>
</property>
<property name="clf:classificationAuthority">
<title>Classification Authority</title>
<description>The classification authority</description>
<property name="clf:classificationAgency">
<title>Classification Agency</title>
<description>The classification agency</description>
<type>d:text</type>
</property>
<property name="clf:classificationReasons">

View File

@@ -6,7 +6,7 @@
The body of the post should be in the form, e.g.<br/>
{<br/>
"classificationLevelId": "aLevelId",<br/>
"classificationAuthority": "anAuthority",<br/>
"classificationAgency": "anAgency",<br/>
"classificationReasons": [<br/>
{<br/>
"id": "reason1Id"<br/>

View File

@@ -45,7 +45,7 @@ public interface ContentClassificationService
* Classify a piece of content.
*
* @param classificationLevelId The security clearance needed to access the content.
* @param classificationAuthority The name of the authority responsible for the classification of this content.
* @param classificationAgency The name of the agency responsible for the classification of this content.
* @param classificationReasonIds A non-empty set of ids of reasons for classifying the content in this way.
* @param content The node to classify.
* @throws LevelIdNotFound If the supplied level id is not found.
@@ -53,7 +53,7 @@ public interface ContentClassificationService
* @throws InvalidNodeRefException If the node could not be found.
* @throws InvalidNode If the supplied node is not a content node.
*/
void classifyContent(String classificationLevelId, String classificationAuthority, Set<String> classificationReasonIds, NodeRef content)
void classifyContent(String classificationLevelId, String classificationAgency, Set<String> classificationReasonIds, NodeRef content)
throws LevelIdNotFound, ReasonIdNotFound, InvalidNodeRefException, InvalidNode;
/**

View File

@@ -78,11 +78,11 @@ public class ContentClassificationServiceImpl extends ServiceBaseImpl implements
};
@Override
public void classifyContent(String classificationLevelId, String classificationAuthority,
public void classifyContent(String classificationLevelId, String classificationAgency,
Set<String> classificationReasonIds, final NodeRef content)
{
checkNotBlank("classificationLevelId", classificationLevelId);
checkNotBlank("classificationAuthority", classificationAuthority);
checkNotBlank("classificationAgency", classificationAgency);
mandatory("classificationReasonIds", classificationReasonIds);
mandatory("content", content);
@@ -114,8 +114,8 @@ public class ContentClassificationServiceImpl extends ServiceBaseImpl implements
// Current classification id
properties.put(PROP_CURRENT_CLASSIFICATION, classificationLevelId);
// Classification authority
properties.put(PROP_CLASSIFICATION_AUTHORITY, classificationAuthority);
// Classification agency
properties.put(PROP_CLASSIFICATION_AGENCY, classificationAgency);
// Classification reason ids
HashSet<String> classificationReasons = new HashSet<>();

View File

@@ -44,7 +44,7 @@ public interface ClassifiedContentModel
QName ASPECT_CLASSIFIED = QName.createQName(CLF_URI, "classified");
QName PROP_INITIAL_CLASSIFICATION = QName.createQName(CLF_URI, "initialClassification");
QName PROP_CURRENT_CLASSIFICATION = QName.createQName(CLF_URI, "currentClassification");
QName PROP_CLASSIFICATION_AUTHORITY = QName.createQName(CLF_URI, "classificationAuthority");
QName PROP_CLASSIFICATION_AGENCY = QName.createQName(CLF_URI, "classificationAgency");
QName PROP_CLASSIFICATION_REASONS = QName.createQName(CLF_URI, "classificationReasons");
/** Security Clearance aspect. */

View File

@@ -47,7 +47,7 @@ public class ClassifyContentPost extends AbstractRmWebScript
{
/** Constants */
public static final String CLASSIFICATION_LEVEL_ID = "classificationLevelId";
public static final String CLASSIFICATION_AUTHORITY = "classificationAuthority";
public static final String CLASSIFICATION_AGENCY = "classificationAgency";
public static final String CLASSIFICATION_REASONS = "classificationReasons";
/** The service responsible for classifying content. */
@@ -73,13 +73,13 @@ public class ClassifyContentPost extends AbstractRmWebScript
{
JSONObject jsonObject = getRequestContentAsJsonObject(req);
String classificationLevelId = getStringValueFromJSONObject(jsonObject, CLASSIFICATION_LEVEL_ID);
String classificationAuthority = getStringValueFromJSONObject(jsonObject, CLASSIFICATION_AUTHORITY);
String classificationAgency = getStringValueFromJSONObject(jsonObject, CLASSIFICATION_AGENCY);
Set<String> classificationReasonIds = getClassificationReasonIds(jsonObject);
NodeRef document = parseRequestForNodeRef(req);
contentClassificationService.classifyContent(classificationLevelId, classificationAuthority, classificationReasonIds, document);
contentClassificationService.classifyContent(classificationLevelId, classificationAgency, classificationReasonIds, document);
Map<String, Object> model = new HashMap<String, Object>(1);
Map<String, Object> model = new HashMap<>(1);
model.put(SUCCESS, true);
return model;

View File

@@ -42,7 +42,7 @@ public class ClassifyTest extends BaseRMTestCase
private static final String CLASSIFICATION_LEVEL = "level1";
private static final String LOWER_CLASSIFICATION_LEVEL = "level2";
private static final String CLASSIFICATION_REASON = "Test Reason 1";
private static final String CLASSIFICATION_AUTHORITY = "classification authority";
private static final String CLASSIFICATION_AGENCY = "classification agency";
private static final String RECORD_NAME = "recordname.txt";
/**
@@ -69,7 +69,7 @@ public class ClassifyTest extends BaseRMTestCase
{
contentClassificationService.classifyContent(
CLASSIFICATION_LEVEL,
CLASSIFICATION_AUTHORITY,
CLASSIFICATION_AGENCY,
Collections.singleton(CLASSIFICATION_REASON),
record);
}
@@ -97,7 +97,7 @@ public class ClassifyTest extends BaseRMTestCase
{
contentClassificationService.classifyContent(
CLASSIFICATION_LEVEL,
CLASSIFICATION_AUTHORITY,
CLASSIFICATION_AGENCY,
Collections.singleton(CLASSIFICATION_REASON),
record);
}
@@ -108,7 +108,7 @@ public class ClassifyTest extends BaseRMTestCase
assertTrue(nodeService.hasAspect(record, ClassifiedContentModel.ASPECT_CLASSIFIED));
assertEquals(CLASSIFICATION_LEVEL, (String)nodeService.getProperty(record, ClassifiedContentModel.PROP_INITIAL_CLASSIFICATION));
assertEquals(CLASSIFICATION_LEVEL, (String)nodeService.getProperty(record, ClassifiedContentModel.PROP_CURRENT_CLASSIFICATION));
assertEquals(CLASSIFICATION_AUTHORITY, (String)nodeService.getProperty(record, ClassifiedContentModel.PROP_CLASSIFICATION_AUTHORITY));
assertEquals(CLASSIFICATION_AGENCY, (String)nodeService.getProperty(record, ClassifiedContentModel.PROP_CLASSIFICATION_AGENCY));
assertEquals(Collections.singletonList(CLASSIFICATION_REASON), (List<String>)nodeService.getProperty(record, ClassifiedContentModel.PROP_CLASSIFICATION_REASONS));
}
});
@@ -148,7 +148,7 @@ public class ClassifyTest extends BaseRMTestCase
@Override
public Void run()
{
contentClassificationService.classifyContent(CLASSIFICATION_LEVEL, CLASSIFICATION_AUTHORITY,
contentClassificationService.classifyContent(CLASSIFICATION_LEVEL, CLASSIFICATION_AGENCY,
Sets.newHashSet(CLASSIFICATION_REASON), record);
return null;
}
@@ -199,7 +199,7 @@ public class ClassifyTest extends BaseRMTestCase
@Override
public Void run()
{
contentClassificationService.classifyContent(CLASSIFICATION_LEVEL, CLASSIFICATION_AUTHORITY,
contentClassificationService.classifyContent(CLASSIFICATION_LEVEL, CLASSIFICATION_AGENCY,
Sets.newHashSet(CLASSIFICATION_REASON), record);
return null;
}

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);