org.xwiki.security
Class SecurityReference
java.lang.Object
org.xwiki.model.reference.EntityReference
org.xwiki.security.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-autorization 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.
- Since:
- 4.0M2
- Version:
- $Id$
- See Also:
SecurityReferenceFactory},
Serialized Form
| Methods inherited from class org.xwiki.model.reference.EntityReference |
appendParent, compareTo, equals, extractReference, getName, getParameter, getParent, getReversedReferenceChain, getRoot, getType, hashCode, removeParent, replaceParent, setName, setParameter, setParameters, setParent, setType, toString |
FARM
public static final EntityType FARM
- EntityType for the main wiki.
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.
getReversedSecurityReferenceChain
public Deque<SecurityReference> getReversedSecurityReferenceChain()
- Returns:
- the reversed reference chain using
getParentSecurityReference().
getSecurityType
public EntityType getSecurityType()
- Returns:
- the entity reference type, but for the main wiki, return
Right.FARM.
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.
Copyright © 2004-2012 XWiki. All Rights Reserved.