MicroStrategy ONE
RequestKeys
The RequestKeys interface is a support interface representing a collection of keys from the request context. Each key is a name-value pair that may have originated from one of several different sources such as the URL query string, form data, cookies, or session variables.
The RequestKeys are largely responsible for the maintaining of state in the Web application. The Web application stores every parameter that gets sent as part of the request context in an object called the RequestKeys, whether the parameter originates from the URL query string, form data, cookies, or session variables. Every name/value pair is stored as a key in the RequestKeys interface, and the interface provides methods that allow the application (or the SDK developer) to iterate through the collection or search for a particular desired key.
Many objects that are required for the successful display of a page rely on values stored in the RequestKeys. For example, Web Beans search for the presence of their serialized state (that is, Web Bean state information converted to string form), and appropriate Event Handlers are called based on the presence and nature of the event ID (and argument IDs, if any) stored here.
-
The isEmpty method is used to determine if the collection is empty.
-
The getNameCount method is used to get a count of the total number of unique names in this collection.
-
The getName method can be used for traversing the list of all unique names, by supplying an index from 0 to the value of (getNameCount – 1).
-
Since each name can contain several different values, the getValueCount method takes the name of a key and returns the number of values.
-
To retrieve the list of values for a single name, the getValue method can be used that retrieves all values belonging to the name and returns them in a single string. Each value in the string is separated by the special character comma (,). To retrieve the first value for a single key, the overloaded getValue(String name,int index) method can be used.
The Web Bean object uses this interface to search for its serialized state, while the Transform object uses this interface to search for instructions that are generated.