com.arsdigita.domain
Class ObservableDomainObject

java.lang.Object
  extended bycom.arsdigita.domain.DomainObject
      extended bycom.arsdigita.domain.ObservableDomainObject
Direct Known Subclasses:
ACSObject, MessagePart, TaskComment

public abstract class ObservableDomainObject
extends DomainObject

ObservableDomainObject extends DomainObject with an observer pattern on all modification methods, allowing objects to register to receive a callback on those operations.

Version:
1.0
Author:
Joseph Bank

Field Summary
static String versionId
           
 
Constructor Summary
protected ObservableDomainObject(DataObject dobj)
           
  ObservableDomainObject(ObjectType type)
          Constructor.
  ObservableDomainObject(OID oid)
          Constructor.
  ObservableDomainObject(String typeName)
          Constructor.
 
Method Summary
 void addObserver(DomainObjectObserver doo)
          Adds a new observer.
 Iterator getObservers()
          Return an iterator of all the current observers for this Domain Object
 
Methods inherited from class com.arsdigita.domain.DomainObject
add, add, addToAssociation, afterDelete, afterSave, beforeDelete, beforeSave, clear, delete, disconnect, equals, get, getBaseDataObjectType, getObjectType, getOID, getSession, hashCode, initialize, isDeleted, isDisconnected, isModified, isNew, isPropertyModified, isValid, remove, remove, remove, removeFromAssociation, save, set, setAssociation, setAssociation, specializeDataObject, specializeDataObject, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

versionId

public static final String versionId
See Also:
Constant Field Values
Constructor Detail

ObservableDomainObject

protected ObservableDomainObject(DataObject dobj)

ObservableDomainObject

public ObservableDomainObject(String typeName)
Constructor. The contained DataObject is initialized with a new DataObject with an ObjectType specified by the string typeName.

Parameters:
typeName - The name of the ObjectType of the contained DataObject.
See Also:
DomainObject.DomainObject(String), DataObject, ObjectType

ObservableDomainObject

public ObservableDomainObject(ObjectType type)
Constructor. The contained DataObject is initialized with a new DataObject with an ObjectType specified by type.

Parameters:
type - The ObjectType of the contained DataObject.
See Also:
DomainObject.DomainObject(ObjectType), DataObject, ObjectType

ObservableDomainObject

public ObservableDomainObject(OID oid)
                       throws DataObjectNotFoundException
Constructor. The contained DataObject is retrieved from the persistent storage mechanism with an OID specified by oid.

Parameters:
oid - The OID for the retrieved DataObject.
See Also:
DomainObject.DomainObject(OID), DataObject, OID
Method Detail

addObserver

public void addObserver(DomainObjectObserver doo)
Adds a new observer.

Parameters:
doo - the new observer

getObservers

public Iterator getObservers()
Return an iterator of all the current observers for this Domain Object



Copyright (c) 2004 Red Hat, Inc. Corporation. All Rights Reserved. Generated at July 20 2004:2337 UTC