Interface PermissionManagementService

    • 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 ones
        perms - 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 ones
        perms - 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 for
        aclEntries - 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 for
        aclEntries - 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 for
        owner - 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 for
        owner - 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 for
        group - 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 for
        group - the group principal the new group of the resource
        Throws:
        XMLDBException - if an error occurs whilst setting the group