Interface RequestKeys

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      java.lang.String add​(java.lang.String key, java.lang.String value)
      Adds a key/value pair to this collection.
      java.lang.Object addObject​(java.lang.String key, java.lang.Object value)
      Adds a key/value pair to this collection.
      MarkupOutput getDebugOut()
      Get the Debug Information into the output
      int getIntValue​(java.lang.String key, int index)
      Parses the value of given request key to an integer.
      int getIntValue​(java.lang.String keyName, int valueIndex, int defaultValue)
      Parses the value of given request key to an integer.
      java.util.Enumeration getKeyListByPrefix​(java.lang.String prefix)
      Returns an enumeration over all the keys with the specified prefix.
      java.lang.String getName​(int nameIndex)
      Returns the name at the specified index from the current collection.
      int getNameCount()
      Returns the number of names stored in the current collection.
      Source getSource​(java.lang.String key)
      Determines where a given request key was sourced from.
      java.lang.String getValue​(java.lang.String keyName)
      Returns from this collection a comma separated string of all the values mapped by the specified keyName.
      java.lang.String getValue​(java.lang.String keyName, int valueIndex)
      Returns at the specified index the value from the collection mapped by the specified keyName.
      int getValueCount​(java.lang.String keyName)
      Returns the number of values from the collection mapped by the specified keyName.
      java.util.Enumeration getValueObject​(java.lang.String key)
      Returns from this collection a list of all the objects mapped by the specified key.
      java.lang.Object getValueObject​(java.lang.String key, int index)
      Returns at the specified index the value from the collection mapped by the specified key.
      boolean isEmpty()
      Returns a boolean value indicating whether the current collection is empty
      void remove​(java.lang.String key)
      Removes the argument with the given key.
      void setValue​(java.lang.String key, java.lang.String value, int index)
      Replaces the value at a specific index for a given key.
      void setValueObject​(java.lang.String key, java.lang.Object value, int index)
      Replaces the Object at a specific index for a given key.
    • Method Detail

      • isEmpty

        boolean isEmpty()
        Returns a boolean value indicating whether the current collection is empty
        Returns:
        true if this collection of keys is empty.
      • getNameCount

        int getNameCount()
        Returns the number of names stored in the current collection.
        Returns:
        the count of names in the collection.
      • getName

        java.lang.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.
      • getValueCount

        int getValueCount​(java.lang.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.
      • getValue

        java.lang.String getValue​(java.lang.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.
      • getValue

        java.lang.String getValue​(java.lang.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.
      • getKeyListByPrefix

        java.util.Enumeration getKeyListByPrefix​(java.lang.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.
      • add

        java.lang.String add​(java.lang.String key,
                             java.lang.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
        Since:
        MicroStrategy Web 7.5.1
      • remove

        void remove​(java.lang.String key)
        Removes the argument with the given key.
        Parameters:
        key - the key of the argument to remove.
        Since:
        MicroStrategy Web 7.5.1
      • setValue

        void setValue​(java.lang.String key,
                      java.lang.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.
        Since:
        MicroStrategy Web 7.5.1
      • getValueObject

        java.util.Enumeration getValueObject​(java.lang.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.
        Since:
        MicroStrategy Web 9.0.0
      • getValueObject

        java.lang.Object getValueObject​(java.lang.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.
        Since:
        MicroStrategy Web 9.0.0
      • addObject

        java.lang.Object addObject​(java.lang.String key,
                                   java.lang.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
        Since:
        MicroStrategy Web 9.0.0
      • setValueObject

        void setValueObject​(java.lang.String key,
                            java.lang.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.
        Since:
        MicroStrategy Web 9.0.0
      • getIntValue

        int getIntValue​(java.lang.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
      • getIntValue

        int getIntValue​(java.lang.String keyName,
                        int valueIndex,
                        int defaultValue)
        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.
        defaultValue - The default value.
        Returns:
        An integer value, if the value can be parsed to an integer. Otherwise, it returns the default value.
      • getDebugOut

        MarkupOutput getDebugOut()
        Get the Debug Information into the output
        Returns:
        an instance of MarkupOutput.
        Since:
        MicroStrategy Web 9.0.3
      • getSource

        Source getSource​(java.lang.String key)
        Determines where a given request key was sourced from.