org.directwebremoting.datasync
Class AbstractStoreProvider<T>

java.lang.Object
  extended by org.directwebremoting.datasync.AbstractStoreProvider<T>
All Implemented Interfaces:
StoreProvider<T>
Direct Known Subclasses:
MapStoreProvider

public abstract class AbstractStoreProvider<T>
extends java.lang.Object
implements StoreProvider<T>

Some methods to help implementors create StoreProviders. It is strongly recommended that all implementors of StoreProvider inherit from this class in case it can provide some form of backwards compatibility.

Author:
Joe Walker [joe at getahead dot ltd dot uk]

Constructor Summary
AbstractStoreProvider(java.lang.Class<T> type)
           
 
Method Summary
 void put(java.lang.String itemId, RawData rawData)
          Similar to Map.put(K, V) in adding items to a Store.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.directwebremoting.datasync.StoreProvider
get, put, subscribe, unsubscribe, view
 

Constructor Detail

AbstractStoreProvider

public AbstractStoreProvider(java.lang.Class<T> type)
Method Detail

put

public void put(java.lang.String itemId,
                RawData rawData)
Description copied from interface: StoreProvider
Similar to Map.put(K, V) in adding items to a Store. A value of null is equivalent to removing the item from the store. Part of the function of put is to convert the data stored in RawData into alterations to data in the store. This boiler plate code is implemented in AbstractStoreProvider.

See notes on Item.getItemId()

Specified by:
put in interface StoreProvider<T>
Parameters:
itemId - The key (or some mapping) to it.
rawData - Data from the web to be converted and added to the store

Copyright ยจ 2008