|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.xwiki.model.reference.EntityReference
org.xwiki.model.reference.SpaceReference
public class SpaceReference
Represents a reference to a space (space name). Note that nested spaces are supported.
| Constructor Summary | |
|---|---|
|
SpaceReference(EntityReference reference)
Special constructor that transforms a generic entity reference into a SpaceReference. |
protected |
SpaceReference(EntityReference reference,
EntityReference oldReference,
EntityReference newReference)
Clone an SpaceReference, but replace one of the parent in the chain by a new one. |
|
SpaceReference(String spaceName,
EntityReference parent)
Create a space reference based on a space name and a parent entity reference. |
|
SpaceReference(String spaceName,
SpaceReference parent)
Create a space reference based on a space name and a parent space reference. |
|
SpaceReference(String spaceName,
WikiReference parent)
Create a space reference based on a space name and a parent wiki reference. |
| Method Summary | |
|---|---|
SpaceReference |
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. |
| Methods inherited from class org.xwiki.model.reference.EntityReference |
|---|
appendParent, compareTo, equals, extractReference, getName, getParameter, getParent, getReversedReferenceChain, getRoot, getType, hashCode, setName, setParameter, setParameters, toString |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public SpaceReference(EntityReference reference)
SpaceReference. It checks the
validity of the passed reference (ie correct type).
reference - the entity reference to transforms
IllegalArgumentException - if the passed reference is not a valid space reference
protected SpaceReference(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 chain
public SpaceReference(String spaceName,
WikiReference parent)
spaceName - the name of the spaceparent - the wiki reference
public SpaceReference(String spaceName,
SpaceReference parent)
spaceName - the name of the spaceparent - the space reference
public SpaceReference(String spaceName,
EntityReference parent)
spaceName - the name of the spaceparent - the entity reference| Method Detail |
|---|
protected void setParent(EntityReference parent)
setParent in class EntityReferenceparent - the parent for this entity, may be null for a root entity.
IllegalArgumentException - if the passed parent is not a valid space reference parent (ie either
a space reference or a wiki reference)EntityReference.setParent(EntityReference)protected void setType(EntityType type)
setType in class EntityReferencetype - the type for this entity
IllegalArgumentException - if the passed type is not a space typeEntityReference.setType(org.xwiki.model.EntityType)
public SpaceReference replaceParent(EntityReference oldParent,
EntityReference newParent)
EntityReference
replaceParent in class EntityReferenceoldParent - the old parent that will be replacednewParent - the new parent that will replace oldParent in the chain
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||