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 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.
    Since:
    MicroStrategy Web 7.5.2
    • Method Detail

      • clear

        @Deprecated
        void clear()
            throws WebObjectsException
        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.
        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 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:
        java.lang.IllegalArgumentException - Thrown if either argument is null.
        WebObjectsException
        Since:
        MicroStrategy Web 9.0.0
      • getRoles

        WebSecurityRole[] getRoles​(WebProject project)
                            throws WebObjectsException
        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.
        Throws:
        WebObjectsException
        Since:
        MicroStrategy Web 9.0.0
      • 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