use of org.alfresco.rest.framework.core.exceptions.EntityNotFoundException 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