Class UserRoleWebService
- java.lang.Object
-
- org.pentaho.platform.security.userroledao.ws.UserRoleWebService
-
- All Implemented Interfaces:
IUserRoleWebService
- Direct Known Subclasses:
AuthorizationPolicyBasedUserRoleWebService
public class UserRoleWebService extends Object implements IUserRoleWebService
This class implements a concrete form of IUserRoleDao, wrapping the underlying IUserRoleDao implementation.- Author:
- Will Gorman (wgorman@pentaho.com)
-
-
Constructor Summary
Constructors Constructor Description UserRoleWebService()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
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()
ProxyPentahoRole[]
getRoles()
returns the list of roles defined in the systemProxyPentahoRole[]
getRolesForUser(ProxyPentahoUser proxyUser)
returns a set of roles for a userProxyPentahoUser
getUser(String pUserName)
returns the user object based on the username.UserRoleSecurityInfo
getUserRoleSecurityInfo()
This method returns the entire set of users and roles in the systemProxyPentahoUser[]
getUsers()
returns the list of users.ProxyPentahoUser[]
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
-
-
-
Method Detail
-
isAdmin
protected boolean isAdmin()
-
getDao
protected org.pentaho.platform.api.engine.security.userroledao.IUserRoleDao getDao() throws UserRoleException
- Throws:
UserRoleException
-
getUserRoleSecurityInfo
public UserRoleSecurityInfo getUserRoleSecurityInfo() throws UserRoleException
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
public boolean createUser(ProxyPentahoUser proxyUser) throws UserRoleException
Description copied from interface:IUserRoleWebService
creates a new user.- Specified by:
createUser
in interfaceIUserRoleWebService
- Returns:
- Throws:
UserRoleException
-
deleteUsers
public boolean deleteUsers(ProxyPentahoUser[] users) throws UserRoleException
Description copied from interface:IUserRoleWebService
deletes a set of users.- Specified by:
deleteUsers
in interfaceIUserRoleWebService
- Returns:
- Throws:
UserRoleException
-
getUser
public ProxyPentahoUser getUser(String pUserName) throws UserRoleException
Description copied from interface:IUserRoleWebService
returns the user object based on the username.- Specified by:
getUser
in interfaceIUserRoleWebService
- Returns:
- Throws:
UserRoleException
-
getUsers
public ProxyPentahoUser[] getUsers() throws UserRoleException
Description copied from interface:IUserRoleWebService
returns the list of users.- Specified by:
getUsers
in interfaceIUserRoleWebService
- Returns:
- Throws:
UserRoleException
-
getUsersForRole
public ProxyPentahoUser[] getUsersForRole(ProxyPentahoRole proxyRole) throws UserRoleException
Description copied from interface:IUserRoleWebService
returns the list of users that have a specific role.- Specified by:
getUsersForRole
in interfaceIUserRoleWebService
- Returns:
- Throws:
UserRoleException
-
updateUser
public boolean updateUser(ProxyPentahoUser proxyUser) throws UserRoleException
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
public boolean createRole(ProxyPentahoRole proxyRole) throws UserRoleException
Description copied from interface:IUserRoleWebService
creates a new role.- Specified by:
createRole
in interfaceIUserRoleWebService
- Returns:
- Throws:
UserRoleException
-
deleteRoles
public boolean deleteRoles(ProxyPentahoRole[] roles) throws UserRoleException
Description copied from interface:IUserRoleWebService
deletes a set of roles.- Specified by:
deleteRoles
in interfaceIUserRoleWebService
- Returns:
- Throws:
UserRoleException
-
getRolesForUser
public ProxyPentahoRole[] getRolesForUser(ProxyPentahoUser proxyUser) throws UserRoleException
Description copied from interface:IUserRoleWebService
returns a set of roles for a user- Specified by:
getRolesForUser
in interfaceIUserRoleWebService
- Returns:
- Throws:
UserRoleException
-
getRoles
public ProxyPentahoRole[] getRoles() throws UserRoleException
Description copied from interface:IUserRoleWebService
returns the list of roles defined in the system- Specified by:
getRoles
in interfaceIUserRoleWebService
- Returns:
- Throws:
UserRoleException
-
updateRoleObject
public boolean updateRoleObject(ProxyPentahoRole proxyPentahoRole) throws UserRoleException
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
-
-