org.xwiki.model.reference
Class ObjectReference

java.lang.Object
  extended by org.xwiki.model.reference.EntityReference
      extended by org.xwiki.model.reference.ObjectReference
All Implemented Interfaces:
Serializable, Cloneable, Comparable<EntityReference>

public class ObjectReference
extends EntityReference

Reference to an object in a document (by classname and index, document, space, wiki).

Since:
2.3M1
Version:
$Id$
See Also:
Serialized Form

Constructor Summary
ObjectReference(EntityReference reference)
          Constructor which would raise exceptions if the source entity reference does not have the appropriate type or parent, etc.
ObjectReference(String objectName, DocumentReference documentReference)
           
ObjectReference(String wiki, String space, String document, String objectName)
           
 
Method Summary
 void setParent(EntityReference parent)
          
Overridden to ensure that the parent of an object is always a document.
 void setType(EntityType type)
          
Overridden to check the type to be an object type.
 
Methods inherited from class org.xwiki.model.reference.EntityReference
clone, compareTo, equals, extractReference, getChild, getName, getParent, getRoot, getType, hashCode, setChild, setName, toString
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ObjectReference

public ObjectReference(EntityReference reference)
Constructor which would raise exceptions if the source entity reference does not have the appropriate type or parent, etc.

Parameters:
reference - the raw reference to build this object reference from

ObjectReference

public ObjectReference(String wiki,
                       String space,
                       String document,
                       String objectName)
Parameters:
wiki - wiki where the parent document of the object is
space - space where the parent document of the object is
document - parent document of the object
objectName - the name of the object

ObjectReference

public ObjectReference(String objectName,
                       DocumentReference documentReference)
Parameters:
objectName - the name of the object
documentReference - the reference of the parent document of the object
Method Detail

setType

public void setType(EntityType type)

Overridden to check the type to be an object type.

Overrides:
setType in class EntityReference
See Also:
EntityReference.setType(org.xwiki.model.EntityType)

setParent

public void setParent(EntityReference parent)

Overridden to ensure that the parent of an object is always a document.

Overrides:
setParent in class EntityReference
See Also:
EntityReference.setParent(org.xwiki.model.reference.EntityReference)


Copyright © 2004-2011 XWiki. All Rights Reserved.