@Override public String[] getRoleNames() throws UserStoreException { try { return stub.getRoleNames(); } catch (Exception e) { handleException(e.getMessage(), e); } return new String[0]; }
public String[] getRoleNames() throws UserStoreException { try { return stub.getRoleNames(); } catch (Exception e) { handleException(e.getMessage(), e); } return null; }
/** * Query the remote user manager and retrieve the list of role names in users-store * * * @return the list of roles * @throws org.wso2.carbon.appmgt.api.AppManagementException If and error occurs while accessing the admin service */ public String[] getRoleNames() throws AppManagementException { CarbonUtils.setBasicAccessSecurityHeaders(username, password, true, userStoreManager._getServiceClient()); if (cookie != null) { userStoreManager._getServiceClient().getOptions().setProperty(HTTPConstants.COOKIE_STRING, cookie); } try { String[] roles = userStoreManager.getRoleNames(); ServiceContext serviceContext = userStoreManager. _getServiceClient().getLastOperationContext().getServiceContext(); cookie = (String) serviceContext.getProperty(HTTPConstants.COOKIE_STRING); return roles; } catch (Exception e) { throw new AppManagementException("Error while accessing backend services for " + "getting list of all the roles.", e); } } }