public class IndexedObjectReference extends ObjectReference
className[objectNumber]
format. It provides
helper functions to extract the class name as specified by the caller, and object number. getClassName()
and object index by calling getObjectNumber()
.
getObjectNumber()
will return null
and className
is obtained by
calling getClassName()
.
Modifier and Type | Field and Description |
---|---|
protected String |
className
The class name of this object, as set by the caller.
|
protected Integer |
objectNumber
The number of this object, as set by the caller.
|
TOSTRING_SERIALIZER
Constructor and Description |
---|
IndexedObjectReference(EntityReference reference)
Constructor which would raise exceptions if the source entity reference does not have the appropriate type or
parent, etc.
|
IndexedObjectReference(String className,
Integer objectNumber,
EntityReference parent)
Builds an indexed object reference for the object of class
className with index objectNumber in
the document referenced by parent . |
Modifier and Type | Method and Description |
---|---|
String |
getClassName() |
Integer |
getObjectNumber() |
protected void |
setName(String name) |
getDocumentReference, replaceParent, replaceParent, setParent, setType
appendParent, compareTo, equals, equals, equals, equalsNonRecursive, extractFirstReference, extractReference, getName, getParameter, getParameters, getParent, getReversedReferenceChain, getRoot, getType, hashCode, hasParent, removeParent, setParameter, setParameters, size, toString
protected String className
protected Integer objectNumber
public IndexedObjectReference(EntityReference reference)
reference
- the raw reference to build this object reference frompublic IndexedObjectReference(String className, Integer objectNumber, EntityReference parent)
className
with index objectNumber
in
the document referenced by parent
.className
- the name of the class of the objectobjectNumber
- the number of the object in the document, or null
if the default object should be
referencedparent
- reference to the parent document where the object ispublic String getClassName()
public Integer getObjectNumber()
null
and object should be interpreted as the first object of this class in the document.protected void setName(String name)
Overridden to always compute the class name and the object number.
setName
in class EntityReference
EntityReference.setName(java.lang.String)
Copyright © 2004–2019 XWiki. All rights reserved.