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 booleancreateRole(ProxyPentahoRole proxyRole)creates a new role.booleancreateUser(ProxyPentahoUser proxyUser)creates a new user.booleandeleteRoles(ProxyPentahoRole[] roles)deletes a set of roles.booleandeleteUsers(ProxyPentahoUser[] users)deletes a set of users.protected org.pentaho.platform.api.engine.security.userroledao.IUserRoleDaogetDao()ProxyPentahoRole[]getRoles()returns the list of roles defined in the systemProxyPentahoRole[]getRolesForUser(ProxyPentahoUser proxyUser)returns a set of roles for a userProxyPentahoUsergetUser(String pUserName)returns the user object based on the username.UserRoleSecurityInfogetUserRoleSecurityInfo()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 booleanisAdmin()voidsetRoles(ProxyPentahoUser proxyUser, ProxyPentahoRole[] assignedRoles)sets the roles for a user.voidsetUsers(ProxyPentahoRole proxyRole, ProxyPentahoUser[] assignedUsers)sets the users for a role.voidupdateRole(String roleName, String description, List<String> usernames)Updates a role object with a new description and set of usernames.booleanupdateRoleObject(ProxyPentahoRole proxyPentahoRole)This updates the named role's attributes.booleanupdateUser(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:IUserRoleWebServiceThis method returns the entire set of users and roles in the system- Specified by:
getUserRoleSecurityInfoin interfaceIUserRoleWebService- Returns:
- an info object
- Throws:
UserRoleException
-
createUser
public boolean createUser(ProxyPentahoUser proxyUser) throws UserRoleException
Description copied from interface:IUserRoleWebServicecreates a new user.- Specified by:
createUserin interfaceIUserRoleWebService- Returns:
- Throws:
UserRoleException
-
deleteUsers
public boolean deleteUsers(ProxyPentahoUser[] users) throws UserRoleException
Description copied from interface:IUserRoleWebServicedeletes a set of users.- Specified by:
deleteUsersin interfaceIUserRoleWebService- Returns:
- Throws:
UserRoleException
-
getUser
public ProxyPentahoUser getUser(String pUserName) throws UserRoleException
Description copied from interface:IUserRoleWebServicereturns the user object based on the username.- Specified by:
getUserin interfaceIUserRoleWebService- Returns:
- Throws:
UserRoleException
-
getUsers
public ProxyPentahoUser[] getUsers() throws UserRoleException
Description copied from interface:IUserRoleWebServicereturns the list of users.- Specified by:
getUsersin interfaceIUserRoleWebService- Returns:
- Throws:
UserRoleException
-
getUsersForRole
public ProxyPentahoUser[] getUsersForRole(ProxyPentahoRole proxyRole) throws UserRoleException
Description copied from interface:IUserRoleWebServicereturns the list of users that have a specific role.- Specified by:
getUsersForRolein interfaceIUserRoleWebService- Returns:
- Throws:
UserRoleException
-
updateUser
public boolean updateUser(ProxyPentahoUser proxyUser) throws UserRoleException
Description copied from interface:IUserRoleWebServiceThis updates the named user's attributes- Specified by:
updateUserin interfaceIUserRoleWebService- Returns:
- Throws:
UserRoleException
-
setRoles
public void setRoles(ProxyPentahoUser proxyUser, ProxyPentahoRole[] assignedRoles) throws UserRoleException
Description copied from interface:IUserRoleWebServicesets the roles for a user.- Specified by:
setRolesin interfaceIUserRoleWebService- Throws:
UserRoleException
-
setUsers
public void setUsers(ProxyPentahoRole proxyRole, ProxyPentahoUser[] assignedUsers) throws UserRoleException
Description copied from interface:IUserRoleWebServicesets the users for a role.- Specified by:
setUsersin interfaceIUserRoleWebService- Throws:
UserRoleException
-
updateRole
public void updateRole(String roleName, String description, List<String> usernames) throws UserRoleException
Description copied from interface:IUserRoleWebServiceUpdates a role object with a new description and set of usernames.- Specified by:
updateRolein interfaceIUserRoleWebService- Throws:
UserRoleException
-
createRole
public boolean createRole(ProxyPentahoRole proxyRole) throws UserRoleException
Description copied from interface:IUserRoleWebServicecreates a new role.- Specified by:
createRolein interfaceIUserRoleWebService- Returns:
- Throws:
UserRoleException
-
deleteRoles
public boolean deleteRoles(ProxyPentahoRole[] roles) throws UserRoleException
Description copied from interface:IUserRoleWebServicedeletes a set of roles.- Specified by:
deleteRolesin interfaceIUserRoleWebService- Returns:
- Throws:
UserRoleException
-
getRolesForUser
public ProxyPentahoRole[] getRolesForUser(ProxyPentahoUser proxyUser) throws UserRoleException
Description copied from interface:IUserRoleWebServicereturns a set of roles for a user- Specified by:
getRolesForUserin interfaceIUserRoleWebService- Returns:
- Throws:
UserRoleException
-
getRoles
public ProxyPentahoRole[] getRoles() throws UserRoleException
Description copied from interface:IUserRoleWebServicereturns the list of roles defined in the system- Specified by:
getRolesin interfaceIUserRoleWebService- Returns:
- Throws:
UserRoleException
-
updateRoleObject
public boolean updateRoleObject(ProxyPentahoRole proxyPentahoRole) throws UserRoleException
Description copied from interface:IUserRoleWebServiceThis updates the named role's attributes. It is named differently than the IUserRoleDao because of issues with webservice method overloading.- Specified by:
updateRoleObjectin interfaceIUserRoleWebService- Returns:
- Throws:
UserRoleException
-
-