|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface StateRepository
A state repository is a database of conversations. New Conversation objects are created by the StateRepository, which typically stores them in a persistant database.
| Method Summary | ||
|---|---|---|
void |
addListener(StateRepositoryListener listener)
Add a listener which will receive RespositoryChangedEvents. |
|
void |
addObject(StorableInStateRepository object)
Add this object to the repository. |
|
void |
checkForUpdates()
Ensure that the repository is up-to-date. |
|
Conversation[] |
getAccountConversations()
Deprecated. - use getConversationsByType(java.lang.Class instead. |
|
StorableInStateRepository[] |
getAll()
Returns all items in the state repository |
|
StorableInStateRepository[] |
getByParent(URL parent_cid)
Returns a list of all children of the given conversation. |
|
Conversation |
getConversationByID(URL cid)
Returns the Conversation object corresponding to the given URL. |
|
|
getConversationsByType(Class<T> type)
Return all conversations of the given type (a subclass of Conversation). |
|
StorableInStateRepository |
getObject(URL id)
Get an object based on its URL. |
|
|
getOrCreateObject(Class<T> type,
org.apache.axis.message.addressing.EndpointReferenceType EPR)
Get the existing object with this EPR's ID. |
|
StorableInStateRepository |
getOrCreateObject(org.apache.axis.message.addressing.EndpointReferenceType EPR)
Get the existing object with this EPR's ID. |
|
String |
getProperty(QName name)
Get a property set with setProperty. |
|
StorableInStateRepository[] |
getToplevel()
Returns an array of all top-level object (those whose parent is null). |
|
|
instantiateObject(Class<T> type,
org.apache.axis.message.addressing.EndpointReferenceType EPR)
Convenience wrapper for instantiateObject that sets the type in the EPR first. |
|
StorableInStateRepository |
instantiateObject(org.apache.axis.message.addressing.EndpointReferenceType EPR)
Create a new object, in the same way that the StateRepository does when loading saved instances. |
|
void |
notifyChanged(StorableInStateRepository object)
Deprecated. use notifyChanged(StorableInStateRepository, RepositoryChangedEventType) |
|
void |
notifyChanged(StorableInStateRepository object,
RepositoryChangedEventType event)
Notify listeners that this object has changed. |
|
void |
removeListener(StateRepositoryListener listener)
Remove a listener previously added with addListener(). |
|
void |
removeObject(StorableInStateRepository object)
Remove this object from the repository. |
|
void |
setProperty(QName name,
String value)
Set a general property on the repository. |
|
| Method Detail |
|---|
void addObject(StorableInStateRepository object)
throws NoSuchConversation,
ObjectAlreadyExists
ObjectAlreadyExists - if an object with the URL is already present.
NoSuchConversation - if the parent isn't in the repository
void removeObject(StorableInStateRepository object)
throws NoSuchConversation
NoSuchConversation - if the object is not in the repository.
StorableInStateRepository getObject(URL id)
throws NoSuchConversation
NoSuchConversation - if no object has this ID.
Conversation getConversationByID(URL cid)
throws NoSuchConversation
NoSuchConversation@Deprecated Conversation[] getAccountConversations()
getConversationsByType(java.lang.Class) instead.
<T extends Conversation> T[] getConversationsByType(Class<T> type)
StorableInStateRepository[] getToplevel()
StorableInStateRepository[] getByParent(URL parent_cid)
throws NoSuchConversation
NoSuchConversationStorableInStateRepository[] getAll()
void addListener(StateRepositoryListener listener)
void removeListener(StateRepositoryListener listener)
void checkForUpdates()
StorableInStateRepository instantiateObject(org.apache.axis.message.addressing.EndpointReferenceType EPR)
throws ObjectAlreadyExists
ObjectAlreadyExists
<T extends StorableInStateRepository> T instantiateObject(Class<T> type,
org.apache.axis.message.addressing.EndpointReferenceType EPR)
throws ObjectAlreadyExists
ObjectAlreadyExists
<T extends StorableInStateRepository> T getOrCreateObject(Class<T> type,
org.apache.axis.message.addressing.EndpointReferenceType EPR)
throws ClassCastException
EPR - EPR for the object to find or createtype - class of object's interface
ClassCastException - if the object exists but with a different typeinstantiateObject(org.apache.axis.message.addressing.EndpointReferenceType),
getObject(java.net.URL)StorableInStateRepository getOrCreateObject(org.apache.axis.message.addressing.EndpointReferenceType EPR)
EPR - EPR for the object to find or create
instantiateObject(org.apache.axis.message.addressing.EndpointReferenceType),
getObject(java.net.URL)@Deprecated void notifyChanged(StorableInStateRepository object)
notifyChanged(StorableInStateRepository, RepositoryChangedEventType)
object - the object that changed, or null if changes are not limited to a specific object
void notifyChanged(StorableInStateRepository object,
RepositoryChangedEventType event)
object - the object that changed, or null if changes are not limited to a specific objectevent - the type of event that has occured RepositoryChangedEventType
void setProperty(QName name,
String value)
name - a unique name for the propertyvalue - the value of the property (null to unset)String getProperty(QName name)
name - the name passed to setProperty
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||