Search in sources :

Example 1 with WorkgroupList

use of com.centurylink.mdw.model.value.user.WorkgroupList in project mdw-designer by CenturyLinkCloud.

the class UserDataAccessRest method getAllGroups.

public List<UserGroupVO> getAllGroups(boolean includeDeleted) throws DataAccessException {
    try {
        String pathWithArgs = "Workgroups?format=json";
        if (includeDeleted)
            pathWithArgs += "&includeDeleted=true";
        String response = invokeResourceService(pathWithArgs);
        return new WorkgroupList(response).getItems();
    } catch (IOException ex) {
        throw new DataAccessOfflineException(ex.getMessage(), ex);
    } catch (Exception ex) {
        throw new DataAccessException(ex.getMessage(), ex);
    }
}
Also used : DataAccessOfflineException(com.centurylink.mdw.dataaccess.DataAccessOfflineException) WorkgroupList(com.centurylink.mdw.model.value.user.WorkgroupList) IOException(java.io.IOException) DataAccessException(com.centurylink.mdw.common.exception.DataAccessException) IOException(java.io.IOException) FileNotFoundException(java.io.FileNotFoundException) DataAccessOfflineException(com.centurylink.mdw.dataaccess.DataAccessOfflineException) DataAccessException(com.centurylink.mdw.common.exception.DataAccessException)

Aggregations

DataAccessException (com.centurylink.mdw.common.exception.DataAccessException)1 DataAccessOfflineException (com.centurylink.mdw.dataaccess.DataAccessOfflineException)1 WorkgroupList (com.centurylink.mdw.model.value.user.WorkgroupList)1 FileNotFoundException (java.io.FileNotFoundException)1 IOException (java.io.IOException)1