Package org.xmldb.api.security
Interface PermissionManagementService
-
- All Superinterfaces:
Configurable,Service
public interface PermissionManagementService extends Service
This service is providing permission related functions in order to get or change permissions onCollectionorResourceobjects.- Since:
- 2.0
- See Also:
ServiceProvider.getService(java.lang.Class<S>)
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringSERVICE_NAME
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.util.List<AclEntry>getAcl(Collection collection)Returns a list of current ACL (Access Control List) entries for the given collection.java.util.List<AclEntry>getAcl(Resource resource)Returns a list of current ACL (Access Control List) entries for the given resource.AttributesgetAttributes(Collection collection)Returns an attribute view for the given collection.AttributesgetAttributes(Resource resource)Returns an attribute view for the given resource.GroupPrincipalgetGroup(Collection collection)Returns the current group of the given collection.GroupPrincipalgetGroup(Resource resource)Returns the current group of the given resource.UserPrincipalgetOwner(Collection collection)Returns the current owner of the given collection.UserPrincipalgetOwner(Resource resource)Returns the current owner of the given resource.java.util.Set<Permission>getPermissions(Collection collection)Returns a set of currently set permissions for the given collection.java.util.Set<Permission>getPermissions(Resource resource)Returns a set of currently set permissions for the given resource.voidsetAcl(Collection collection, java.util.List<AclEntry> aclEntries)Replaces the current ACL (Access Control List) entries of the given collection with the given new ACL entries list.voidsetAcl(Resource resource, java.util.List<AclEntry> aclEntries)Replaces the current ACL (Access Control List) entries of the given resource with the given new ACL entries list.voidsetGroup(Collection collection, GroupPrincipal group)Sets the new group of the given collection.voidsetGroup(Resource resource, GroupPrincipal group)Sets the new group of the given resource.voidsetOwner(Collection collection, UserPrincipal owner)Sets the new owner of the given collection.voidsetOwner(Resource resource, UserPrincipal owner)Sets the new owner of the given resource.voidsetPermissions(Collection collection, java.util.Set<Permission> perms)Replaces the current permissions of the given collection with the given new permission set.voidsetPermissions(Resource resource, java.util.Set<Permission> perms)Replaces the current permissions of the given resource with the given new permission set.-
Methods inherited from interface org.xmldb.api.base.Configurable
getProperty, getProperty, setProperty
-
Methods inherited from interface org.xmldb.api.base.Service
getName, getVersion, setCollection
-
-
-
-
Field Detail
-
SERVICE_NAME
static final java.lang.String SERVICE_NAME
- See Also:
- Constant Field Values
-
-
Method Detail
-
getAttributes
Attributes getAttributes(Collection collection) throws XMLDBException
Returns an attribute view for the given collection.- Parameters:
collection- the collection for getting the attributes- Returns:
- the basic permission attributes of the given collection
- Throws:
XMLDBException- if an error occurs whilst getting the attributes
-
getAttributes
Attributes getAttributes(Resource resource) throws XMLDBException
Returns an attribute view for the given resource.- Parameters:
resource- the resource for getting the attributes- Returns:
- the basic permission attributes of the given resource
- Throws:
XMLDBException- if an error occurs whilst getting the attributes
-
getPermissions
java.util.Set<Permission> getPermissions(Collection collection) throws XMLDBException
Returns a set of currently set permissions for the given collection.- Parameters:
collection- the collection to get the permissions for- Returns:
- a set of the current permissions
- Throws:
XMLDBException- if an error occurs whilst getting the permissions
-
setPermissions
void setPermissions(Collection collection, java.util.Set<Permission> perms) throws XMLDBException
Replaces the current permissions of the given collection with the given new permission set.- Parameters:
collection- the collection to replace the existing onesperms- the new permissions to be set on the collection- Throws:
XMLDBException- if an error occurs whilst setting the permissions
-
getPermissions
java.util.Set<Permission> getPermissions(Resource resource) throws XMLDBException
Returns a set of currently set permissions for the given resource.- Parameters:
resource- the resource to get the permissions for- Returns:
- a set of the current permissions
- Throws:
XMLDBException- if an error occurs whilst getting the permissions
-
setPermissions
void setPermissions(Resource resource, java.util.Set<Permission> perms) throws XMLDBException
Replaces the current permissions of the given resource with the given new permission set.- Parameters:
resource- the resource to replace the existing onesperms- the new permissions to be set on the resource- Throws:
XMLDBException- if an error occurs whilst setting the permissions
-
getAcl
java.util.List<AclEntry> getAcl(Collection collection) throws XMLDBException
Returns a list of current ACL (Access Control List) entries for the given collection.- Parameters:
collection- the collection to get the ACL entries- Returns:
- a list of the current ACL entries
- Throws:
XMLDBException- if an error occurs whilst getting the ACL entries
-
setAcl
void setAcl(Collection collection, java.util.List<AclEntry> aclEntries) throws XMLDBException
Replaces the current ACL (Access Control List) entries of the given collection with the given new ACL entries list.- Parameters:
collection- the collection to replace the ACL entries foraclEntries- the new ACL entries to be set on the collection- Throws:
XMLDBException- if an error occurs whilst setting the ACL entries
-
getAcl
java.util.List<AclEntry> getAcl(Resource resource) throws XMLDBException
Returns a list of current ACL (Access Control List) entries for the given resource.- Parameters:
resource- the resource to get the ACL entries- Returns:
- a list of the current ACL entries
- Throws:
XMLDBException- if an error occurs whilst getting the ACL entries
-
setAcl
void setAcl(Resource resource, java.util.List<AclEntry> aclEntries) throws XMLDBException
Replaces the current ACL (Access Control List) entries of the given resource with the given new ACL entries list.- Parameters:
resource- the resource to replace the ACL entries foraclEntries- the new ACL entries to be set on the resource- Throws:
XMLDBException- if an error occurs whilst setting the ACL entries
-
getOwner
UserPrincipal getOwner(Collection collection) throws XMLDBException
Returns the current owner of the given collection.- Parameters:
collection- the collection to get the owner for- Returns:
- a user principal representing the owner of the collection
- Throws:
XMLDBException- if an error occurs whilst getting the owner
-
setOwner
void setOwner(Collection collection, UserPrincipal owner) throws XMLDBException
Sets the new owner of the given collection.- Parameters:
collection- the collection to get the owner forowner- the user principal the new owner of the collection- Throws:
XMLDBException- if an error occurs whilst setting the owner
-
getOwner
UserPrincipal getOwner(Resource resource) throws XMLDBException
Returns the current owner of the given resource.- Parameters:
resource- the resource to get the owner for- Returns:
- a user principal representing the owner of the resource
- Throws:
XMLDBException- if an error occurs whilst getting the owner
-
setOwner
void setOwner(Resource resource, UserPrincipal owner) throws XMLDBException
Sets the new owner of the given resource.- Parameters:
resource- the resource to get the owner forowner- the user principal the new owner of the resource- Throws:
XMLDBException- if an error occurs whilst setting the owner
-
getGroup
GroupPrincipal getGroup(Collection collection) throws XMLDBException
Returns the current group of the given collection.- Parameters:
collection- the collection to get the owner for- Returns:
- a group principal representing the owner of the collection
- Throws:
XMLDBException- if an error occurs whilst getting the group
-
setGroup
void setGroup(Collection collection, GroupPrincipal group) throws XMLDBException
Sets the new group of the given collection.- Parameters:
collection- the collection to get the group forgroup- the group principal the new group of the collection- Throws:
XMLDBException- if an error occurs whilst setting the group
-
getGroup
GroupPrincipal getGroup(Resource resource) throws XMLDBException
Returns the current group of the given resource.- Parameters:
resource- the resource to get the owner for- Returns:
- a group principal representing the owner of the resource
- Throws:
XMLDBException- if an error occurs whilst getting the group
-
setGroup
void setGroup(Resource resource, GroupPrincipal group) throws XMLDBException
Sets the new group of the given resource.- Parameters:
resource- the resource to get the group forgroup- the group principal the new group of the resource- Throws:
XMLDBException- if an error occurs whilst setting the group
-
-