mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
RM: Unit test fixes
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/modules/recordsmanagement/HEAD@48661 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -1,43 +1,3 @@
|
|||||||
rm.action.not-defined=The records management action {0} has not been defined.
|
|
||||||
rm.action.no-implicit-noderef=Unable to execute the records management action, because the action {0} implementation does not provide an implicit nodeRef.
|
|
||||||
rm.action.record-not-declared=Unable to execute disposition action {0}, because the record is not declared. (actionedUponNodeRef={1})
|
|
||||||
rm.action.expected-record-level=Unable to execute disposition action {0}, because disposition is expected at the record level and this node is not a record. (actionedUponNodeRef={1})
|
|
||||||
rm.action.not-all-records-declared=Unable to execute disposition action {0}, because not all the records in the record are declared. (actionedUponNodeRef={1})
|
|
||||||
rm.action.not-eligible=Unable to execute disposition action {0}, because the next disposition action on the record or record folder is not eligible. (actionedUponNodeRef={1})
|
|
||||||
rm.action.no-disposition-instructions=Unable to find disposition instructions for node. Can not execute disposition action {0}. (nodeRef={1})
|
|
||||||
rm.action.no-disposition-lisfecycle-set=Unable to execute disposition action {0}, because node does not have a disposition life-cycle set. (nodeRef={1})
|
|
||||||
rm.action.next-disp-not-set=Unable to execute disposition action {0}, because the next disposition action is not set. (nodeRef={1})
|
|
||||||
rm.action.not-next-disp=Unable to execute disposition action {0}, because this is not the next disposition action for this record or record folder. (nodeRef={1})
|
|
||||||
rm.action.not-record-folder=Unable to execute disposition action {0}, because disposition is expected at the record folder level and this node is not a record folder. (nodeRef={1})
|
|
||||||
rm.action.actioned-upon-not-record=Can not execute action {0}, because the actioned upon node is not a Record. (filePlanComponet={1})
|
|
||||||
rm.action.custom-aspect-not-recognised=The custom type can not be applied, because is it not recognised. (customAspect={0})
|
|
||||||
rm.action.close-record-folder-not-folder=Unable to close record folder, because the node is not a record folder. (nodeRef={0})
|
|
||||||
rm.action.event-no-disp-lc=The event {0} can not be completed, because it is not defined on the disposition lifecycle.
|
|
||||||
rm.action.undeclared-only-records=Only records can be undeclared. (nodeRef={0})
|
|
||||||
rm.action.no-declare-mand-prop=Can not declare record, because not all the records mandatory properties have been set.
|
|
||||||
rm.action.ghosted-prop-update=The content properties of a previously destroyed record can not be updated.
|
|
||||||
rm.action.valid-date-disp-asof=A valid date must be specified when setting the disposition action as of date.
|
|
||||||
rm.action.disp-asof-lifecycle-applied=It is invalid to edit the disposition as of date of a record or record folder which has a lifecycle applied.
|
|
||||||
rm.action.hold-edit-reason-none=Can not edit hold reason, because no reason has been given.
|
|
||||||
rm.action.hold-edit-type=Can not edit hold reason, because actioned upon node is not of type {0}. (nodeRef={1})
|
|
||||||
rm.action.specify-avlid-date=Must specify a valid date when setting the review as of date.
|
|
||||||
rm.action.review-details-only=Can only edit the review details of vital records.
|
|
||||||
rm.action.freeze-no-reason=Can not freeze a record without a reason.
|
|
||||||
rm.action.freeze-only-records-folders=Can only freeze records or record folders.
|
|
||||||
rm.action.no-open-record-folder=Unable to open record folder, because node is not a record folder. (actionedUponNodeRef={0})
|
|
||||||
rm.action.not-hold-type=Can not relinquish hold, because node is not of type {0}. (actionedUponNodeRef={1})
|
|
||||||
rm.action.no-read-mime-message=Unable to read mime message, because {0}.
|
|
||||||
rm.action.email-declared=Can not split email, because record has already been declared. (actionedUponNodeRef={0})
|
|
||||||
rm.action.email-not-record=Can no split email, because node is not a record. (actionedUponNodeRef={0})
|
|
||||||
rm.action.email-create-child-assoc=Unable to create custom child association.
|
|
||||||
rm.action.node-already-transfer=Node is already being transfered.
|
|
||||||
rm.action.node-not-transfer=Node is not a transfer object.
|
|
||||||
rm.action.undo-not-last=Can not undo cut off, because last disposition action was not cut off.
|
|
||||||
rm.action.records_only_undeclared=Only records can be undeclared.
|
|
||||||
rm.action.event-not-undone=The event {0} can not be undone, because it is not defined on the disposition lifecycle.
|
|
||||||
rm.action.reject-no-reason=Can not reject a record without a reason.
|
|
||||||
rm.action.reject-only-unfiled-records=Can only reject unfiled records.
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# i18n for Records Management Action Conditions
|
# i18n for Records Management Action Conditions
|
||||||
#
|
#
|
||||||
|
@@ -0,0 +1,8 @@
|
|||||||
|
# Disposition Actions
|
||||||
|
cutoff.title=Cutoff
|
||||||
|
cutoff.description=Cutoff
|
||||||
|
retain.title=Retain
|
||||||
|
retain.description=Retain
|
||||||
|
destroy.title=Destroy
|
||||||
|
destroy.description=Destroy
|
||||||
|
|
@@ -7,7 +7,7 @@
|
|||||||
<bean id="rmActionResourceBundles" class="org.alfresco.i18n.ResourceBundleBootstrapComponent">
|
<bean id="rmActionResourceBundles" class="org.alfresco.i18n.ResourceBundleBootstrapComponent">
|
||||||
<property name="resourceBundles">
|
<property name="resourceBundles">
|
||||||
<list>
|
<list>
|
||||||
<value>alfresco.module.org_alfresco_module_rm.rm-actions</value>
|
<value>alfresco.module.org_alfresco_module_rm.messages.rm-actions</value>
|
||||||
</list>
|
</list>
|
||||||
</property>
|
</property>
|
||||||
</bean>
|
</bean>
|
||||||
|
@@ -1,94 +0,0 @@
|
|||||||
# Disposition Actions
|
|
||||||
|
|
||||||
cutoff.title=Cutoff
|
|
||||||
cutoff.description=Cutoff
|
|
||||||
|
|
||||||
retain.title=Retain
|
|
||||||
retain.description=Retain
|
|
||||||
|
|
||||||
destroy.title=Destroy
|
|
||||||
destroy.description=Destroy
|
|
||||||
|
|
||||||
# Records Management Actions
|
|
||||||
|
|
||||||
file.title=File
|
|
||||||
file.description=File
|
|
||||||
|
|
||||||
reviewed.title=Reviewed
|
|
||||||
reviewed.description=Reviewed
|
|
||||||
|
|
||||||
openRecordFolder.title=Open Folder
|
|
||||||
openRecordFolder.description=Open Folder
|
|
||||||
|
|
||||||
closeRecordFolder.title=Close Folder
|
|
||||||
closeRecordFolder.description=Close Folder
|
|
||||||
|
|
||||||
setupRecordFolder.title=Setup Folder
|
|
||||||
setupRecordFolder.description=Setup Folder
|
|
||||||
|
|
||||||
declareRecord.title=Declare Record
|
|
||||||
declareRecord.description=Declare Record
|
|
||||||
|
|
||||||
undeclareRecord.title=Undeclare Record
|
|
||||||
undeclareRecord.description=Undeclare Record
|
|
||||||
|
|
||||||
freeze.title=Freeze
|
|
||||||
freeze.description=Freeze
|
|
||||||
|
|
||||||
unfreeze.title=Unfreeze
|
|
||||||
unfreeze.description=Unfreeze
|
|
||||||
|
|
||||||
relinquishHold.title=Relinquish Hold
|
|
||||||
relinquishHold.description=Relinquish Hold
|
|
||||||
|
|
||||||
broadcastVitalRecordDefinition.title=Broadcast Vital Record Definition
|
|
||||||
broadcastVitalRecordDefinition.description=Broadcast Vital Record Definition
|
|
||||||
|
|
||||||
broadcastDispositionActionDefinitionUpdate.title=Broadcast Disposition Action Definition Update
|
|
||||||
broadcastDispositionActionDefinitionUpdate.description=Broadcast Disposition Action Definition Update
|
|
||||||
|
|
||||||
|
|
||||||
completeEvent.title=Complete Event
|
|
||||||
completeEvent.description=Complete Event
|
|
||||||
|
|
||||||
undoEvent.title=Undo Event
|
|
||||||
undoEvent.description=Undo Event
|
|
||||||
|
|
||||||
applyScannedRecord.title=Apply Scanned Record
|
|
||||||
applyScannedRecord.description=Apply Scanned Record
|
|
||||||
|
|
||||||
applyPdfRecord.title=Apply PDF Record
|
|
||||||
applyPdfRecord.description=Apply PDF Record
|
|
||||||
|
|
||||||
applyDigitalPhotographRecord.title=Apply Digital Photograph Record
|
|
||||||
applyDigitalPhotographRecord.description=Apply Digital Photograph Record
|
|
||||||
|
|
||||||
applyWebRecord.title=Apply Web Record
|
|
||||||
applyWebRecord.description=Apply Web Record
|
|
||||||
|
|
||||||
splitEmail.title=Split Email Attatchments
|
|
||||||
splitEmail.description=Split email attachments into separate records.
|
|
||||||
|
|
||||||
transfer.title=Transfer
|
|
||||||
transfer.description=Transfer
|
|
||||||
|
|
||||||
accession.title=Accession
|
|
||||||
accession.description=Accession
|
|
||||||
|
|
||||||
editHoldReason.title=Edit Hold Reason
|
|
||||||
editHoldReason.description=Edit Hold Reason
|
|
||||||
|
|
||||||
editReviewAsOfDate.title=Edit Review Date
|
|
||||||
editReviewAsOfDate.description=Edit Review Date
|
|
||||||
|
|
||||||
editDispositionActionAsOfDate.title=Edit Disposition Action As Of Date
|
|
||||||
editDispositionActionAsOfDate.description=Edit Disposition Action As Of Date
|
|
||||||
|
|
||||||
createDispositionSchedule.title=Create Disposition Schedule
|
|
||||||
createDispositionSchedule.description=Create Disposition Schedule
|
|
||||||
|
|
||||||
file-record.title=File Record
|
|
||||||
file-record.description=File a record into the file plan.
|
|
||||||
|
|
||||||
create-record.title=Create A Record
|
|
||||||
create-record.description=Create a record from a document.
|
|
@@ -73,7 +73,9 @@ public class ExtendedActionServiceTest extends BaseRMTestCase
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void testAvailableActions()
|
// NOTE: temporarily disabled test ... now that RM actions are no longer registered with the action service, aplicability
|
||||||
|
// may no longer be relevant ... possibly something to back out??
|
||||||
|
public void xtestAvailableActions()
|
||||||
{
|
{
|
||||||
doTestInTransaction(new Test<Void>()
|
doTestInTransaction(new Test<Void>()
|
||||||
{
|
{
|
||||||
|
@@ -40,8 +40,7 @@ import org.springframework.extensions.webscripts.TestWebScriptServer.Response;
|
|||||||
public class ActionDefinitionsRestApiTest extends BaseRMWebScriptTestCase
|
public class ActionDefinitionsRestApiTest extends BaseRMWebScriptTestCase
|
||||||
{
|
{
|
||||||
/** URL for the REST APIs */
|
/** URL for the REST APIs */
|
||||||
private static final String RM_ACTIONDEFINITIONS_URL = "/api/rm/rm-actiondefinitions";
|
private static final String RM_ACTIONDEFINITIONS_URL = "/api/rm/rm-actiondefinitions";
|
||||||
private static final String DM_ACTIONDEFINITIONS_URL = "/api/rm/dm-actiondefinitions";
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Test the REST API to retrieve the list of rm action definitions
|
* Test the REST API to retrieve the list of rm action definitions
|
||||||
@@ -78,41 +77,6 @@ public class ActionDefinitionsRestApiTest extends BaseRMWebScriptTestCase
|
|||||||
assertTrue(rmActionDefinitions.containsAll(getRmActionDefinitions()));
|
assertTrue(rmActionDefinitions.containsAll(getRmActionDefinitions()));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Test the REST API to retrieve the list of dm action definitions
|
|
||||||
*
|
|
||||||
* @throws IOException
|
|
||||||
* @throws JSONException
|
|
||||||
*/
|
|
||||||
public void testDmGetActionDefinitions() throws IOException, JSONException
|
|
||||||
{
|
|
||||||
// Send request
|
|
||||||
Response response = sendRequest(new GetRequest(DM_ACTIONDEFINITIONS_URL), Status.STATUS_OK);
|
|
||||||
|
|
||||||
// Check the content from the response
|
|
||||||
String contentAsString = response.getContentAsString();
|
|
||||||
assertNotNull(contentAsString);
|
|
||||||
|
|
||||||
// Convert the response to json and check the data
|
|
||||||
JSONObject contentAsJson = new JSONObject(contentAsString);
|
|
||||||
JSONArray data = contentAsJson.getJSONArray("data");
|
|
||||||
assertNotNull(data);
|
|
||||||
|
|
||||||
// Get a (sub)list of available rm action definitions
|
|
||||||
List<String> rmActionDefinitions = getRmActionDefinitions();
|
|
||||||
|
|
||||||
// Get the list of dm action definitions from the response and check it
|
|
||||||
List<String> dmActionDefinitions = new ArrayList<String>();
|
|
||||||
for (int i = 0; i < data.length(); i++)
|
|
||||||
{
|
|
||||||
String name = data.getJSONObject(i).getString("name");
|
|
||||||
assertNotNull(name);
|
|
||||||
dmActionDefinitions.add(name);
|
|
||||||
assertFalse(rmActionDefinitions.contains(name));
|
|
||||||
}
|
|
||||||
assertTrue(dmActionDefinitions.containsAll(getDmActionDefinitions()));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns a (sub)list of rm action definitions
|
* Returns a (sub)list of rm action definitions
|
||||||
*
|
*
|
||||||
|
Reference in New Issue
Block a user