Package org.xwiki.model.reference
Class WikiReference
- java.lang.Object
-
- org.xwiki.model.reference.EntityReference
-
- org.xwiki.model.reference.WikiReference
-
- All Implemented Interfaces:
Serializable
,Cloneable
,Comparable<EntityReference>
public class WikiReference extends EntityReference
Represents a reference to a wiki (wiki name). This is the topmost reference and it doesn't have a parent reference.- Since:
- 2.2M1
- Version:
- $Id: 0bedc1f735306105b5f171fc1b1f826d1f10b05c $
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static Type
TYPE_PROVIDER
TheType
for aProvider<WikiReference>
.-
Fields inherited from class org.xwiki.model.reference.EntityReference
TOSTRING_SERIALIZER
-
-
Constructor Summary
Constructors Constructor Description WikiReference(String wikiName)
WikiReference(EntityReference reference)
Special constructor that transforms a generic entity reference into aWikiReference
.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
setParent(EntityReference parent)
Entity reference are immutable since 3.3M2, so this method is now protected.protected void
setType(EntityType type)
Entity reference are immutable since 3.3M2, so this method is now protected.-
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, replaceParent, replaceParent, setName, setParameter, setParameters, size, toString
-
-
-
-
Constructor Detail
-
WikiReference
public WikiReference(EntityReference reference)
Special constructor that transforms a generic entity reference into aWikiReference
. It checks the validity of the passed reference (ie correct type).- Parameters:
reference
- the raw reference to build this wiki reference from- Throws:
IllegalArgumentException
- if the passed reference is not a valid wiki reference
-
WikiReference
public WikiReference(String wikiName)
- Parameters:
wikiName
- the name of the wiki referenced
-
-
Method Detail
-
setType
protected void setType(EntityType type)
Entity reference are immutable since 3.3M2, so this method is now protected.Overridden in order to verify the validity of the passed type.
- Overrides:
setType
in classEntityReference
- Parameters:
type
- the type for this entity- Throws:
IllegalArgumentException
- if the passed type is not a wiki type
-
setParent
protected void setParent(EntityReference parent)
Entity reference are immutable since 3.3M2, so this method is now protected.Overridden in order to verify the validity of the passed parent.
- Overrides:
setParent
in classEntityReference
- Parameters:
parent
- the parent for this entity, may be null for a root entity.- Throws:
IllegalArgumentException
- if the passed type is not a wiki type
-
-