public final class PermissionsList extends ListPackWrapper
Modifier and Type | Method and Description |
---|---|
void |
addPermission(java.lang.String userOrRole,
java.lang.String permission,
boolean childPermissions)
Adds for the specified role or user the given permission for all entities.
|
int |
countPermissions()
Returns the number of entities this list contains the permissions for.
|
Permissions |
getPermissions(int index)
Returns the permissions for the given index in this list.
|
Permissions |
getPermissions(int catalogID,
int sourceID)
Returns the permissions for the given catalog ID and entity ID
|
java.util.Iterator |
getPermissionsIterator()
Returns an iterator for all contained permissions.
|
void |
removePermission(java.lang.String userOrRole,
java.lang.String permission,
boolean childPermissions)
Removes the specified permission for the specified role or user for all entities.
|
void |
save()
Saves all changes made.
|
toXMLString
public int countPermissions()
public Permissions getPermissions(int index)
index
- index of entity permissionspublic void addPermission(java.lang.String userOrRole, java.lang.String permission, boolean childPermissions)
userOrRole
- role name or user UIDpermission
- permission to addchildPermissions
- if set to true this settings belongs to the child categoriespublic void removePermission(java.lang.String userOrRole, java.lang.String permission, boolean childPermissions)
userOrRole
- role name or user UIDpermission
- the permission to removechildPermissions
- if true the removal is made on the child categories permissions blockpublic Permissions getPermissions(int catalogID, int sourceID)
catalogID
- catalog IDsourceID
- entity IDpublic void save() throws InvalidStateException, CumulusException
InvalidStateException
- in case of an errorCumulusException
- in case of an errorpublic java.util.Iterator getPermissionsIterator()
www.canto.com
Canto, the Canto logo, the Cumulus logo, and Cumulus are registered trademarks of Canto GmbH, registered in the U.S. and other countries.