public class SpaceReference extends EntityReference
| Modifier and Type | Field and Description |
|---|---|
static Type |
TYPE_PROVIDER
The
Type for a Provider |
TOSTRING_SERIALIZER| Modifier | Constructor and Description |
|---|---|
|
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 wikiName,
List<String> spaceNames)
Create a space reference based on a space name and a parent space reference.
|
|
SpaceReference(String spaceName,
SpaceReference parent)
Create a space reference based on a space name and a parent space reference.
|
|
SpaceReference(String wikiName,
String... spaceNames)
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.
|
| Modifier and Type | Method and Description |
|---|---|
WikiReference |
getWikiReference() |
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.
|
appendParent, compareTo, equals, equals, equals, equalsNonRecursive, extractFirstReference, extractReference, getName, getParameter, getParent, getReversedReferenceChain, getRoot, getType, hashCode, hasParent, removeParent, setName, setParameter, setParameters, size, toStringpublic SpaceReference(EntityReference reference)
SpaceReference. It checks the
validity of the passed reference (ie correct type).reference - the entity reference to transformsIllegalArgumentException - if the passed reference is not a valid space referenceprotected 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 chainpublic SpaceReference(String spaceName, WikiReference parent)
spaceName - the name of the spaceparent - the wiki referencepublic SpaceReference(String spaceName, SpaceReference parent)
spaceName - the name of the spaceparent - the space referencepublic SpaceReference(String spaceName, EntityReference parent)
spaceName - the name of the spaceparent - the entity referencepublic SpaceReference(String wikiName, String... spaceNames)
wikiName - the name of the wikispaceNames - the spaces namesprotected 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 entityIllegalArgumentException - if the passed type is not a space typeEntityReference.setType(org.xwiki.model.EntityType)public SpaceReference 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.public WikiReference getWikiReference()
Copyright © 2004–2016 XWiki. All rights reserved.