|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.openbp.common.generic.description.DescriptionObjectImpl
public class DescriptionObjectImpl
An object that has a name and a description.
\bNote that this class does not support localization currently!\b
\bThe 'locale' parameter of all methods is ignored.\b
| Field Summary |
|---|
| Fields inherited from interface org.openbp.common.generic.Copyable |
|---|
COPY_DEEP, COPY_FIRST_LEVEL, COPY_SHALLOW |
| Constructor Summary | |
|---|---|
DescriptionObjectImpl()
Default constructor. |
|
DescriptionObjectImpl(java.lang.String name)
Value constructor. |
|
DescriptionObjectImpl(java.lang.String name,
java.lang.String description)
Value constructor. |
|
| Method Summary | |
|---|---|
java.lang.Object |
clone()
Creates a clone of this object. |
int |
compareTo(java.lang.Object o)
Compares this object to another Object. |
void |
copyFrom(java.lang.Object source,
int copyMode)
Copies the values of the source object to this object. |
java.lang.String |
getDescription()
Gets the default description of this Object. |
java.lang.String |
getDescriptionEscape()
Gets the escape representation of the default description of this Object. |
java.lang.String |
getDescriptionText()
Gets text that can be used to describe this object. |
java.lang.String |
getDisplayText()
Gets text that can be used to display this object. |
java.lang.String |
getName()
Gets the name of this object. |
void |
setDescription(java.lang.String description)
Sets the default description of this Object. |
void |
setDescriptionEscape(java.lang.String description)
Sets the escape representation of the default description of this Object. |
void |
setName(java.lang.String name)
Sets the name of this object. |
java.lang.String |
toString()
Returns a string representation of this object. |
boolean |
validate(MsgContainer msgContainer)
Checks if the object is valid. |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public DescriptionObjectImpl()
public DescriptionObjectImpl(java.lang.String name)
name - The internal name of the object
public DescriptionObjectImpl(java.lang.String name,
java.lang.String description)
name - The internal name of the objectdescription - Description of this object| Method Detail |
|---|
public java.lang.Object clone()
throws java.lang.CloneNotSupportedException
clone in interface Copyableclone in interface DescriptionObjectclone in class java.lang.Objectjava.lang.CloneNotSupportedException - If the cloning of one of the contained members failed
public void copyFrom(java.lang.Object source,
int copyMode)
throws java.lang.CloneNotSupportedException
copyFrom in interface Copyablesource - The source object. Must be of the same type as this object.copyMode - Determines if a deep copy, a first level copy or a shallow copy is to be
performed. See the constants of the org.openbp.common.generic.description.Copyable class.
java.lang.CloneNotSupportedException - If the cloning of one of the contained objects failedpublic java.lang.String toString()
toString in class java.lang.Objectpublic java.lang.String getName()
getName in interface DescriptionObjectpublic void setName(java.lang.String name)
setName in interface DescriptionObjectname - The new name (may not be null)public java.lang.String getDescription()
getDescription in interface DescriptionObjectpublic void setDescription(java.lang.String description)
setDescription in interface DescriptionObjectdescription - The new description or nullpublic java.lang.String getDescriptionEscape()
public void setDescriptionEscape(java.lang.String description)
description - The new description or nullpublic java.lang.String getDescriptionText()
getDescription() method.
getDescriptionText in interface DescriptionObjectpublic java.lang.String getDisplayText()
DescriptionObject.setName(java.lang.String)) of the object itself.
getDisplayText in interface DescriptionObjectgetDisplayText in interface Displayablepublic int compareTo(java.lang.Object o)
setName(java.lang.String) values of the two objects.
Otherwise, it throws a ClassCastException (as DescriptionObjects are comparable only to other DescriptionObjects).
compareTo in interface java.lang.Comparableo - Object to be compared
java.lang.ClassCastException - if the argument is not a DescriptionObject.public boolean validate(MsgContainer msgContainer)
setName(java.lang.String) has been specified.
validate in interface ValidatablemsgContainer - Any errors will be logged to this message container
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||