public abstract class AbstractLocalizedEntityReference extends EntityReference
Modifier and Type | Field and Description |
---|---|
static String |
LOCALE
Parameter key for the locale.
|
TOSTRING_SERIALIZER
Modifier | Constructor and Description |
---|---|
|
AbstractLocalizedEntityReference(EntityReference reference)
Clone an EntityReference.
|
|
AbstractLocalizedEntityReference(EntityReference reference,
EntityReference parent)
Clone an AbstractLocalizedEntityReference, but use the specified parent for its new parent.
|
protected |
AbstractLocalizedEntityReference(EntityReference reference,
EntityReference oldReference,
EntityReference newReference)
Clone an EntityReference, but replace one of the parent in the chain by an other one.
|
|
AbstractLocalizedEntityReference(EntityReference reference,
Locale locale)
Clone an EntityReference and change/add the passed Locale.
|
|
AbstractLocalizedEntityReference(String name,
EntityType type)
Create a new EntityReference.
|
|
AbstractLocalizedEntityReference(String name,
EntityType type,
EntityReference parent)
Create a new EntityReference.
|
|
AbstractLocalizedEntityReference(String name,
EntityType type,
EntityReference parent,
Locale locale) |
|
AbstractLocalizedEntityReference(String name,
EntityType type,
EntityReference parent,
Map<String,Serializable> parameters)
Create a new EntityReference.
|
|
AbstractLocalizedEntityReference(String name,
EntityType type,
Locale locale)
Create a new EntityReference.
|
Modifier and Type | Method and Description |
---|---|
Locale |
getLocale() |
protected void |
setLocale(Locale locale)
Set the locale of this reference.
|
protected void |
setParameter(String name,
Serializable value)
Add or set a parameter value.
|
appendParent, compareTo, equals, equals, equals, equalsNonRecursive, extractFirstReference, extractReference, getName, getParameter, getParameters, getParent, getReversedReferenceChain, getRoot, getType, hashCode, hasParent, removeParent, replaceParent, replaceParent, setName, setParameters, setParent, setType, size, toString
public static final String LOCALE
public AbstractLocalizedEntityReference(String name, EntityType type)
name
- name for the newly created entity reference, could not be null.type
- type for the newly created entity reference, could not be null.public AbstractLocalizedEntityReference(String name, EntityType type, Locale locale)
name
- name for the newly created entity reference, could not be null.type
- type for the newly created entity reference, could not be null.locale
- the Locale
of the entity.public AbstractLocalizedEntityReference(String name, EntityType type, EntityReference parent)
name
- name for the newly created entity reference, could not be null.type
- type for the newly created entity reference, could not be null.parent
- parent reference for the newly created entity reference, may be null.public AbstractLocalizedEntityReference(String name, EntityType type, EntityReference parent, Map<String,Serializable> parameters)
name
- name for the newly created entity reference, could not be null.type
- type for the newly created entity reference, could not be null.parent
- parent reference for the newly created entity reference, may be null.parameters
- parameters for this reference, may be nullpublic AbstractLocalizedEntityReference(String name, EntityType type, EntityReference parent, Locale locale)
name
- name for the newly created entity reference, could not be null.type
- type for the newly created entity reference, could not be null.parent
- parent reference for the newly created entity reference, may be null.locale
- the Locale
of the entity.public AbstractLocalizedEntityReference(EntityReference reference)
reference
- the reference to clonepublic AbstractLocalizedEntityReference(EntityReference reference, Locale locale)
reference
- the reference to clonelocale
- the Locale
of the new referenceprotected AbstractLocalizedEntityReference(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 AbstractLocalizedEntityReference(EntityReference reference, EntityReference parent)
reference
- the reference to cloneparent
- the new parent to useprotected void setLocale(Locale locale)
locale
- the locale of this document referencepublic Locale getLocale()
protected void setParameter(String name, Serializable value)
Make sure to store the locale as Locale
.
setParameter
in class EntityReference
name
- the name of the parametervalue
- the value of the parameterEntityReference.setParameter(java.lang.String, java.io.Serializable)
Copyright © 2004–2021 XWiki. All rights reserved.