Interface WebPrivilegeCategory
-
public interface WebPrivilegeCategoryThis 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 WebPrivilegeEntryget(int index)Returns the privilege at the given index.WebPrivilegeEntrygetItemByPrivilegeType(int privilege)Returns the privilege of the given type in the collection.java.lang.StringgetName()Returns the name of the category, if one exists.intgetType()Returns the assigned type of this category.voidgrant()This method will grant all privileges in the collection to the user.booleanisGrantedLocally()Returns whether every privilege in this collection has the privilege set directly on itself.voidrevoke()This method will revoke all privileges in the collection from the user's list of privileges.intsize()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
WebPrivilegeEntryobject 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, fromEnumDSSXMLPrivilegeTypes.- Returns:
- A
WebPrivilegeEntryobject 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.
-
-