public interface

WebUserServicesSource

com.microstrategy.web.objects.admin.users.WebUserServicesSource

Class Overview

The WebUserServicesSource exposes several methods which perform useful operations related to user management.

Summary

Public Methods
abstract WebUserEntity duplicateUser(WebUserEntity userToDuplicate)
This method can be used to duplicate user entity objects.
abstract WebContactsSource getContactsSource()
abstract WebUserEntity getNamedUser(int userType)
Returns the WebUserEntity object referring to the named user value passed to this method from EnumWebNamedUsers.
abstract WebUserSearch getNewUserSearchObject()
Returns the WebUserSearch object which can be used to search users based on some criteria about security filters or security roles.
abstract WebPrivilegeCategories getPrivilegeCategories(WebSecurityRole securityRole)
Returns a set of categorized privileges for the given security role.
abstract WebPrivilegeCategories getPrivilegeCategories(WebUserEntity user)
Returns a set of categorized privileges for the given user.
abstract WebMDSecurityFilter[] getSecurityFilters(WebProjectInstance project)
Returns an array of WebMDSecurityFilter, which are the collection of all security filters for the project that is specififed by input.
abstract WebSecurityRole[] getSecurityRoles()
Returns all the security roles in the configuration repository.

Public Methods

public abstract WebUserEntity duplicateUser (WebUserEntity userToDuplicate)

This method can be used to duplicate user entity objects. The duplicate user will not be saved back to metadata immediately. Instead, the new user object must have at least it's full name and login name changed before saving the object to metadata using the save method.

Parameters
userToDuplicate The user to duplicate.
Returns
  • The new copy of the given user object.
Throws
WebObjectsException Thrown if an error occurs.

public abstract WebContactsSource getContactsSource ()

public abstract WebUserEntity getNamedUser (int userType)

Returns the WebUserEntity object referring to the named user value passed to this method from EnumWebNamedUsers. For example, if the "Administrator" value from that enumeration is passed as the userType parameter, then the Administrator user will be returned.

Parameters
userType The type of the user, from EnumWebNamedUsers.
Returns
  • An unpopulated WebUserEntity object referring to the user object.
Throws
WebObjectsException Thrown if an error occurs.

public abstract WebUserSearch getNewUserSearchObject ()

Returns the WebUserSearch object which can be used to search users based on some criteria about security filters or security roles.

Returns
  • WebUserSearch object.

public abstract WebPrivilegeCategories getPrivilegeCategories (WebSecurityRole securityRole)

Returns a set of categorized privileges for the given security role. Each category will contain a user-defined set of privileges belonging to that category. Each category will contain all privileges defined as part of that category, regardless of whether the user has the privilege or not. The categories themselves will be defined by a file in the classpath called PrivilegeCategories.xml. If this file is not found, or is not formatted correctly, then no categories will be returned. The format of the file is the following:



...

...

Parameters
securityRole A WebSecurityRole object which will be the security role whose privileges will be categorized.
Returns
Throws
WebObjectsException Thrown if an error occurs when getting privileges for the user.

public abstract WebPrivilegeCategories getPrivilegeCategories (WebUserEntity user)

Returns a set of categorized privileges for the given user. Each category will contain a user-defined set of privileges belonging to that category. Each category will contain all privileges defined as part of that category, regardless of whether the user has the privilege or not. The categories themselves will be defined by a file in the classpath called PrivilegeCategories.xml. If this file is not found, or is not formatted correctly, then no categories will be returned. The format of the file is the following:
<privilege_categories_xml resource_bundle="PrivilegeNames">
<privilege_category tp="1" resource_key="keyName">
<privilege tp="1" />
...
</privilege_category>
...
</privilege_categories_xml>

Parameters
user A WebUserEntity object which will be the user whose privileges will be categorized.
Returns
Throws
WebObjectsException Thrown if an error occurs when getting privileges for the user.

public abstract WebMDSecurityFilter[] getSecurityFilters (WebProjectInstance project)

Returns an array of WebMDSecurityFilter, which are the collection of all security filters for the project that is specififed by input.

Parameters
project The project whose security filters will be retrieved.
Returns
Throws
WebObjectsException Thrown if error occurs.

public abstract WebSecurityRole[] getSecurityRoles ()

Returns all the security roles in the configuration repository.

Returns
  • an array of WebSecurityRole in the configuration repository.
Throws
WebObjectsException thrown if there is any error occurred.