Interface WebUserServicesSource
-
public interface WebUserServicesSourceThe WebUserServicesSource exposes several methods which perform useful operations related to user management.- Since:
- MicroStrategy Web 7.5.2
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description WebUserEntityduplicateUser(WebUserEntity userToDuplicate)This method can be used to duplicate user entity objects.WebContactsSourcegetContactsSource()WebUserEntitygetNamedUser(int userType)Returns theWebUserEntityobject referring to the named user value passed to this method fromEnumWebNamedUsers.WebUserSearchgetNewUserSearchObject()Returns theWebUserSearchobject which can be used to search users based on some criteria about security filters or security roles.WebPrivilegeCategoriesgetPrivilegeCategories(WebSecurityRole securityRole)Returns a set of categorized privileges for the given security role.WebPrivilegeCategoriesgetPrivilegeCategories(WebUserEntity user)Returns a set of categorized privileges for the given user.WebMDSecurityFilter[]getSecurityFilters(WebProjectInstance project)Returns an array ofWebMDSecurityFilter, which are the collection of all security filters for the project that is specififed by input.WebSecurityRole[]getSecurityRoles()Returns all the security roles in the configuration repository.
-
-
-
Method Detail
-
duplicateUser
WebUserEntity duplicateUser(WebUserEntity userToDuplicate) throws WebObjectsException
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.
-
getNamedUser
WebUserEntity getNamedUser(int userType) throws WebObjectsException
Returns theWebUserEntityobject referring to the named user value passed to this method fromEnumWebNamedUsers. 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, fromEnumWebNamedUsers.- Returns:
- An unpopulated
WebUserEntityobject referring to the user object. - Throws:
WebObjectsException- Thrown if an error occurs.
-
getSecurityFilters
WebMDSecurityFilter[] getSecurityFilters(WebProjectInstance project) throws WebObjectsException
Returns an array ofWebMDSecurityFilter, 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:
- An array of
WebMDSecurityFilter, the collection of all security filters for this project. - Throws:
WebObjectsException- Thrown if error occurs.
-
getNewUserSearchObject
WebUserSearch getNewUserSearchObject()
Returns theWebUserSearchobject which can be used to search users based on some criteria about security filters or security roles.- Returns:
- WebUserSearch object.
-
getPrivilegeCategories
WebPrivilegeCategories getPrivilegeCategories(WebUserEntity user) throws WebObjectsException
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- AWebUserEntityobject which will be the user whose privileges will be categorized.- Returns:
- A
WebPrivilegeCategoriescollection, containing the categories in the collection. - Throws:
WebObjectsException- Thrown if an error occurs when getting privileges for the user.
-
getPrivilegeCategories
WebPrivilegeCategories getPrivilegeCategories(WebSecurityRole securityRole) throws WebObjectsException
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- AWebSecurityRoleobject which will be the security role whose privileges will be categorized.- Returns:
- A
WebPrivilegeCategoriescollection, containing the categories in the collection. - Throws:
WebObjectsException- Thrown if an error occurs when getting privileges for the user.- Since:
- MicroStrategy Web 9.0.0
-
getSecurityRoles
WebSecurityRole[] getSecurityRoles() throws WebObjectsException
Returns all the security roles in the configuration repository.- Returns:
- an array of
WebSecurityRolein the configuration repository. - Throws:
WebObjectsException- thrown if there is any error occurred.
-
getContactsSource
WebContactsSource getContactsSource()
- Since:
- MicroStrategy Web 9.0.0
-
-