Class StringRequestKeys

  • All Implemented Interfaces:
    RequestKeys

    public class StringRequestKeys
    extends CaseInsensitiveRequestKeys
    The StringRequestKeys class makes available to the application the values of parameters passed on a specified string, with URL format. For example, the format of the string should be like abc=1&def=one&g=false
    Since:
    MicroStrategy Web 7.3.1 or earlier
    • Constructor Detail

      • StringRequestKeys

        public StringRequestKeys()
        Constructor. Initializes a new empty instance of the StringRequestKeys class.
      • StringRequestKeys

        public StringRequestKeys​(java.lang.String urlString,
                                 boolean hasTargetReference)
        Constructor.
        Parameters:
        urlString - The URL string contains request parameters.
        hasTargetReference - A boolean value indicates whether there is target information included in the URL. For example, URL String abc=1&def=one doesn't contain target, but URL String http://localhost/page?abc=1&def=one contains target information. Target will be ingored when building request keys.
      • StringRequestKeys

        public StringRequestKeys​(java.lang.String urlString)
        Constructor.
        Parameters:
        urlString - The URL string contains request parameters, such as abc=1&def=one.
      • StringRequestKeys

        public StringRequestKeys​(WebEvent webEvent,
                                 int eventElements)
        Packages the information inside a WebEvent into a RequestKeys object.
        Parameters:
        webEvent - The event to retrieve information from.
        eventElements - This parameter is used to control what should be added into request keys, such as event id, soruce, etc. The elements to add to this RequestKeys object. This is a bit-OR of the Event elements defined in EnumEventElement. EnumEventElement.
        Since:
        MicroStrategy Web 8.0.0
    • Method Detail

      • addKey

        public void addKey​(java.lang.String key,
                           java.lang.String value)
        Adds parameter into request keys.
        Parameters:
        key - The parameter name.
        value - The parameter value.
      • replaceKey

        public void replaceKey​(java.lang.String key,
                               java.lang.String value,
                               int index)
        Replaces parameter value for any existing parameter.
        Parameters:
        key - The name of the parameter.
        value - The new value of the parameter.
        index - The position to add the key-value pair.
      • initializeRequestKeys

        protected void initializeRequestKeys()
        Initializes the collection with the values from the Request and/or Session, according to what was specified by the keySpace.
        Overrides:
        initializeRequestKeys in class GenericRequestKeys