Interface WebUserSecurityRoles
-
public interface WebUserSecurityRoles
The WebUserSecurityRoles interface represents the set of security roles associated with a user entity. Each project can have 0 or 1WebSecurityRole
objects associated with it for this user. Note that any changes made to this interface will not be saved to the Intelligence Server until theWebUserEntity
object that this object was obtained from is saved.- Since:
- MicroStrategy Web 7.5.2
-
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description void
addRole(WebProject project, WebSecurityRole role)
This method associates the givenWebSecurityRole
object with the givenWebProject
object for the user.void
clear()
Deprecated.useremoveAllRoles()
instead.WebSecurityRole
get(WebProject project)
Deprecated.usegetRoles(WebProject)
to get the list of rolesjava.util.List<WebSecurityRoleRecord>
getInheritedSecurityRoles(WebProject project)
Get the inherited roles for this user, which does not contain the result of itself.WebProject[]
getKeys()
Returns a complete list of projects which the user has a security role associated with.WebSecurityRole[]
getRoles(WebProject project)
Returns theWebSecurityRole
object associated with the given project.void
put(WebProject project, WebSecurityRole role)
Deprecated.useaddRole(WebProject, WebSecurityRole)
to add a rolevoid
remove(WebProject project)
Deprecated.useremoveAllRoles(WebProject)
instead.void
removeAllRoles()
Clears all security role-project associations from this user.void
removeAllRoles(WebProject project)
Disassociates any security roles which may be associated with the given project for this user.void
removeRole(WebProject project, WebSecurityRole role)
Disassociates the security roles associated with the given project for this user.int
size()
Returns the number of security role-project associations in the project.
-
-
-
Method Detail
-
put
@Deprecated void put(WebProject project, WebSecurityRole role) throws java.lang.IllegalArgumentException, WebObjectsException
Deprecated.useaddRole(WebProject, WebSecurityRole)
to add a roleThis method associates the givenWebSecurityRole
object with the givenWebProject
object for the user. If a security role is already associated with the given user, then it will be replaced with the new role for the given project.- Parameters:
project
- TheWebProject
object corresponding to the project to associate the role with.role
- TheWebSecurityRole
object to associate with the project.- Throws:
java.lang.IllegalArgumentException
- Thrown if either argument is null.WebObjectsException
-
get
@Deprecated WebSecurityRole get(WebProject project) throws WebObjectsException
Deprecated.usegetRoles(WebProject)
to get the list of rolesReturns theWebSecurityRole
object associated with the given project. If no security filter is associated with the given project, this method will return null.- Parameters:
project
- TheWebProject
object corresponding to look up the security filter for.- Returns:
- The
WebSecurityRole
object associated with the project, or null if no security role is associated with the project. - Throws:
WebObjectsException
-
remove
@Deprecated void remove(WebProject project) throws WebObjectsException
Deprecated.useremoveAllRoles(WebProject)
instead.Disassociates any security roles which may be associated with the given project for this user.- Parameters:
project
- The project to remove the security role from.- Throws:
WebObjectsException
-
clear
@Deprecated void clear() throws WebObjectsException
Deprecated.useremoveAllRoles()
instead.Clears all security role-project associations from this user. The user will have no security roles associated with it on any project after this call.- Throws:
WebObjectsException
-
getKeys
WebProject[] getKeys() throws WebObjectsException
Returns a complete list of projects which the user has a security role associated with. This method, along with the get method, can be used to iterate through the whole collection.- Returns:
- An array of WebProject objects representing the projects which the user has an association with a security role for.
- Throws:
WebObjectsException
-
size
int size() throws WebObjectsException
Returns the number of security role-project associations in the project.- Returns:
- The number of items in the collection.
- Throws:
WebObjectsException
-
addRole
void addRole(WebProject project, WebSecurityRole role) throws java.lang.IllegalArgumentException, WebObjectsException
This method associates the givenWebSecurityRole
object with the givenWebProject
object for the user. If a security role is already associated with the given user, then it will be replaced with the new role for the given project.- Parameters:
project
- TheWebProject
object corresponding to the project to associate the role with.role
- TheWebSecurityRole
object to associate with the project.- Throws:
java.lang.IllegalArgumentException
- Thrown if either argument is null.WebObjectsException
- Since:
- MicroStrategy Web 9.0.0
-
getRoles
WebSecurityRole[] getRoles(WebProject project) throws WebObjectsException
Returns theWebSecurityRole
object associated with the given project. If no security filter is associated with the given project, this method will return null.- Parameters:
project
- TheWebProject
object corresponding to look up the security filter for.- Returns:
- The
WebSecurityRole
object associated with the project, or null if no security role is associated with the project. - Throws:
WebObjectsException
- Since:
- MicroStrategy Web 9.0.0
-
getInheritedSecurityRoles
java.util.List<WebSecurityRoleRecord> getInheritedSecurityRoles(WebProject project) throws WebObjectsException
Get the inherited roles for this user, which does not contain the result of itself.- Parameters:
project
- The project to get the security role from.- Returns:
- The inherited roles of this user, it is a list of
WebSecurityRoleRecord
- Throws:
WebObjectsException
- Since:
- MicroStrategy Web 10.8
-
removeRole
void removeRole(WebProject project, WebSecurityRole role) throws WebObjectsException
Disassociates the security roles associated with the given project for this user.- Parameters:
project
- The project to remove the security role from.role
- The role to be removed.- Throws:
WebObjectsException
- Since:
- MicroStrategy Web 9.0.0
-
removeAllRoles
void removeAllRoles(WebProject project) throws WebObjectsException
Disassociates any security roles which may be associated with the given project for this user.- Parameters:
project
- The project to remove the security role from.- Throws:
WebObjectsException
- Since:
- MicroStrategy Web 9.0.0
-
removeAllRoles
void removeAllRoles() throws WebObjectsException
Clears all security role-project associations from this user. The user will have no security roles associated with it on any project after this call.- Throws:
WebObjectsException
- Since:
- MicroStrategy Web 9.0.0
-
-