Package org.xwiki.model.reference
Class DocumentVersionReference
- java.lang.Object
-
- org.xwiki.model.reference.EntityReference
-
- org.xwiki.model.reference.AbstractLocalizedEntityReference
-
- org.xwiki.model.reference.DocumentReference
-
- org.xwiki.model.reference.DocumentVersionReference
-
- All Implemented Interfaces:
Serializable
,Cloneable
,Comparable<EntityReference>
public class DocumentVersionReference extends DocumentReference
A reference to a document version.- Since:
- 14.8RC1
- Version:
- $Id: be5f9174f43fe7d6a9d213ac9ed1c6aeb52d0f29 $
- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class org.xwiki.model.reference.DocumentReference
TYPE_PROVIDER
-
Fields inherited from class org.xwiki.model.reference.EntityReference
TOSTRING_SERIALIZER
-
-
Constructor Summary
Constructors Constructor Description DocumentVersionReference(DocumentReference documentReference)
Cast aDocumentReference
to aDocumentVersionReference
.DocumentVersionReference(DocumentReference documentReference, Serializable version)
Creates a new reference to the specified document version.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Serializable
getVersion()
DocumentReference
removeVersion()
-
Methods inherited from class org.xwiki.model.reference.DocumentReference
getLastSpaceReference, getLocalDocumentReference, getLocaleDocumentReference, getSpaceReferences, getWikiReference, replaceParent, replaceParent, setParent, setType, setWikiReference, toString, withoutLocale
-
Methods inherited from class org.xwiki.model.reference.AbstractLocalizedEntityReference
getLocale, setLocale, setParameter
-
Methods inherited from class org.xwiki.model.reference.EntityReference
appendParent, compareTo, equals, equals, equals, equalsNonRecursive, extractFirstReference, extractReference, getName, getParameter, getParameters, getParent, getReversedReferenceChain, getRoot, getType, hashCode, hasParent, removeParent, setName, setParameters, size
-
-
-
-
Constructor Detail
-
DocumentVersionReference
public DocumentVersionReference(DocumentReference documentReference, Serializable version)
Creates a new reference to the specified document version.- Parameters:
documentReference
- the document referenceversion
- the document version
-
DocumentVersionReference
public DocumentVersionReference(DocumentReference documentReference)
Cast aDocumentReference
to aDocumentVersionReference
.- Parameters:
documentReference
- the document reference to cast
-
-
Method Detail
-
getVersion
public Serializable getVersion()
- Returns:
- the document version
-
removeVersion
public DocumentReference removeVersion()
- Returns:
- the
DocumentReference
without the version
-
-