use of org.alfresco.module.org_alfresco_module_rm.record.RecordMissingMetadataException in project records-management by Alfresco.
the class RecordsEntityResource method completeRecord.
@Operation("complete")
@WebApiDescription(title = "Complete record", description = "Complete a record.")
public Record completeRecord(String recordId, Void body, Parameters parameters, WithResponse withResponse) {
checkNotBlank("recordId", recordId);
mandatory("parameters", parameters);
// Get record
NodeRef record = apiUtils.validateRecord(recordId);
// Complete the record
try {
recordService.complete(record);
} catch (RecordMissingMetadataException e) {
throw new IntegrityException("The record has missing mandatory properties.", null);
}
// return record state
FileInfo info = fileFolderService.getFileInfo(record);
return nodesModelFactory.createRecord(info, parameters, null, false);
}
Aggregations