public abstract class HomeObject
extends java.lang.Object
implements java.io.Serializable, java.lang.Cloneable
| Modifier | Constructor and Description |
|---|---|
|
HomeObject()
Creates a new object with a unique ID prefixed by
object-. |
protected |
HomeObject(java.lang.String id)
Creates a new object with the given
id. |
| Modifier and Type | Method and Description |
|---|---|
void |
addPropertyChangeListener(java.beans.PropertyChangeListener listener)
Adds the property change
listener in parameter to this object. |
void |
addPropertyChangeListener(java.lang.String propertyName,
java.beans.PropertyChangeListener listener)
Adds the property change
listener in parameter to this object for a specific property name. |
HomeObject |
clone()
Returns a clone of this object.
|
protected static java.lang.String |
createId(java.lang.String prefix)
Returns a new ID prefixed by the given string.
|
HomeObject |
duplicate()
Returns a copy of this object with a new id.
|
protected void |
firePropertyChange(java.lang.String propertyName,
java.lang.Object oldValue,
java.lang.Object newValue)
Fires a property change of
PropertyChangeEvent class to listeners. |
Content |
getContentProperty(java.lang.String name)
Returns the value of the content
name associated to this object. |
java.lang.String |
getId()
Returns the ID of this object.
|
java.lang.String |
getProperty(java.lang.String name)
Returns the value of the property
name associated with this object. |
java.util.Collection<java.lang.String> |
getPropertyNames()
Returns the property names.
|
boolean |
isContentProperty(java.lang.String name)
Returns
true if the type of given property is a content. |
void |
removePropertyChangeListener(java.beans.PropertyChangeListener listener)
Removes the property change
listener in parameter from this object. |
void |
removePropertyChangeListener(java.lang.String propertyName,
java.beans.PropertyChangeListener listener)
Removes the property change
listener in parameter from this object. |
void |
setProperty(java.lang.String name,
java.lang.Object value)
Sets the property associated with this object.
|
void |
setProperty(java.lang.String name,
java.lang.String value)
Sets the value of a property associated with this object.
|
public HomeObject()
object-.protected HomeObject(java.lang.String id)
id.protected static java.lang.String createId(java.lang.String prefix)
public void addPropertyChangeListener(java.beans.PropertyChangeListener listener)
listener in parameter to this object.
Properties set with setProperty will be notified with
an event of PropertyChangeEvent class.public void removePropertyChangeListener(java.beans.PropertyChangeListener listener)
listener in parameter from this object.public void addPropertyChangeListener(java.lang.String propertyName,
java.beans.PropertyChangeListener listener)
listener in parameter to this object for a specific property name.
Properties set with setProperty will be notified with
an event of PropertyChangeEvent class.public void removePropertyChangeListener(java.lang.String propertyName,
java.beans.PropertyChangeListener listener)
listener in parameter from this object.protected void firePropertyChange(java.lang.String propertyName,
java.lang.Object oldValue,
java.lang.Object newValue)
PropertyChangeEvent class to listeners.public final java.lang.String getId()
public java.lang.String getProperty(java.lang.String name)
name associated with this object.null if it doesn't exist.public Content getContentProperty(java.lang.String name)
name associated to this object.null if it doesn't exist or if it's not a content.public boolean isContentProperty(java.lang.String name)
true if the type of given property is a content.public void setProperty(java.lang.String name,
java.lang.String value)
PropertyChangeEvent class.name - the name of the property to setvalue - the new value of the property or null to remove an existing propertypublic void setProperty(java.lang.String name,
java.lang.Object value)
PropertyChangeEvent class.name - the name of the property to setvalue - the new value of the property or null to remove an existing propertyjava.lang.IllegalArgumentException - if the value isn't an instance of String of Contentpublic java.util.Collection<java.lang.String> getPropertyNames()
setPropertypublic HomeObject duplicate()
public HomeObject clone()
clone in class java.lang.Object

© Copyright 2024 Space Mushrooms
Distributed under GNU General Public License