Interface Entity

  • All Known Implementing Classes:
    Entity

    public interface Entity
    • Method Detail

      • getName

        java.lang.String getName()
        Gets this entity's name.
        Returns:
        entity name.
      • getProperties

        java.util.Collection<Property> getProperties()
        Gets a collection of this entity's properties.
        Returns:
        entity properties.
      • getProperty

        Property getProperty​(java.lang.String id)
        Gets a specific property by its identifier,
        Parameters:
        id - entity property identifier.
        Returns:
        Property instance if a property exists by that ID, and a null-valued Property otherwise.
      • getPermission

        GrantedPermission getPermission​(java.lang.String node)
        Gets a specific pre-existing grant for this entity.
        Parameters:
        node - permission node to check for.
        Returns:
        ALLOW or DENY, null if no permission grant is explicitly defined.
      • getPermission

        default GrantedPermission getPermission​(Permission permission)
        Gets a specific pre-existing grant for this entity.
        Parameters:
        permission - Permission to check for.
        Returns:
        ALLOW or DENY, null if no permission grant is explicitly defined.
      • setPermission

        GrantedPermission setPermission​(java.lang.String node,
                                        Grant type)
                                 throws java.lang.SecurityException
        Grants a specific permission to this entity.
        Parameters:
        node - permission node to grant.
        type - type of grant to supply.
        Throws:
        java.lang.SecurityException
      • removePermission

        void removePermission​(java.lang.String node)
        Removes a specific permission from this entity.
        Parameters:
        node - permission node to grant.
      • getPermissions

        java.util.Collection<GrantedPermission> getPermissions()
        Gets the explicitly granted permissions for this entity.
        Returns:
        permission grants.