Class RequestDispatcherOptions

    • Field Detail

      • OPT_FORCE_RESOURCE_TYPE

        public static final String OPT_FORCE_RESOURCE_TYPE
        When dispatching, use the value provided by this option as the resource type, instead of the one defined by the Resource.
        See Also:
        Constant Field Values
      • OPT_REPLACE_SELECTORS

        public static final String OPT_REPLACE_SELECTORS
        When dispatching, replace RequestPathInfo selectors by the value provided by this option. If this value contains an empty string, all original selectors are removed.
        See Also:
        Constant Field Values
    • Constructor Detail

      • RequestDispatcherOptions

        public RequestDispatcherOptions()
        Creates an instance with no options set.
      • RequestDispatcherOptions

        public RequestDispatcherOptions​(String options)
        Creates a new instances setting options by parsing the given options string as follows:
        • If the string is empty or null no options are set.
        • If the string neither contains a comma nor an equals sign, the string is assumed to be a resource type. Hence a RequestDispatcherOptions object is created with the OPT_FORCE_RESOURCE_TYPE field set to the string.
        • Otherwise the string is assumed to be a comma separated list of name value pairs where the equals sign is used to separate the name from its value. Hence a RequestDispatcherOptions object is created from the name value pair list.
        Parameters:
        options - The options to set.
    • Method Detail

      • setForceResourceType

        public void setForceResourceType​(String resourceType)
        Sets the OPT_FORCE_RESOURCE_TYPE option to the given resourceType if not null.
        Parameters:
        resourceType - the resource type
      • getForceResourceType

        public String getForceResourceType()
        Returns the OPT_FORCE_RESOURCE_TYPE option or null if not set.
        Returns:
        The resource type.
      • setAddSelectors

        public void setAddSelectors​(String additionalSelectors)
        Sets the OPT_ADD_SELECTORS option to the given additionalSelectors if not null.
        Parameters:
        additionalSelectors - The add selectors
      • getAddSelectors

        public String getAddSelectors()
        Returns the OPT_ADD_SELECTORS option or null if not set.
        Returns:
        The add selectors.
      • setReplaceSelectors

        public void setReplaceSelectors​(String replaceSelectors)
        Sets the OPT_REPLACE_SELECTORS option to the given replaceSelectors if not null. If this value contains an empty string, all original selectors are removed.
        Parameters:
        replaceSelectors - The replace selectors.
      • getReplaceSelectors

        public String getReplaceSelectors()
        Returns the OPT_REPLACE_SELECTORS option or null if not set.
        Returns:
        The replace selectors.
      • setReplaceSuffix

        public void setReplaceSuffix​(String replaceSuffix)
        Sets the OPT_REPLACE_SUFFIX option to the given replaceSuffix if not null.
        Parameters:
        replaceSuffix - The replace suffix
      • getReplaceSuffix

        public String getReplaceSuffix()
        Returns the OPT_REPLACE_SUFFIX option or null if not set.
        Returns:
        The replace suffix