use of com.centurylink.mdw.common.exception.DataAccessException in project mdw-designer by CenturyLinkCloud.
the class RuntimeDataAccessRest method getDocument.
public DocumentVO getDocument(Long documentId) throws DataAccessException {
try {
String pathWithArgs = "DocumentValues/" + documentId;
if (!getServer().isSchemaVersion61())
pathWithArgs = "DocumentValue?format=json&id=" + documentId;
String response = getServer().invokeResourceServiceRaw(pathWithArgs);
DocumentVO docVO = new DocumentVO();
docVO.setContent(response);
docVO.setDocumentId(documentId);
return docVO;
} catch (IOException ex) {
throw new DataAccessOfflineException(ex.getMessage(), ex);
} catch (Exception ex) {
throw new DataAccessException(ex.getMessage(), ex);
}
}
Aggregations