Class SecurityReference

  • All Implemented Interfaces:
    Serializable, Cloneable, Comparable<EntityReference>
    Direct Known Subclasses:
    UserSecurityReference

    public class SecurityReference
    extends EntityReference
    SecurityReference is a variant of EntityReference used internally in the security-authorization module, for the purpose of conveniently maintaining a hierarchy where all entities are rooted by the main wiki. This form of hierarchical view is required to deciding which access levels that should be enforced. There is always a one-to-one correspondence between a SecurityReference and a Wiki-, Space-, or DocumentReference. Moreover, a security reference built with a null EntityReference is equivalent to the main wiki reference (but with a null original reference).
    Since:
    4.0M2
    Version:
    $Id: cd6333d38cd7f0c1ee161bcb208ff7d9f7ae2ca5 $
    See Also:
    SecurityReferenceFactory, Serialized Form
    • Field Detail

      • FARM

        public static final EntityType FARM
        EntityType for the main wiki.
      • mainWikiReference

        protected SecurityReference mainWikiReference
        Main wiki reference.
    • Method Detail

      • getParentSecurityReference

        public SecurityReference getParentSecurityReference()
        Returns:
        the parent reference of this security reference. For a reference to a subwiki which do not have a parent by definition, this returns the main wiki reference.
      • getSecurityType

        public EntityType getSecurityType()
        Returns:
        the entity reference type, but for the main wiki, return FARM.
      • getWikiReference

        public SecurityReference getWikiReference()
        Returns:
        a SecurityReference representing the first reference of EntityType.WIKI in this security reference.
      • getOriginalReference

        public EntityReference getOriginalReference()
        Returns:
        the original reference used when this security reference was built.
      • getOriginalWikiReference

        public WikiReference getOriginalWikiReference()
        Returns:
        the original wiki reference used when this security reference was built. Null if this is not the reference to a wiki.
      • getOriginalSpaceReference

        public SpaceReference getOriginalSpaceReference()
        Returns:
        the original space reference used when this security reference was built. Null if this is not the reference to a space.
      • getOriginalDocumentReference

        public DocumentReference getOriginalDocumentReference()
        Returns:
        the original document reference used when this security reference was built. Null if this is not the reference to a document.