RM-4405: added some utility methods

This commit is contained in:
Kristijan Conkas
2016-12-07 16:37:22 +00:00
parent bf390076ff
commit 6383308df0
3 changed files with 35 additions and 17 deletions

View File

@@ -157,6 +157,7 @@ public class FilePlanComponentAPI extends RestAPI<FilePlanComponentAPI>
public FilePlanComponent createElectronicRecord(FilePlanComponent electronicRecordModel, File recordContent, String parentId) throws Exception
{
mandatoryObject("filePlanComponentProperties", electronicRecordModel);
mandatoryString("parentId", parentId);
if (!electronicRecordModel.getNodeType().equals(FilePlanComponentType.CONTENT_TYPE.toString()))
{
fail("Only electronic records are supported");