org.xwiki.model.reference
Class WikiReference

java.lang.Object
  extended by org.xwiki.model.reference.EntityReference
      extended by 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: c7c466f1320c8693ea9e47c8b7172a430c1c97f1 $
See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.xwiki.model.reference.EntityReference
TOSTRING_SERIALIZER
 
Constructor Summary
WikiReference(EntityReference reference)
          Special constructor that transforms a generic entity reference into a WikiReference.
WikiReference(String wikiName)
           
 
Method Summary
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, extractReference, getName, getParameter, getParent, getReversedReferenceChain, getRoot, getType, hashCode, removeParent, replaceParent, setName, setParameter, setParameters, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

WikiReference

public WikiReference(EntityReference reference)
Special constructor that transforms a generic entity reference into a WikiReference. 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 class EntityReference
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 class EntityReference
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


Copyright © 2004-2013 XWiki. All Rights Reserved.