Interface CustomAclService

    • Method Detail

      • getAvailablePermissions

        org.springframework.security.acls.model.Permission[] getAvailablePermissions​(String className)
        Gets the available permissions.
        Parameters:
        className - the class name
        Returns:
        the available permissions
      • getSid

        AclSid getSid​(Long id)
        Get SID by ID.
        Parameters:
        id - -- ID of an AclSid entity
        Returns:
        persisted AclSid entity with specified id
      • getAuthoritySid

        AclSid getAuthoritySid​(String authority)
        Gets the sid for the specified authority.
        Parameters:
        authority - the authority (must start with "ROLE_")
        Returns:
        the authority sid
      • ensureAuthoritySid

        AclSid ensureAuthoritySid​(String authority)
        Gets (and creates if missing) the sid for the specified authority.
        Parameters:
        authority - the authority (must start with "ROLE_")
        Returns:
        the authority sid
      • removeAuthoritySid

        AclSid removeAuthoritySid​(String authorityName)
        Removes the sid of the specified authority.
        Parameters:
        authorityName - the authority name
        Returns:
        the acl sid
      • listAuthoritySids

        List<AclSid> listAuthoritySids()
        List authority sids.
        Returns:
        the list of AclSid for authorities
      • createOrUpdatePermissions

        AclObjectIdentity createOrUpdatePermissions​(AclAwareModel entity)
        Adds the creator permissions or updates permission inheritance.
        Parameters:
        entity - the target
        Returns:
        the acl object identity
      • createOrUpdatePermissions

        AclObjectIdentity createOrUpdatePermissions​(AclAwareModel target,
                                                    AclSid ownerSid)
        Adds the creator permissions or updates permission inheritance.
        Parameters:
        target - the ACL entity
        ownerSid - Owner
        Returns:
        the acl object identity
      • updateInheriting

        AclObjectIdentity updateInheriting​(long objectIdIdentity,
                                           boolean entriesInheriting)
        Updates inheriting status of object identity.
        Parameters:
        objectIdIdentity - the id of object identity
        entriesInheriting - the inheriting status
        Returns:
        the acl object identity
      • updateParentObject

        AclObjectIdentity updateParentObject​(long objectIdIdentity,
                                             long parentObjectId)
        Updates parent object of object identity.
        Parameters:
        objectIdIdentity - the id of object identity
        parentObjectId - the id of parent object identity
        Returns:
        the acl object identity
      • setAclParent

        AclObjectIdentity setAclParent​(AclAwareModel target,
                                       AclAwareModel parent)
        Set ACL parent object for inherited permissions.
        Parameters:
        target - the target ACL object on which to change ACL
        parent - the parent ACL object
        Returns:
        the acl object identity
      • removeAclAwareModel

        void removeAclAwareModel​(AclAwareModel target)
        Removes the permissions on ACL model.
        Parameters:
        target - the target
      • removePermissionsFor

        void removePermissionsFor​(AclSid sid)
        Removes the all permissions of SID.
        Parameters:
        sid - the sid
      • getObjectIdentity

        AclObjectIdentity getObjectIdentity​(long id)
        Get object identity by internal id.
        Parameters:
        id - AclObjectIdentity id
        Returns:
        the object identity
      • getObjectIdentity

        AclObjectIdentity getObjectIdentity​(long id,
                                            String className)
        Gets the object identity for object of type className with specified id.
        Parameters:
        id - the id
        className - the clazz
        Returns:
        the object identity
      • getObjectIdentity

        AclObjectIdentity getObjectIdentity​(AclAwareModel entity)
        Gets the object identity of the entity.
        Parameters:
        entity - the entity
        Returns:
        the object identity
      • getPermissions

        List<SidPermissions> getPermissions​(long id,
                                            String className)
        Gets the permissions.
        Parameters:
        id - the id
        className - the class name
        Returns:
        the permissions
      • getPermissions

        List<SidPermissions> getPermissions​(AclAwareModel entity)
        Gets the permissions.
        Parameters:
        entity - the entity
        Returns:
        the permissions
      • getAclEntries

        List<AclEntry> getAclEntries​(AclObjectIdentity objectIdentity)
        Gets the acl entries.
        Parameters:
        objectIdentity - the object identity
        Returns:
        the acl entries
      • setPermissions

        AclObjectIdentity setPermissions​(AclAwareModel entity,
                                         AclSid sid,
                                         Permissions permissions)
        Update permissions.
        Parameters:
        entity - the entity
        sid - the sid
        permissions - the permissions
        Returns:
        the acl object identity
      • setPermissions

        AclObjectIdentity setPermissions​(AclObjectIdentity objectIdentity,
                                         AclSid sid,
                                         Permissions permissions)
        Update permissions.
        Parameters:
        objectIdentity - the object identity
        sid - the sid
        permissions - the permissions
        Returns:
        the acl object identity
      • removePermissions

        AclObjectIdentity removePermissions​(AclObjectIdentity objectIdentity,
                                            AclSid aclSid)
        Removes the permissions for SID on ACL OID.
        Parameters:
        objectIdentity - the object identity
        aclSid - the acl sid
        Returns:
        the acl object identity
      • getAclEntries

        List<AclEntry> getAclEntries​(AclAwareModel entity)
        Gets the acl entries.
        Parameters:
        entity - the entity
        Returns:
        the acl entries
      • getSids

        List<AclSid> getSids​(long id,
                             String className)
        Gets the sids.
        Parameters:
        id - the id
        className - the class name
        Returns:
        the sids
      • getSids

        List<AclSid> getSids​(AclAwareModel entity)
        Gets the sids.
        Parameters:
        entity - the entity
        Returns:
        the sids
      • ensureObjectIdentity

        AclObjectIdentity ensureObjectIdentity​(long id,
                                               String className)
        Ensure object identity.
        Parameters:
        id - the object id identity
        className - the class name
        Returns:
        the acl object identity
      • listObjectIdentityIdsForSid

        List<Long> listObjectIdentityIdsForSid​(Class<? extends AclAwareModel> clazz,
                                               AclSid sid,
                                               org.springframework.security.acls.model.Permission permission)
        List IDs of the specified class for the SID with specified permissions.
        Parameters:
        clazz - the clazz
        sid - the sid
        permission - the permission
        Returns:
        the list
      • makePubliclyReadable

        void makePubliclyReadable​(AclAwareModel aclAwareModel,
                                  boolean publiclyReadable)
        Make entity publicly readable (or not).
        Parameters:
        aclAwareModel - The entity
        publiclyReadable - true or false?
        Since:
        1.4
      • getSidId

        Long getSidId​(String sid)
        Gets the sid id.
        Parameters:
        sid - the sid
        Returns:
        the sid id