Interface WebPrivilegeCategory


  • public interface WebPrivilegeCategory
    This interface represents a collection of privileges which belong to a single category. Note that all privileges which belong to the category will be in the collection, regardless of whether the user has the privilege assigned to them or not.
    Since:
    MicroStrategy Web 7.5.2
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      WebPrivilegeEntry get​(int index)
      Returns the privilege at the given index.
      WebPrivilegeEntry getItemByPrivilegeType​(int privilege)
      Returns the privilege of the given type in the collection.
      java.lang.String getName()
      Returns the name of the category, if one exists.
      int getType()
      Returns the assigned type of this category.
      void grant()
      This method will grant all privileges in the collection to the user.
      boolean isGrantedLocally()
      Returns whether every privilege in this collection has the privilege set directly on itself.
      void revoke()
      This method will revoke all privileges in the collection from the user's list of privileges.
      int size()
      Returns the number of privileges in the collection.
    • Method Detail

      • getType

        int getType()
        Returns the assigned type of this category.
        Returns:
        The assigned type of the category.
      • size

        int size()
        Returns the number of privileges in the collection.
        Returns:
        The size of the collection.
      • get

        WebPrivilegeEntry get​(int index)
        Returns the privilege at the given index.
        Parameters:
        index - The index of the privilege to return.
        Returns:
        The WebPrivilegeEntry object at the given index.
      • getItemByPrivilegeType

        WebPrivilegeEntry getItemByPrivilegeType​(int privilege)
        Returns the privilege of the given type in the collection.
        Parameters:
        privilege - The privilege to return, from EnumDSSXMLPrivilegeTypes.
        Returns:
        A WebPrivilegeEntry object corresponding to the given privilege type.
      • grant

        void grant()
        This method will grant all privileges in the collection to the user.
      • revoke

        void revoke()
        This method will revoke all privileges in the collection from the user's list of privileges. Note that this will only affect those privileges which are assigned directly to the user - if the privilege is inherited from a parent or security role, then this method will not affect that relationship.
      • isGrantedLocally

        boolean isGrantedLocally()
        Returns whether every privilege in this collection has the privilege set directly on itself.
        Returns:
        True if every privilege in the collection has the privilege set directly on it, false otherwise.
      • getName

        java.lang.String getName()
        Returns the name of the category, if one exists.
        Returns:
        The name of the category.