public class ObjectReference extends EntityReference
TOSTRING_SERIALIZER| Modifier | Constructor and Description |
|---|---|
|
ObjectReference(EntityReference reference)
Constructor which would raise exceptions if the source entity reference does not have the appropriate type or
parent, etc.
|
protected |
ObjectReference(EntityReference reference,
EntityReference oldReference,
EntityReference newReference)
Clone an ObjectReference, but replace one of the parent in the chain by a new one.
|
|
ObjectReference(String objectName,
DocumentReference documentReference) |
|
ObjectReference(String wiki,
String space,
String document,
String objectName)
Deprecated.
|
| Modifier and Type | Method and Description |
|---|---|
ObjectReference |
replaceParent(EntityReference oldParent,
EntityReference newParent)
Return a clone of this reference, but with one of its parent replaced by another one.
|
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.
|
appendParent, compareTo, equals, extractReference, getName, getParameter, getParent, getReversedReferenceChain, getRoot, getType, hashCode, removeParent, setName, setParameter, setParameters, toStringpublic ObjectReference(EntityReference reference)
reference - the raw reference to build this object reference fromprotected ObjectReference(EntityReference reference, EntityReference oldReference, EntityReference newReference)
reference - the reference that is clonedoldReference - the old parent that will be replacednewReference - the new parent that will replace oldReference in the chainpublic ObjectReference(String objectName, DocumentReference documentReference)
objectName - the name of the objectdocumentReference - the reference of the parent document of the object@Deprecated public ObjectReference(String wiki, String space, String document, String objectName)
wiki - wiki where the parent document of the object isspace - space where the parent document of the object isdocument - parent document of the objectobjectName - the name of the objectprotected void setType(EntityType type)
setType in class EntityReferencetype - the type for this entityEntityReference.setType(org.xwiki.model.EntityType)protected void setParent(EntityReference parent)
setParent in class EntityReferenceparent - the parent for this entity, may be null for a root entity.EntityReference.setParent(org.xwiki.model.reference.EntityReference)public ObjectReference replaceParent(EntityReference oldParent, EntityReference newParent)
EntityReferencereplaceParent in class EntityReferenceoldParent - the old parent that will be replacednewParent - the new parent that will replace oldParent in the chain. If the same as oldParent,
this is returned.Copyright © 2004–2014 XWiki. All rights reserved.