com.bowstreet.webapp
Interface WebAppData

All Superinterfaces:
IExemplar

public interface WebAppData
extends IExemplar

Interface used to store domain application specific instance data. The data stored and retrieved using this interface is globally shared across the requester session. This implementation of this can be used to store application data for the current requester in cases where the data must be shared between multiple WebAppAccess instances for a single user. The default implementation of this interface stores the data in the users Session so take care in how much data you store. The implementation of this is replaceable, so that other mechanisms can be used as the storage location. See the technical reference for more detail.


Field Summary
static java.lang.String REQUEST_PROPERTY
          The name on the attribute property key for putting a reference to a WebAppData in the HttpServletRequest.
 
Method Summary
 java.lang.Object get(java.lang.String key)
          Returns the value to which this WebAppData maps the specified key.
 void init(javax.servlet.http.HttpServletRequest request)
          Initialize InstanceDataStorage with data it might need.
 java.util.Iterator keys()
          Returns a Iterator view of the keys contained in this WebAppData.
 void put(java.lang.String key, java.lang.Object value)
          Associates the specified value with the specified key in this WebAppData.
 void remove(java.lang.String key)
          Removes the mapping for this key from this WebAppData if present.
 
Methods inherited from interface com.bowstreet.util.IExemplar
newInstance
 

Field Detail

REQUEST_PROPERTY

static final java.lang.String REQUEST_PROPERTY
The name on the attribute property key for putting a reference to a WebAppData in the HttpServletRequest.

Method Detail

get

java.lang.Object get(java.lang.String key)
Returns the value to which this WebAppData maps the specified key. Returns null if the WebAppData contains no mapping for this key.

Parameters:
key - Key whose associated value is to be returned.
Returns:
the value to which this WebAppData maps the specified key, or null if the WebAppData contains no mapping for this key.

init

void init(javax.servlet.http.HttpServletRequest request)
Initialize InstanceDataStorage with data it might need.

Parameters:
request - The HttpServletRequest for the current request.

keys

java.util.Iterator keys()
Returns a Iterator view of the keys contained in this WebAppData.

Returns:
an Iterator view of the keys contained in this WebAppData.

put

void put(java.lang.String key,
         java.lang.Object value)
Associates the specified value with the specified key in this WebAppData.

Parameters:
key - key with which the specified value is to be associated.
value - value to be associated with the specified key.
Throws:
java.lang.NullPointerException - this WebAppData does not permit null keys or values, and the specified key or value is null.

remove

void remove(java.lang.String key)
Removes the mapping for this key from this WebAppData if present.

Parameters:
key - key whose mapping is to be removed from the WebAppData.


Copyright © 2009 IBM. All Rights Reserved.