org.xwiki.model.reference
Class DocumentReference
java.lang.Object
org.xwiki.model.reference.EntityReference
org.xwiki.model.reference.DocumentReference
- All Implemented Interfaces:
- Serializable, Cloneable, Comparable<EntityReference>
public class DocumentReference
- extends EntityReference
Represents a reference to a document (wiki, space and page names).
- Since:
- 2.2M1
- Version:
- $Id$
- See Also:
- Serialized Form
| Methods inherited from class org.xwiki.model.reference.EntityReference |
clone, compareTo, equals, extractReference, getChild, getName, getParent, getRoot, getType, hashCode, setChild, setName, toString |
DocumentReference
public DocumentReference(EntityReference reference)
- Special constructor that transforms a generic entity reference into a
DocumentReference. It checks the
validity of the passed reference (ie correct type and correct parent).
- Throws:
IllegalArgumentException - if the passed reference is not a valid document reference
DocumentReference
public DocumentReference(String wikiName,
String spaceName,
String pageName)
DocumentReference
public DocumentReference(String wikiName,
List<String> spaceNames,
String pageName)
DocumentReference
public DocumentReference(String pageName,
SpaceReference parent)
setParent
public void setParent(EntityReference parent)
-
Overridden in order to verify the validity of the passed parent
- Overrides:
setParent in class EntityReference
- Throws:
IllegalArgumentException - if the passed parent is not a valid document reference parent (ie a space
reference)- See Also:
EntityReference.setParent(EntityReference)
setType
public void setType(EntityType type)
-
Overridden in order to verify the validity of the passed type
- Overrides:
setType in class EntityReference
- Throws:
IllegalArgumentException - if the passed type is not a document type- See Also:
EntityReference.setType(org.xwiki.model.EntityType)
getWikiReference
public WikiReference getWikiReference()
setWikiReference
public void setWikiReference(WikiReference newWikiReference)
getLastSpaceReference
public SpaceReference getLastSpaceReference()
getSpaceReferences
public List<SpaceReference> getSpaceReferences()
Copyright © 2004-2011 XWiki. All Rights Reserved.