public abstract class AbstractDescriptor extends Object implements Descriptor, PublicCloneable<AbstractDescriptor>
| Modifier and Type | Field and Description |
|---|---|
protected LocalizedString |
description |
protected LocalizedString |
guiName |
protected String |
key |
| Modifier | Constructor and Description |
|---|---|
protected |
AbstractDescriptor() |
protected |
AbstractDescriptor(String name)
Create a data type object
|
protected |
AbstractDescriptor(String name,
Descriptor descriptor) |
protected |
AbstractDescriptor(String name,
Descriptor descriptor,
boolean cloneDataForRewrite)
Create a data type object
|
| Modifier and Type | Method and Description |
|---|---|
AbstractDescriptor |
clone() |
AbstractDescriptor |
clone(String name) |
protected Locale |
getDefaultLocale()
The locale which must be used if no locale is specified.
|
String |
getDescription()
Returns the description of this object for the default locale.
|
String |
getDescription(Locale locale)
Returns the description of this object.
|
String |
getGUIName()
Retrieve the GUI name of the field.
|
String |
getGUIName(Locale locale)
Retrieve the GUI name of the field depending on specified langauge.
|
LocalizedString |
getLocalizedDescription()
Returns the set of (localized) descriptions of this object.
|
LocalizedString |
getLocalizedGUIName()
Returns the set of (localized) gui names of this object.
|
String |
getName()
Returns the name or 'key' of this descriptor.
|
void |
setDescription(String desc)
Sets the description of this object for the default locale.
|
void |
setDescription(String desc,
Locale locale)
Sets the description of this object.
|
void |
setGUIName(String g)
Sets the GUI name of this object for the default locale.
|
void |
setGUIName(String g,
Locale locale)
Sets the GUI name of this object.
|
protected void |
setLocalizedDescription(LocalizedString description) |
protected void |
setLocalizedGUIName(LocalizedString value) |
String |
toString() |
protected String key
protected LocalizedString description
protected LocalizedString guiName
protected AbstractDescriptor()
protected AbstractDescriptor(String name)
name - the name of the data typeprotected AbstractDescriptor(String name, Descriptor descriptor, boolean cloneDataForRewrite)
name - the name of the data typedescriptor - protected AbstractDescriptor(String name, Descriptor descriptor)
protected Locale getDefaultLocale()
LocalizedString.getDefault()
This method can be overriden if another more logical default is
available. E.g. in BasicField the locale of the current cloud is returned.public String getName()
getName in interface Descriptorpublic String getDescription(Locale locale)
DescriptorgetDescription in interface Descriptorlocale - The locale for which this must be returned, or null for a default locale.
If no fitting description for the given locale is available, getName() can be returned.public String getDescription()
DescriptorgetDescription in interface Descriptorpublic LocalizedString getLocalizedDescription()
DescriptorgetLocalizedDescription in interface Descriptorprotected void setLocalizedDescription(LocalizedString description)
protected void setLocalizedGUIName(LocalizedString value)
public void setDescription(String desc, Locale locale)
DescriptorsetDescription in interface Descriptordesc - the description as a Stringlocale - The locale for which this is valid, or null for a default locale.public void setDescription(String desc)
DescriptorsetDescription in interface Descriptordesc - the description as a Stringpublic String getGUIName(Locale locale)
getGUIName in interface Descriptorlocale - the locale that determines the language for the GUI namepublic String getGUIName()
getGUIName in interface Descriptorpublic void setGUIName(String g, Locale locale)
DescriptorsetGUIName in interface Descriptorg - the description as a Stringlocale - The locale for which this is valid, or null for the default locale.public void setGUIName(String g)
DescriptorsetGUIName in interface Descriptorg - the description as a Stringpublic LocalizedString getLocalizedGUIName()
DescriptorgetLocalizedGUIName in interface Descriptorpublic AbstractDescriptor clone()
clone in interface PublicCloneable<AbstractDescriptor>clone in class Objectpublic AbstractDescriptor clone(String name)
MMBase 1.9-SNAPSHOT - ${javadoctimestamp}