Class UserRoleWebService
java.lang.Object
org.pentaho.platform.security.userroledao.ws.UserRoleWebService
- All Implemented Interfaces:
IUserRoleWebService
- Direct Known Subclasses:
AuthorizationPolicyBasedUserRoleWebService
This class implements a concrete form of IUserRoleDao, wrapping the underlying IUserRoleDao implementation.
- Author:
- Will Gorman (wgorman@pentaho.com)
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
createRole
(ProxyPentahoRole proxyRole) creates a new role.boolean
createUser
(ProxyPentahoUser proxyUser) creates a new user.boolean
deleteRoles
(ProxyPentahoRole[] roles) deletes a set of roles.boolean
deleteUsers
(ProxyPentahoUser[] users) deletes a set of users.protected org.pentaho.platform.api.engine.security.userroledao.IUserRoleDao
getDao()
getRoles()
returns the list of roles defined in the systemgetRolesForUser
(ProxyPentahoUser proxyUser) returns a set of roles for a userreturns the user object based on the username.This method returns the entire set of users and roles in the systemgetUsers()
returns the list of users.getUsersForRole
(ProxyPentahoRole proxyRole) returns the list of users that have a specific role.protected boolean
isAdmin()
void
setRoles
(ProxyPentahoUser proxyUser, ProxyPentahoRole[] assignedRoles) sets the roles for a user.void
setUsers
(ProxyPentahoRole proxyRole, ProxyPentahoUser[] assignedUsers) sets the users for a role.void
updateRole
(String roleName, String description, List<String> usernames) Updates a role object with a new description and set of usernames.boolean
updateRoleObject
(ProxyPentahoRole proxyPentahoRole) This updates the named role's attributes.boolean
updateUser
(ProxyPentahoUser proxyUser) This updates the named user's attributes
-
Constructor Details
-
UserRoleWebService
public UserRoleWebService()
-
-
Method Details
-
isAdmin
protected boolean isAdmin() -
getDao
protected org.pentaho.platform.api.engine.security.userroledao.IUserRoleDao getDao() throws UserRoleException- Throws:
UserRoleException
-
getUserRoleSecurityInfo
Description copied from interface:IUserRoleWebService
This method returns the entire set of users and roles in the system- Specified by:
getUserRoleSecurityInfo
in interfaceIUserRoleWebService
- Returns:
- an info object
- Throws:
UserRoleException
-
createUser
Description copied from interface:IUserRoleWebService
creates a new user.- Specified by:
createUser
in interfaceIUserRoleWebService
- Returns:
- Throws:
UserRoleException
-
deleteUsers
Description copied from interface:IUserRoleWebService
deletes a set of users.- Specified by:
deleteUsers
in interfaceIUserRoleWebService
- Returns:
- Throws:
UserRoleException
-
getUser
Description copied from interface:IUserRoleWebService
returns the user object based on the username.- Specified by:
getUser
in interfaceIUserRoleWebService
- Returns:
- Throws:
UserRoleException
-
getUsers
Description copied from interface:IUserRoleWebService
returns the list of users.- Specified by:
getUsers
in interfaceIUserRoleWebService
- Returns:
- Throws:
UserRoleException
-
getUsersForRole
Description copied from interface:IUserRoleWebService
returns the list of users that have a specific role.- Specified by:
getUsersForRole
in interfaceIUserRoleWebService
- Returns:
- Throws:
UserRoleException
-
updateUser
Description copied from interface:IUserRoleWebService
This updates the named user's attributes- Specified by:
updateUser
in interfaceIUserRoleWebService
- Returns:
- Throws:
UserRoleException
-
setRoles
public void setRoles(ProxyPentahoUser proxyUser, ProxyPentahoRole[] assignedRoles) throws UserRoleException Description copied from interface:IUserRoleWebService
sets the roles for a user.- Specified by:
setRoles
in interfaceIUserRoleWebService
- Throws:
UserRoleException
-
setUsers
public void setUsers(ProxyPentahoRole proxyRole, ProxyPentahoUser[] assignedUsers) throws UserRoleException Description copied from interface:IUserRoleWebService
sets the users for a role.- Specified by:
setUsers
in interfaceIUserRoleWebService
- Throws:
UserRoleException
-
updateRole
public void updateRole(String roleName, String description, List<String> usernames) throws UserRoleException Description copied from interface:IUserRoleWebService
Updates a role object with a new description and set of usernames.- Specified by:
updateRole
in interfaceIUserRoleWebService
- Throws:
UserRoleException
-
createRole
Description copied from interface:IUserRoleWebService
creates a new role.- Specified by:
createRole
in interfaceIUserRoleWebService
- Returns:
- Throws:
UserRoleException
-
deleteRoles
Description copied from interface:IUserRoleWebService
deletes a set of roles.- Specified by:
deleteRoles
in interfaceIUserRoleWebService
- Returns:
- Throws:
UserRoleException
-
getRolesForUser
Description copied from interface:IUserRoleWebService
returns a set of roles for a user- Specified by:
getRolesForUser
in interfaceIUserRoleWebService
- Returns:
- Throws:
UserRoleException
-
getRoles
Description copied from interface:IUserRoleWebService
returns the list of roles defined in the system- Specified by:
getRoles
in interfaceIUserRoleWebService
- Returns:
- Throws:
UserRoleException
-
updateRoleObject
Description copied from interface:IUserRoleWebService
This updates the named role's attributes. It is named differently than the IUserRoleDao because of issues with webservice method overloading.- Specified by:
updateRoleObject
in interfaceIUserRoleWebService
- Returns:
- Throws:
UserRoleException
-