Class Right

    • Field Detail

      • LOGIN

        public static final Right LOGIN
        The login access right.
      • VIEW

        public static final Right VIEW
        The view access right.
      • EDIT

        public static final Right EDIT
        The edit access right.
      • DELETE

        public static final Right DELETE
        The delete access right.
      • CREATOR

        public static final Right CREATOR
        Imply rights provided to creator of a document.
      • ADMIN

        public static final Right ADMIN
        The Admin access right.
      • PROGRAM

        public static final Right PROGRAM
        The program access right.
      • SCRIPT

        public static final Right SCRIPT
        The script access right.
      • REGISTER

        public static final Right REGISTER
        The register access right.
      • COMMENT

        public static final Right COMMENT
        The comment access right.

        public static final Right CREATE_WIKI
        The creation of a Wiki right.
      • ILLEGAL

        public static final Right ILLEGAL
        Illegal value.
      • FARM_ONLY

        public static final Set<EntityType> FARM_ONLY
        Targeted entity type list to target only the main wiki.
      • WIKI_ONLY

        public static final Set<EntityType> WIKI_ONLY
        Targeted entity type list to target only wikis (including main wiki).
      • WIKI_SPACE

        public static final Set<EntityType> WIKI_SPACE
        Targeted entity type list to target wikis and spaces.

        public static final Set<EntityType> WIKI_SPACE_DOCUMENT
        Targeted entity type list to target wikis, spaces and documents.
    • Method Detail

      • values

        public static List<Right> values()
        an unmodifiable list of available Right
      • toRight

        public static Right toRight​(String string)
        Convert a string to a right.
        string - String representation of right.
        The corresponding Right instance, or ILLEGAL.
      • getEnabledRights

        public static Set<Right> getEnabledRights​(EntityType entityType)
        Returns the list of rights available for a given entity type.
        entityType - the entity type, or null for main wiki.
        a list of Right enabled of this entity type
      • get

        public static Right get​(int ordinal)
        Retrieve a right based on its ordinal.
        ordinal - the ordinal of the right
        the Right
      • size

        public static int size()
        the count of all existing rights
      • getAllRightsAsString

        public static List<String> getAllRightsAsString()
        a list of the string representation of all valid rights.
      • getStandardRights

        public static List<Right> getStandardRights()
        the list of statically registered rights.
      • ordinal

        public int ordinal()
        The numeric value of this access right.
      • getImpliedRights

        public Set<Right> getImpliedRights()
        Specified by:
        getImpliedRights in interface RightDescription
        a set of additional rights implied by this right. Note that this method should return null instead of an empty set.
      • getTargetedEntityType

        public Set<EntityType> getTargetedEntityType()
        Specified by:
        getTargetedEntityType in interface RightDescription
        a set of entity type for which this right should be enabled. Special type Right.FARM (==null) could be used to target the EntityType.WIKI for the main wiki only (i.e. PROGRAM)
      • getInheritanceOverridePolicy

        public boolean getInheritanceOverridePolicy()
        Specified by:
        getInheritanceOverridePolicy in interface RightDescription
        Policy on how this right should be overridden by lower levels in the entity reference hierarchy. When true, this right on a document override this right on a wiki.
      • isReadOnly

        public boolean isReadOnly()
        Description copied from interface: RightDescription
        Used to check if this right should be allowed when the wiki is in read-only mode. From the native right, only EDIT, DELETE, COMMENT and REGISTER returns false.
        Specified by:
        isReadOnly in interface RightDescription
        true if this right allow a read-only access to the wiki.