RM-5087 - when POST return minimal info

This commit is contained in:
Ramona Popa
2017-05-16 10:21:24 +03:00
parent 4c2c1b0572
commit cda2da987e
6 changed files with 8 additions and 12 deletions

View File

@@ -213,7 +213,7 @@ public class FilePlanChildrenRelation implements RelationshipResourceAction.Read
for (NodeRef newNodeRef : createdNodes) for (NodeRef newNodeRef : createdNodes)
{ {
FileInfo info = fileFolderService.getFileInfo(newNodeRef); FileInfo info = fileFolderService.getFileInfo(newNodeRef);
result.add(nodesModelFactory.createRecordCategory(info, parameters, mapUserInfo, false)); result.add(nodesModelFactory.createRecordCategory(info, parameters, mapUserInfo, true));
} }
return result; return result;

View File

@@ -208,7 +208,7 @@ public class RecordCategoryChildrenRelation implements RelationshipResourceActio
for (NodeRef nodeInfo : createdNodes) for (NodeRef nodeInfo : createdNodes)
{ {
FileInfo info = fileFolderService.getFileInfo(nodeInfo); FileInfo info = fileFolderService.getFileInfo(nodeInfo);
result.add(nodesModelFactory.createRecordCategoryChild(info, parameters, mapUserInfo, false)); result.add(nodesModelFactory.createRecordCategoryChild(info, parameters, mapUserInfo, true));
} }
return result; return result;

View File

@@ -182,7 +182,7 @@ public class RecordFolderChildrenRelation implements RelationshipResourceAction.
{ {
FileInfo info = fileFolderService.getFileInfo(newNodeRef); FileInfo info = fileFolderService.getFileInfo(newNodeRef);
apiUtils.postActivity(info, parentNodeRef, ActivityType.FILE_ADDED); apiUtils.postActivity(info, parentNodeRef, ActivityType.FILE_ADDED);
result.add(nodesModelFactory.createRecord(info, parameters, mapUserInfo, false)); result.add(nodesModelFactory.createRecord(info, parameters, mapUserInfo, true));
} }
return result; return result;
@@ -216,6 +216,6 @@ public class RecordFolderChildrenRelation implements RelationshipResourceAction.
// Get file info for response // Get file info for response
FileInfo info = fileFolderService.getFileInfo(newNode); FileInfo info = fileFolderService.getFileInfo(newNode);
apiUtils.postActivity(info, parentNodeRef, ActivityType.FILE_ADDED); apiUtils.postActivity(info, parentNodeRef, ActivityType.FILE_ADDED);
return nodesModelFactory.createRecord(info, parameters, null, false); return nodesModelFactory.createRecord(info, parameters, null, true);
} }
} }

View File

@@ -201,7 +201,7 @@ public class UnfiledContainerChildrenRelation implements RelationshipResourceAct
{ {
FileInfo info = fileFolderService.getFileInfo(newNodeRef); FileInfo info = fileFolderService.getFileInfo(newNodeRef);
apiUtils.postActivity(info, parentNodeRef, ActivityType.FILE_ADDED); apiUtils.postActivity(info, parentNodeRef, ActivityType.FILE_ADDED);
result.add(nodesModelFactory.createUnfiledContainerChild(info, parameters, mapUserInfo, false)); result.add(nodesModelFactory.createUnfiledContainerChild(info, parameters, mapUserInfo, true));
} }
return result; return result;
@@ -231,6 +231,6 @@ public class UnfiledContainerChildrenRelation implements RelationshipResourceAct
// Get file info for response // Get file info for response
FileInfo info = fileFolderService.getFileInfo(newNode); FileInfo info = fileFolderService.getFileInfo(newNode);
apiUtils.postActivity(info, parentNodeRef, ActivityType.FILE_ADDED); apiUtils.postActivity(info, parentNodeRef, ActivityType.FILE_ADDED);
return nodesModelFactory.createUnfiledContainerChild(info, parameters, null, false); return nodesModelFactory.createUnfiledContainerChild(info, parameters, null, true);
} }
} }

View File

@@ -208,7 +208,7 @@ public class UnfiledRecordFolderChildrenRelation implements RelationshipResource
{ {
FileInfo info = fileFolderService.getFileInfo(newNodeRef); FileInfo info = fileFolderService.getFileInfo(newNodeRef);
apiUtils.postActivity(info, parentNodeRef, ActivityType.FILE_ADDED); apiUtils.postActivity(info, parentNodeRef, ActivityType.FILE_ADDED);
result.add(nodesModelFactory.createUnfiledRecordFolderChild(info, parameters, mapUserInfo, false)); result.add(nodesModelFactory.createUnfiledRecordFolderChild(info, parameters, mapUserInfo, true));
} }
return result; return result;
@@ -244,6 +244,6 @@ public class UnfiledRecordFolderChildrenRelation implements RelationshipResource
FileInfo info = fileFolderService.getFileInfo(newNode); FileInfo info = fileFolderService.getFileInfo(newNode);
apiUtils.postActivity(info, parent, ActivityType.FILE_ADDED); apiUtils.postActivity(info, parent, ActivityType.FILE_ADDED);
return nodesModelFactory.createUnfiledRecordFolderChild(info, parameters, null, false); return nodesModelFactory.createUnfiledRecordFolderChild(info, parameters, null, true);
} }
} }

View File

@@ -336,8 +336,6 @@ paths:
the API method tries to create the API method tries to create
a unique name using an integer suffix. a unique name using an integer suffix.
Any field in the JSON body defined below can also be passed as a form-data field.
This API method also supports record category creation using application/json. This API method also supports record category creation using application/json.
You must specify at least a **name**. You must specify at least a **name**.
@@ -1179,8 +1177,6 @@ paths:
the API method tries to create the API method tries to create
a unique name using an integer suffix. a unique name using an integer suffix.
Any field in the JSON body defined below can also be passed as a form-data field.
This API method also supports record category or record folder creation using application/json. This API method also supports record category or record folder creation using application/json.
You must specify at least a **name** and **nodeType**. You must specify at least a **name** and **nodeType**.