|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.nakedobjects.object.value.AbstractNakedValue
| Constructor Summary | |
AbstractNakedValue()
|
|
| Method Summary | |
About |
about()
Returns the objects About object. |
void |
addNakedValueListener(NakedValueListener l)
Registers an object as a listener of this naked value. |
protected void |
checkCanOperate()
Throws an exception if the ojbect is null |
java.lang.String |
contextualTitle()
|
AbstractNakedValue |
deepCopy()
Returns a deep copy of this object. |
java.lang.String |
dumpObject()
|
void |
fireValueChanged()
Overridden version of fireValueChanged(NakedValue) that
passes null for the old value.
|
void |
fireValueChanged(NakedValue oldValue)
Allows subclasses (indeed any class) to notify listeners when they are about to change the state of the naked value. |
java.lang.String |
getClassName()
Returns the class name without package details e.g., Transaction for the class accounts.Transaction |
java.lang.String |
getFullClassName()
Returns the full class name including package details e.g., accounts.Transaction |
protected org.apache.log4j.Logger |
getLogger()
subclasses can override (didn't make abstract so that existing subclasses won't break) |
java.lang.String |
getObjectHelpText()
Returns a textual desctiption of the object - its contents and possible uses. |
boolean |
isNull()
Deprecated. |
boolean |
isValid()
Returns true if the object contains valid data |
java.util.Enumeration |
nakedValueListeners()
Returns enumeration of all registered naked value listeners |
void |
removeNakedValueListener(NakedValueListener l)
Removes an object as a listener of this naked value. |
void |
setAbout(About newAbout)
|
void |
setNull()
Deprecated. |
void |
setValidity(Validity strategy)
|
java.lang.String |
summary()
Returns a String summarising the state of the object. |
java.lang.String |
toString()
Returns a string representation of this object. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface org.nakedobjects.object.NakedValue |
clear, parse, reset, restoreString, saveString |
| Methods inherited from interface org.nakedobjects.object.Naked |
copyObject, isEmpty, isSameAs, title |
| Constructor Detail |
public AbstractNakedValue()
| Method Detail |
protected org.apache.log4j.Logger getLogger()
public About about()
about in interface Nakedprotected void checkCanOperate()
public java.lang.String contextualTitle()
public java.lang.String dumpObject()
public java.lang.String getClassName()
Naked
getClassName in interface Nakedpublic java.lang.String getFullClassName()
Naked
getFullClassName in interface Nakedpublic java.lang.String getObjectHelpText()
Naked
getObjectHelpText in interface Nakedpublic boolean isNull()
isNull in interface NakedValueNaked.isEmpty()public boolean isValid()
Naked
isValid in interface Nakedpublic void setAbout(About newAbout)
public void setNull()
setNull in interface NakedValueNakedValue.clear()public void setValidity(Validity strategy)
public java.lang.String summary()
Naked
summary in interface Nakedpublic java.lang.String toString()
The specification of this string representation is not fixed, but, at the time of writing, consists of title [shortNakedClassName]
public final void addNakedValueListener(NakedValueListener l)
CAVEAT: only objects that are resolved and instantiated will be notified. In general, this means that it is okay for the owning object of a naked value to register itself as a listener, but not for other objects unless it can be arranged for them to have already been resolved from the object store.
public final void removeNakedValueListener(NakedValueListener l)
public final void fireValueChanged(NakedValue oldValue)
deepCopy() on self to obtain current (old) valuenotifyListenersChanged(NakedValue) passing the
old value from first step.
deepCopy()public final void fireValueChanged()
fireValueChanged(NakedValue) that
passes null for the old value.
This was added since it was noted that some value objects are not in fact serializable.
fireValueChanged(NakedValue)public final java.util.Enumeration nakedValueListeners()
public final AbstractNakedValue deepCopy()
Alternatively, could have implemented clone(). However,
that is a much misunderstood method.
Implementation note: exploits fact that AbstractNakedValue
is serializable. Serializes the object to a byte stream, and the
deserializes.
Serializable,
Object.clone()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||