public interface

RequestKeys

com.microstrategy.web.beans.RequestKeys
Known Indirect Subclasses

Class Overview

This interface stores a collection of keys from the request context. Each key is also a collection of values that may have originated from one of several different sources (such as the URL query string, form data, cookies or session variables).

To walk through the list of all unique names, use the getName method supplying an index from 0 to the value of getNameCount - 1.

Summary

Public Methods
abstract String add(String key, String value)
Adds a key/value pair to this collection.
abstract Object addObject(String key, Object value)
Adds a key/value pair to this collection.
abstract MarkupOutput getDebugOut()
Get the Debug Information into the output
abstract int getIntValue(String key, int index)
Parses the value of given request key to an integer.
abstract int getIntValue(String keyName, int valueIndex, int defaultValue)
Parses the value of given request key to an integer.
abstract Enumeration getKeyListByPrefix(String prefix)
Returns an enumeration over all the keys with the specified prefix.
abstract String getName(int nameIndex)
Returns the name at the specified index from the current collection.
abstract int getNameCount()
Returns the number of names stored in the current collection.
abstract String getValue(String keyName)
Returns from this collection a comma separated string of all the values mapped by the specified keyName.
abstract String getValue(String keyName, int valueIndex)
Returns at the specified index the value from the collection mapped by the specified keyName.
abstract int getValueCount(String keyName)
Returns the number of values from the collection mapped by the specified keyName.
abstract Object getValueObject(String key, int index)
Returns at the specified index the value from the collection mapped by the specified key.
abstract Enumeration getValueObject(String key)
Returns from this collection a list of all the objects mapped by the specified key.
abstract boolean isEmpty()
Returns a boolean value indicating whether the current collection is empty
abstract void remove(String key)
Removes the argument with the given key.
abstract void setValue(String key, String value, int index)
Replaces the value at a specific index for a given key.
abstract void setValueObject(String key, Object value, int index)
Replaces the Object at a specific index for a given key.

Public Methods

public abstract String add (String key, String value)

Adds a key/value pair to this collection. If the supplied key already exists in the collection, the supplied value is added to the collection. It does overwrite or replace the existing value.

Parameters
key the key under which the new value will be added
value the value to be appended
Returns
  • a copy of the value added

public abstract Object addObject (String key, Object value)

Adds a key/value pair to this collection. If the supplied key already exists in the collection, the supplied value object is added to the collection. It does overwrite or replace the existing value.

Parameters
key the key under which the new value will be added
value the Object to be appended
Returns
  • a copy of the Object added

public abstract MarkupOutput getDebugOut ()

Get the Debug Information into the output

Returns

public abstract int getIntValue (String key, int index)

Parses the value of given request key to an integer.

Parameters
key The request key name
index an index of the value to return (must be between 0 and getValueCount(name)-1.
Returns
  • An integer value, if the value is not null and can be parsed to an integer. Otherwise, it throws NumberFormatException

public abstract int getIntValue (String keyName, int valueIndex, int defaultValue)

Parses the value of given request key to an integer.

Parameters
defaultValue The default value.
Returns
  • An integer value, if the value can be parsed to an integer. Otherwise, it returns the default value.

public abstract Enumeration getKeyListByPrefix (String prefix)

Returns an enumeration over all the keys with the specified prefix.
Returns all the keys if the specified prefix is null or empty.
Returns an empty list if no key is found.

Parameters
prefix the prefix of keys.
Returns
  • an enumeration over all the keys that have the specified prefix.

public abstract String getName (int nameIndex)

Returns the name at the specified index from the current collection.

Parameters
nameIndex the index of the name
Returns
  • the name at the specified index; null if the index is invalid.

public abstract int getNameCount ()

Returns the number of names stored in the current collection.

Returns
  • the count of names in the collection.

public abstract String getValue (String keyName)

Returns from this collection a comma separated string of all the values mapped by the specified keyName.

Parameters
keyName a key in this collection
Returns
  • all the values mapped to the keyName, separated by the character comma; null if the key does not exist.

public abstract String getValue (String keyName, int valueIndex)

Returns at the specified index the value from the collection mapped by the specified keyName.

Parameters
keyName a name associated to a collection of values.
valueIndex an index of the value to return (must be between 0 and getValueCount(name)-1.
Returns
  • at the specified index the value from the collection mapped by the specified keyName; null if the name does not exist in the collection or the index is invalid.

public abstract int getValueCount (String keyName)

Returns the number of values from the collection mapped by the specified keyName.

Parameters
keyName a name associated with a collection of values
Returns
  • the number of values from the collection mapped by the specified keyName; 0 if the specified keyName does not exist in the collection or there is no value belonging to the name.

public abstract Object getValueObject (String key, int index)

Returns at the specified index the value from the collection mapped by the specified key.

Parameters
key a name associated to a collection of values.
index an index of the Object to return (must be between 0 and getValueCount(name)-1.
Returns
  • Object at the specified index in the collection mapped by the specified key; null if the name does not exist in the collection or the index is invalid.

public abstract Enumeration getValueObject (String key)

Returns from this collection a list of all the objects mapped by the specified key.

Parameters
key a key in this collection
Returns
  • all the objects mapped to the key; null if the key does not exist.

public abstract boolean isEmpty ()

Returns a boolean value indicating whether the current collection is empty

Returns
  • true if this collection of keys is empty.

public abstract void remove (String key)

Removes the argument with the given key.

Parameters
key the key of the argument to remove.

public abstract void setValue (String key, String value, int index)

Replaces the value at a specific index for a given key. As any key may have several values, this method replaces a specific value. Nothing happens if the index is out of bounds.

Parameters
key the new key whose correponding value to be added
value the new value to be added
index the position to add the key-value pair.

public abstract void setValueObject (String key, Object value, int index)

Replaces the Object at a specific index for a given key. As any key may have several objects, this method replaces a specific Object. Nothing happens if the index is out of bounds.

Parameters
key the new key whose correponding value to be added
value the new Object to be added
index the position to add the key-value pair.