Interface WebUserServicesSource


  • public interface WebUserServicesSource
    The WebUserServicesSource exposes several methods which perform useful operations related to user management.
    Since:
    MicroStrategy Web 7.5.2
    • 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.
      • getNewUserSearchObject

        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.
      • 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 - A WebUserEntity object which will be the user whose privileges will be categorized.
        Returns:
        A WebPrivilegeCategories collection, 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 - A WebSecurityRole object which will be the security role whose privileges will be categorized.
        Returns:
        A WebPrivilegeCategories collection, 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 WebSecurityRole in the configuration repository.
        Throws:
        WebObjectsException - thrown if there is any error occurred.
      • getContactsSource

        WebContactsSource getContactsSource()
        Since:
        MicroStrategy Web 9.0.0