public class LocalPageReference extends AbstractLocalizedEntityReference
LOCALETOSTRING_SERIALIZER| Constructor and Description |
|---|
LocalPageReference(EntityReference reference) |
LocalPageReference(EntityReference reference,
EntityReference parent)
Clone an DocumentVersionReference, but use the specified parent for its new parent.
|
LocalPageReference(EntityReference entityReference,
Locale locale) |
LocalPageReference(List<String> pageNames)
Create a new Page reference in the current wiki.
|
LocalPageReference(PageReference pageReference) |
LocalPageReference(String pageName,
EntityReference pageReference)
Create a new Page reference in the current wiki.
|
LocalPageReference(String pageName,
Locale locale)
Create a new Page reference in the current wiki.
|
LocalPageReference(String pageName,
String... pageNames)
Create a new Page reference in the current wiki.
|
| Modifier and Type | Method and Description |
|---|---|
LocalPageReference |
replaceParent(EntityReference newParent)
Return a clone of this reference, but with its parent replaced by the passed 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.
|
String |
toString() |
getLocale, setLocale, setParameterappendParent, compareTo, equals, equals, equals, equalsNonRecursive, extractFirstReference, extractReference, getName, getParameter, getParameters, getParent, getReversedReferenceChain, getRoot, getType, hashCode, hasParent, removeParent, replaceParent, setName, setParameters, sizepublic LocalPageReference(String pageName, String... pageNames)
pageName - the name of the page containing the page, must not be nullpageNames - an ordered list of the names of the pages containing the page from root page to last one, must
not be nullpublic LocalPageReference(List<String> pageNames)
pageNames - an ordered list of the names of the pages containing the page from root page to last one, must
not be nullpublic LocalPageReference(String pageName, Locale locale)
pageName - the name of the page containing the page, must not be nulllocale - the new locale for this referencepublic LocalPageReference(EntityReference reference)
reference - the reference to clonepublic LocalPageReference(EntityReference entityReference, Locale locale)
entityReference - the referencelocale - the new locale for this reference, if null, locale is removedpublic LocalPageReference(String pageName, EntityReference pageReference)
pageName - the name of the page, must not be nullpageReference - the reference of the page, must not be nullpublic LocalPageReference(PageReference pageReference)
pageReference - the full page referencepublic LocalPageReference(EntityReference reference, EntityReference parent)
reference - the reference to cloneparent - the new parent to useprotected void setParent(EntityReference parent)
Overridden in order to verify the validity of the passed 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 page reference parent (ie either a page
reference or null)EntityReference.setParent(EntityReference)protected void setType(EntityType type)
Overridden in order to verify the validity of the passed type.
setType in class EntityReferencetype - the type for this entityIllegalArgumentException - if the passed type is not a page typeEntityReference.setType(org.xwiki.model.EntityType)public LocalPageReference replaceParent(EntityReference newParent)
EntityReferencereplaceParent in class EntityReferencenewParent - the new parent that will replace the parentpublic String toString()
toString in class EntityReferenceCopyright © 2004–2022 XWiki. All rights reserved.