@Test public void testListUsers() throws OdpsException { List<User> list = sm.listUsers(); for (User user : list) { Assert.assertNotNull(user.getID()); user.reload(); } }
public List<User> listUsers() throws OdpsException { String resource = ResourceBuilder.buildUsersResource(project); ListUsersResponse resp = client.request(ListUsersResponse.class, resource, "GET" ); List<User> users = new ArrayList<User>(); for (UserModel model : resp.users) { User t = new User(model, project, client); users.add(t); } return users; }
SecurityManager { public List<User> listUsers() throws OdpsException { String resource = ResourceBuilder.buildUsersResource(project); ListUsersResponse resp = client.request(ListUsersResponse.class, resource, "GET" ); List<User> users = new ArrayList<User>(); for (UserModel model : resp.users) { User t = new User(model, project, client); users.add(t); } return users; } }
SecurityManager { public List<User> listUsers() throws OdpsException { String resource = ResourceBuilder.buildUsersResource(project); ListUsersResponse resp = client.request(ListUsersResponse.class, resource, "GET" ); List<User> users = new ArrayList<User>(); for (UserModel model : resp.users) { User t = new User(model, project, client); users.add(t); } return users; } SecurityManager(String project, RestClient client); }
SecurityManager { public List<User> listUsers() throws OdpsException { String resource = ResourceBuilder.buildUsersResource(project); ListUsersResponse resp = client.request(ListUsersResponse.class, resource, "GET" ); List<User> users = new ArrayList<User>(); for (UserModel model : resp.users) { User t = new User(model, project, client); users.add(t); } return users; } SecurityManager(String project, RestClient client); SecurityConfiguration getSecurityConfiguration(); SecurityConfiguration getSecurityConfiguration(boolean strip); void setSecurityConfiguration(
      SecurityConfiguration securityConfigration
  ); void setSecurityConfiguration(
      SecurityConfiguration securityConfigration, String supervisionToken
  ); String getProjectPolicy(); void putProjectPolicy(String policy); String getSecurityPolicy(); void putSecurityPolicy(String securityPolicy); String getRolePolicy(String roleName); void putRolePolicy(String roleName, String policy); List<User> listUsers(); List<Role> listRoles(); @Deprecated List<Role> listRolesForUser(String uid); List<Role> listRolesForUserID(String uid); List<Role> listRolesForUserName(String userName); List<User> listUsersForRole(String roleName); CheckPermissionResultInfo checkPermission(PermissionDesc desc); @Deprecated CheckPermissionResult checkPermission(
      ObjectType type, String objectName,
      ActionType action, String projectName,
      List<String> columns
  ); @Deprecated CheckPermissionResult checkPermission(
      ObjectType type, String objectName,
      ActionType action, List<String> columns
  ); @Deprecated CheckPermissionResult checkPermission(
      ObjectType type, String objectName,
      ActionType action
  ); @Deprecated CheckPermissionResult checkPermission(
      ObjectType type, String objectName,
      ActionType action, String projectName
  ); AuthorizationQueryInstance run(String query, Boolean jsonOutput); AuthorizationQueryInstance run(String query, Boolean jsonOutput, String supervisionToken); String runQuery(String query, Boolean jsonOutput); String runQuery(String query, Boolean jsonOutput, String supervisionToken); String generateAuthorizationToken(String policy, String type); }
SecurityManager { public List<User> listUsers() throws OdpsException { String resource = ResourceBuilder.buildUsersResource(project); ListUsersResponse resp = client.request(ListUsersResponse.class, resource, "GET" ); List<User> users = new ArrayList<User>(); for (UserModel model : resp.users) { User t = new User(model, project, client); users.add(t); } return users; } SecurityManager(String project, RestClient client); SecurityConfiguration getSecurityConfiguration(); SecurityConfiguration getSecurityConfiguration(boolean strip); void setSecurityConfiguration(
      SecurityConfiguration securityConfigration
  ); void setSecurityConfiguration(
      SecurityConfiguration securityConfigration, String supervisionToken
  ); String getProjectPolicy(); void putProjectPolicy(String policy); String getSecurityPolicy(); void putSecurityPolicy(String securityPolicy); String getRolePolicy(String roleName); void putRolePolicy(String roleName, String policy); List<User> listUsers(); List<Role> listRoles(); @Deprecated List<Role> listRolesForUser(String uid); List<Role> listRolesForUserID(String uid); List<Role> listRolesForUserName(String userName); List<User> listUsersForRole(String roleName); CheckPermissionResultInfo checkPermission(PermissionDesc desc); @Deprecated CheckPermissionResult checkPermission(
      ObjectType type, String objectName,
      ActionType action, String projectName,
      List<String> columns
  ); @Deprecated CheckPermissionResult checkPermission(
      ObjectType type, String objectName,
      ActionType action, List<String> columns
  ); @Deprecated CheckPermissionResult checkPermission(
      ObjectType type, String objectName,
      ActionType action
  ); @Deprecated CheckPermissionResult checkPermission(
      ObjectType type, String objectName,
      ActionType action, String projectName
  ); AuthorizationQueryInstance run(String query, Boolean jsonOutput); AuthorizationQueryInstance run(String query, Boolean jsonOutput, String supervisionToken); String runQuery(String query, Boolean jsonOutput); String runQuery(String query, Boolean jsonOutput, String supervisionToken); String generateAuthorizationToken(String policy, String type);  }