mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-31 17:39:05 +00:00
RM-4615: javadoc tidy-up
This commit is contained in:
@@ -237,7 +237,7 @@ public class FilePlanComponentAPI extends RMModelRequest
|
|||||||
* @param recordContent {@link File} pointing to the content of the electronic record to be created
|
* @param recordContent {@link File} pointing to the content of the electronic record to be created
|
||||||
* @param parentId parent container id
|
* @param parentId parent container id
|
||||||
* @return newly created {@link FilePlanComponent}
|
* @return newly created {@link FilePlanComponent}
|
||||||
* @throws Exception if operation failed
|
* @throws Exception if electronic record couldn't be created
|
||||||
*/
|
*/
|
||||||
public FilePlanComponent createElectronicRecord(FilePlanComponent electronicRecordModel, File recordContent, String parentId) throws Exception
|
public FilePlanComponent createElectronicRecord(FilePlanComponent electronicRecordModel, File recordContent, String parentId) throws Exception
|
||||||
{
|
{
|
||||||
@@ -256,9 +256,8 @@ public class FilePlanComponentAPI extends RMModelRequest
|
|||||||
* For file uploads nodeBodyCreate is ignored hence can't be used. Append all FilePlanComponent fields
|
* For file uploads nodeBodyCreate is ignored hence can't be used. Append all FilePlanComponent fields
|
||||||
* to the request.
|
* to the request.
|
||||||
*/
|
*/
|
||||||
RequestSpecBuilder builder = restWrapper.configureRequestSpec();
|
RequestSpecBuilder builder = getRMRestWrapper().configureRequestSpec();
|
||||||
ObjectMapper mapper = new ObjectMapper();
|
JsonNode root = new ObjectMapper().readTree(toJson(electronicRecordModel));
|
||||||
JsonNode root = mapper.readTree(toJson(electronicRecordModel));
|
|
||||||
|
|
||||||
// add request fields
|
// add request fields
|
||||||
Iterator<String> fieldNames = root.fieldNames();
|
Iterator<String> fieldNames = root.fieldNames();
|
||||||
@@ -267,8 +266,9 @@ public class FilePlanComponentAPI extends RMModelRequest
|
|||||||
String fieldName = fieldNames.next();
|
String fieldName = fieldNames.next();
|
||||||
builder.addMultiPart(fieldName, root.get(fieldName).asText(), ContentType.JSON.name());
|
builder.addMultiPart(fieldName, root.get(fieldName).asText(), ContentType.JSON.name());
|
||||||
}
|
}
|
||||||
|
|
||||||
builder.addMultiPart("filedata", recordContent, ContentType.BINARY.name());
|
builder.addMultiPart("filedata", recordContent, ContentType.BINARY.name());
|
||||||
|
|
||||||
|
// create node with given content using core Node API
|
||||||
String nodeId = getRMRestWrapper().withCoreAPI().usingNode(parentNode).createNode().getId();
|
String nodeId = getRMRestWrapper().withCoreAPI().usingNode(parentNode).createNode().getId();
|
||||||
String createStatusCode = getRMRestWrapper().getStatusCode();
|
String createStatusCode = getRMRestWrapper().getStatusCode();
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user