public interface

WebUserSecurityRoles

com.microstrategy.web.objects.admin.users.WebUserSecurityRoles

Class Overview

The WebUserSecurityRoles interface represents the set of security roles associated with a user entity. Each project can have 0 or 1 WebSecurityRole objects associated with it for this user. Note that any changes made to this interface will not be saved to the Intelligence Server until the WebUserEntity object that this object was obtained from is saved.

Summary

Public Methods
abstract void addRole(WebProject project, WebSecurityRole role)
This method associates the given WebSecurityRole object with the given WebProject object for the user.
abstract void clear()
This method is deprecated. use removeAllRoles() instead.
abstract WebSecurityRole get(WebProject project)
This method is deprecated. use getRoles(WebProject) to get the list of roles
abstract List<WebSecurityRoleRecord> getInheritedSecurityRoles(WebProject project)
Get the inherited roles for this user, which does not contain the result of itself.
abstract WebProject[] getKeys()
Returns a complete list of projects which the user has a security role associated with.
abstract WebSecurityRole[] getRoles(WebProject project)
Returns the WebSecurityRole object associated with the given project.
abstract void put(WebProject project, WebSecurityRole role)
This method is deprecated. use addRole(WebProject, WebSecurityRole) to add a role
abstract void remove(WebProject project)
This method is deprecated. use removeAllRoles(WebProject) instead.
abstract void removeAllRoles(WebProject project)
Disassociates any security roles which may be associated with the given project for this user.
abstract void removeAllRoles()
Clears all security role-project associations from this user.
abstract void removeRole(WebProject project, WebSecurityRole role)
Disassociates the security roles associated with the given project for this user.
abstract int size()
Returns the number of security role-project associations in the project.

Public Methods

public abstract void addRole (WebProject project, WebSecurityRole role)

This method associates the given WebSecurityRole object with the given WebProject 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 The WebProject object corresponding to the project to associate the role with.
role The WebSecurityRole object to associate with the project.
Throws
IllegalArgumentException Thrown if either argument is null.
WebObjectsException

public abstract void clear ()

This method is deprecated.
use removeAllRoles() 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.

public abstract WebSecurityRole get (WebProject project)

This method is deprecated.
use getRoles(WebProject) to get the list of roles

Returns the WebSecurityRole object associated with the given project. If no security filter is associated with the given project, this method will return null.

Parameters
project The WebProject 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.

public abstract List<WebSecurityRoleRecord> getInheritedSecurityRoles (WebProject project)

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
Throws
WebObjectsException
WebObjectsException

public abstract WebProject[] getKeys ()

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.

public abstract WebSecurityRole[] getRoles (WebProject project)

Returns the WebSecurityRole object associated with the given project. If no security filter is associated with the given project, this method will return null.

Parameters
project The WebProject 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.

public abstract void put (WebProject project, WebSecurityRole role)

This method is deprecated.
use addRole(WebProject, WebSecurityRole) to add a role

This method associates the given WebSecurityRole object with the given WebProject 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 The WebProject object corresponding to the project to associate the role with.
role The WebSecurityRole object to associate with the project.
Throws
IllegalArgumentException Thrown if either argument is null.
WebObjectsException

public abstract void remove (WebProject project)

This method is deprecated.
use removeAllRoles(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.

public abstract void removeAllRoles (WebProject project)

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.

public abstract void removeAllRoles ()

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.

public abstract void removeRole (WebProject project, WebSecurityRole role)

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.

public abstract int size ()

Returns the number of security role-project associations in the project.

Returns
  • The number of items in the collection.