use of org.alfresco.rest.framework.WebApiParam in project records-management by Alfresco.
the class RecordFolderEntityResource method readById.
@WebApiDescription(title = "Get record folder information", description = "Gets information for a record folder with id 'recordFolderId'")
@WebApiParam(name = "recordFolderId", title = "The record folder id")
public RecordFolder readById(String recordFolderId, Parameters parameters) {
checkNotBlank("recordFolderId", recordFolderId);
mandatory("parameters", parameters);
NodeRef nodeRef = apiUtils.lookupAndValidateNodeType(recordFolderId, RecordsManagementModel.TYPE_RECORD_FOLDER);
FileInfo info = fileFolderService.getFileInfo(nodeRef);
return nodesModelFactory.createRecordFolder(info, parameters, null, false);
}
use of org.alfresco.rest.framework.WebApiParam in project records-management by Alfresco.
the class RecordsEntityResource method readById.
@WebApiDescription(title = "Get record information", description = "Gets information for a record with id 'recordId'")
@WebApiParam(name = "recordId", title = "The record id")
public Record readById(String recordId, Parameters parameters) {
checkNotBlank("recordId", recordId);
mandatory("parameters", parameters);
NodeRef record = apiUtils.validateRecord(recordId);
FileInfo info = fileFolderService.getFileInfo(record);
return nodesModelFactory.createRecord(info, parameters, null, false);
}
use of org.alfresco.rest.framework.WebApiParam in project records-management by Alfresco.
the class TransferEntityResource method readById.
@Override
@WebApiDescription(title = "Get transfer information", description = "Gets information for a transfer with id 'transferId'")
@WebApiParam(name = "transferId", title = "The transfer id")
public Transfer readById(String transferId, Parameters parameters) throws EntityNotFoundException {
checkNotBlank("transferId", transferId);
mandatory("parameters", parameters);
NodeRef nodeRef = apiUtils.lookupAndValidateNodeType(transferId, RecordsManagementModel.TYPE_TRANSFER);
FileInfo info = fileFolderService.getFileInfo(nodeRef);
return nodesModelFactory.createTransfer(info, parameters, null, false);
}
use of org.alfresco.rest.framework.WebApiParam in project records-management by Alfresco.
the class FilePlanEntityResource method readById.
@WebApiDescription(title = "Get file plan information", description = "Get information for a file plan with id 'filePlanId'")
@WebApiParam(name = "filePlanId", title = "The file plan id")
public FilePlan readById(String filePlanId, Parameters parameters) {
checkNotBlank("filePlanId", filePlanId);
mandatory("parameters", parameters);
QName filePlanType = apiUtils.getFilePlanType();
if (// rm site not created
filePlanType == null) {
throw new EntityNotFoundException(filePlanId);
}
NodeRef nodeRef = apiUtils.lookupAndValidateNodeType(filePlanId, filePlanType);
FileInfo info = fileFolderService.getFileInfo(nodeRef);
return nodesModelFactory.createFilePlan(info, parameters, null, false);
}
Aggregations