RM-4431 CompleteRecordActionRestAPI

This commit is contained in:
Sara Aspery
2017-06-01 14:08:16 +01:00
parent 23c4684e70
commit 051936f5cf
6 changed files with 509 additions and 59 deletions

View File

@@ -139,6 +139,32 @@ public class RecordsAPI extends RMModelRequest
));
}
/**
* Complete the record recordId
*
* @param recordId The id of the record to complete
* @return The {@link Record} with the given properties
* @throws Exception for the following cases:
* <ul>
* <li>Invalid parameter: {@code recordBodyFile} is not a valid format,{@code recordId} is not a record</li>
* <li>authentication fails</li>
* <li>current user does not have permission to file to {@code fileplanComponentId}</li>
* <li>{@code recordId} does not exist</li>
* <li>model integrity exception: the record is already complete</li>
* <li>model integrity exception: the record has missing meta-data</li>
* </ul>
*/
public Record completeRecord(String recordId, String parameters) throws Exception
{
mandatoryString("recordId", recordId);
return getRmRestWrapper().processModel(Record.class, simpleRequest(
POST,
"/records/{recordId}/complete?{parameters}",
recordId,
parameters
));
}
/**
* Deletes a record.
*