|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object | +--com.arsdigita.acs.AdSet
Implements a multiset of name-value pairs. Analogous to ns_set. Not really a Set implementation.... Implemented as Hashtable of Vectors.
| Field Summary | |
static java.lang.String |
cvsId
|
| Constructor Summary | |
|
AdSet()
|
protected |
AdSet(javax.servlet.http.HttpServletRequest request)
Constructs an AdSet out of the parameter/value pairs in the servlet request. |
|
AdSet(java.lang.Object[][] objects)
Constructs an AdSet out of an array of arrays of name-value pairs. |
|
AdSet(javax.servlet.ServletRequest request)
Constructs an AdSet out of the parameter/value pairs in the servlet request. |
| Method Summary | |
boolean |
contains(java.lang.String key)
Returns true if AdSet contains key. |
void |
deleteKey(java.lang.String key)
Removes key from this. |
java.lang.String |
get(java.lang.String key)
Gets a value for a given key. |
java.lang.String[] |
getAll(java.lang.String key)
Returns all values mapped from key. |
java.lang.String |
join(java.lang.String delim)
Returns the values of an AdSet joined (in the Tcl sense) into one String. |
java.lang.String[] |
keys()
Returns a list of valid keys in this datasource, for use with get(). |
java.util.Enumeration |
keysAndValues()
|
java.util.Enumeration |
keysAsEnumeration()
|
boolean |
next()
Returns false. |
void |
put(java.lang.String key,
java.lang.Object value)
Adds a key/value pair to this. |
void |
put(java.lang.String key,
java.lang.String value)
Adds a key/value pair to this. |
int |
rownum()
Returns the current row number. |
int |
size()
Returns number of keys in this AdSet. |
void |
update(java.lang.String key,
java.lang.String value)
Changes the first mapping from key to value. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final java.lang.String cvsId
| Constructor Detail |
public AdSet()
public AdSet(javax.servlet.ServletRequest request)
request - The servlet request
protected AdSet(javax.servlet.http.HttpServletRequest request)
throws java.lang.Exception
param_tmpfile if a supplied form
parameter named param is type=FILE.
Warning: this should only be called once for any given servlet request, because we cannot rewind the input stream for a multipart request. User code should never call this constructor; use the AdSet in acs.form instead.
request - The servlet request
public AdSet(java.lang.Object[][] objects)
throws java.lang.Exception
objects - an array of arrays of name value pairs. The first of the pair must be assignment compatible with String and the
second with Object. ie, something of the form:
new Object[][] = { {"foo", new Foo()},
{"bar", new Bar()},
{"baz", new Baz()},
{"glorp", new Glorp()} }| Method Detail |
public java.lang.String join(java.lang.String delim)
delim - what will be used to delimit the entries; null will default to ", ". Note however that "" will not default to anything.
public void put(java.lang.String key,
java.lang.String value)
key - The keyname - The value
public void put(java.lang.String key,
java.lang.Object value)
key - The keyname - The valuepublic java.lang.String get(java.lang.String key)
get in interface DataSourcekey - The keynull
if key is not mapped.public java.lang.String[] getAll(java.lang.String key)
key.key - The keykeypublic boolean contains(java.lang.String key)
key.contains in interface DataSourcepublic boolean next()
false. For implementing DataSource.
public int rownum()
throws DataSourceException
public void update(java.lang.String key,
java.lang.String value)
key to value.key - The keyvalue - The valuepublic void deleteKey(java.lang.String key)
key from this.key - The key to removepublic java.lang.String[] keys()
DataSourcekeys in interface DataSourcepublic java.util.Enumeration keysAsEnumeration()
public java.util.Enumeration keysAndValues()
public int size()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||