RM-4360 - added documentation and fixed an error code

This commit is contained in:
Ana Bozianu
2016-11-23 17:31:39 +02:00
parent 384b2ba06f
commit 316bb4919c
3 changed files with 24 additions and 2 deletions

View File

@@ -19,4 +19,5 @@ rm.service.close-record-folder-not-folder=The record folder couldn't be closed b
rm.service.node-has-aspect=The record type {1} is already showing for record {0}. rm.service.node-has-aspect=The record type {1} is already showing for record {0}.
rm.service.final-version=Final rm.service.final-version=Final
rm.service.final-version-description=The final archived record version rm.service.final-version-description=The final archived record version
rm.service.enable-autoversion-on-record-creation=Auto Version on Record Creation rm.service.enable-autoversion-on-record-creation=Auto Version on Record Creation
rm.service.add-children-to-closed-record-folder=You can't add new items to a closed record folder

View File

@@ -80,6 +80,8 @@ public class RecordFolderType extends AbstractDisposableItem
/** I18N */ /** I18N */
private static final String MSG_CANNOT_CREATE_RECORD_FOLDER_CHILD = "rm.action.create.record.folder.child-error-message"; private static final String MSG_CANNOT_CREATE_RECORD_FOLDER_CHILD = "rm.action.create.record.folder.child-error-message";
private static final String MSG_CANNOT_CREATE_CHILDREN_IN_CLOSED_RECORD_FOLDER = "rm.service.add-children-to-closed-record-folder";
/** /**
* @param recordService record service * @param recordService record service
*/ */
@@ -235,7 +237,7 @@ public class RecordFolderType extends AbstractDisposableItem
Boolean isClosed = (Boolean) nodeService.getProperty(recordFolder, PROP_IS_CLOSED); Boolean isClosed = (Boolean) nodeService.getProperty(recordFolder, PROP_IS_CLOSED);
if (isClosed != null && isClosed) if (isClosed != null && isClosed)
{ {
throw new AlfrescoRuntimeException("You can't add new items to a closed record folder."); throw new IntegrityException(I18NUtil.getMessage(MSG_CANNOT_CREATE_CHILDREN_IN_CLOSED_RECORD_FOLDER), null);
} }
} }
} }

View File

@@ -261,6 +261,25 @@ paths:
} }
``` ```
You can create a non-electronic record like this:
```JSON
{
"name":"My Non-electronic Record",
"nodeType":"rma:nonElectronicDocument",
"properties":
{
"cm:description":"My Non-electronic Record Description",
"cm:title":"My Non-electronic Record Title",
"rma:box":"My Non-electronic Record Box",
"rma:file":"My Non-electronic Record File",
"rma:numberOfCopies":1,
"rma:physicalSize":30,
"rma:shelf":"My Non-electronic Record Shelf",
"rma:storageLocation":"My Non-electronic Record Location"
}
}
```
You can create a fileplan component inside a container hierarchy: You can create a fileplan component inside a container hierarchy:
```JSON ```JSON
{ {