public class UserRoleListResource extends AbstractJaxRSResource
Modifier and Type | Field and Description |
---|---|
protected String |
adminRole |
protected static UserRoleListService |
userRoleListService |
acceptableMediaTypes, httpServletRequest, httpServletResponse, TEXT_HTML
Constructor and Description |
---|
UserRoleListResource() |
UserRoleListResource(ArrayList<String> systemRoles,
String adminRole,
ArrayList<String> extraRoles) |
UserRoleListResource(ArrayList<String> systemRoles,
String adminRole,
String anonymousRole,
ArrayList<String> extraRoles) |
Modifier and Type | Method and Description |
---|---|
RoleListWrapper |
getAllRoles()
Get a list of the all roles in the platform including Anonymous and Administrator.
|
RoleListWrapper |
getExtraRoles()
Returns roles identified as "extra roles" from the repository.
|
RoleListWrapper |
getPermissionRoles()
Return a list of the permission roles in the platform.
|
UserListWrapper |
getPermissionUsers()
Returns the list of permission users in the platform.
|
RoleListWrapper |
getRoles(String addExtraRoles)
Get a list of the standard roles in the platform.
|
RolesWrapper |
getRolesForUser(String user)
Gets the roles for the given user.
|
RoleListWrapper |
getSystemRoles()
Returns Roles identified as "system roles" from the repository.
|
UserListWrapper |
getUsers()
Returns the list of users in the platform.
|
UsersWrapper |
getUsersInRole(String role)
Gets the list of users that have the role specified by the role parameter.
|
setHttpHeaders
protected String adminRole
protected static UserRoleListService userRoleListService
public UserRoleListResource()
public UserRoleListResource(ArrayList<String> systemRoles, String adminRole, ArrayList<String> extraRoles)
public UserListWrapper getPermissionUsers() throws Exception
Example Request:
GET pentaho/api/userrolelist/permission-users
Example Response:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?><userList><users>pat</users><users>admin</users><users>suzy</users><users>tiffany</users><users>enco*de:te^s_t$</users></userList>
Exception
public RoleListWrapper getPermissionRoles() throws Exception
Example Request:
GET pentaho/api/userrolelist/permission-roles
Example Response:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?><roleList><roles>Anonymous</roles><roles>Business Analyst</roles><roles>Authenticated</roles><roles>Report Author</roles><roles>Power User</roles></roleList>
Exception
public UserListWrapper getUsers() throws Exception
Example Request:
GET pentaho/api/userrolelist/users
Example Response:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?><userList><users>pat</users><users>admin</users><users>suzy</users><users>tiffany</users><users>enco*de:te^s_t$</users></userList>
Exception
public RoleListWrapper getRoles(String addExtraRoles)
Example Request:
GET pentaho/api/userrolelist/roles
Example Response:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?><roleList><roles>Anonymous</roles><roles>Business Analyst</roles><roles>Authenticated</roles><roles>Report Author</roles><roles>Power User</roles></roleList>
public RoleListWrapper getAllRoles() throws Exception
Example Request:
GET pentaho/api/userrolelist/allRoles
Example Response:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?><roleList><roles>Anonymous</roles><roles>Business Analyst</roles><roles>Authenticated</roles><roles>Report Author</roles><roles>Power User</roles><roles>Authenticated</roles><roles>Anonymous</roles></roleList>
Exception
public RoleListWrapper getSystemRoles()
Example Request:
GET pentaho/api/userrolelist/systemRoles
Example Response:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?><roleList><roles>Authenticated</roles><roles>Administrator</roles><roles>Anonymous</roles></roleList>
public RoleListWrapper getExtraRoles()
Example Request:
GET pentaho/api/userrolelist/extraRoles
Example Response:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?><roleList><roles>Authenticated</roles><roles>Anonymous</roles></roleList>
public RolesWrapper getRolesForUser(String user) throws Exception
Example Request:
GET pentaho/api/userrolelist/getRolesForUser?user=admin
user
- The username to get the roles forExample Response:
<?xml version="1.0" encoding="UTF-8"?><roles><role>Administrator</role><role>Authenticated</role></roles>
Exception
public UsersWrapper getUsersInRole(String role) throws Exception
Example Request:
GET pentaho/api/userrolelist/getUsersInRole?role=Authenticated
role
- The role to get the users forExample Response:
<?xml version="1.0" encoding="UTF-8"?><users><user>pat</user><user>admin</user><user>suzy</user><user>tiffany</user><user>enco*de:te^s_t$</user></users>
Exception
Copyright © 2019 Hitachi Vantara. All rights reserved.