Enum RepositoryFilePermission

  • All Implemented Interfaces:
    Serializable, Comparable<RepositoryFilePermission>

    public enum RepositoryFilePermission
    extends Enum<RepositoryFilePermission>
    Repository file permission enumeration. These are the permission "bits." Loosely based on Mac OS X File System Access Control Policy bits.

    Why no EXECUTE?

    See JCR-2446.

    Why no APPEND?

    Some implementations of these bits may not be able to distinguish between a file create and update. In this case, APPEND is useless. In the case of JCR, one might reasonably map APPEND to set_property and WRITE to add_node. However, even an update on a file might involve the addition of a node.

    Why no DELETE_CHILD?

    DELETE_CHILD was believed to be too technical for end users to understand.

    Why no DELETE?

    DELETE mapped to jcr:removeNode which was also required for WRITE. So if you had WRITE, you had DELETE, making DELETE redundant.

    Author:
    mlowery
    • Method Detail

      • values

        public static RepositoryFilePermission[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (RepositoryFilePermission c : RepositoryFilePermission.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static RepositoryFilePermission valueOf​(String name)
        Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
        Parameters:
        name - the name of the enum constant to be returned.
        Returns:
        the enum constant with the specified name
        Throws:
        IllegalArgumentException - if this enum type has no constant with the specified name
        NullPointerException - if the argument is null