Class RedirectPatternRule

    • Constructor Detail

      • RedirectPatternRule

        public RedirectPatternRule()
      • RedirectPatternRule

        public RedirectPatternRule​(@Name("pattern")
                                   java.lang.String pattern,
                                   @Name("location")
                                   java.lang.String location)
    • Method Detail

      • setLocation

        public void setLocation​(java.lang.String value)
        Sets the redirect location.
        Parameters:
        value - the location to redirect.
      • setStatusCode

        public void setStatusCode​(int statusCode)
        Sets the redirect status code.
        Parameters:
        statusCode - the 3xx redirect status code
      • apply

        public java.lang.String apply​(java.lang.String target,
                                      javax.servlet.http.HttpServletRequest request,
                                      javax.servlet.http.HttpServletResponse response)
                               throws java.io.IOException
        Description copied from class: PatternRule
        Apply the rule to the request
        Specified by:
        apply in class PatternRule
        Parameters:
        target - field to attempt match
        request - request object
        response - response object
        Returns:
        The target (possible updated)
        Throws:
        java.io.IOException - exceptions dealing with operating on request or response objects
      • toString

        public java.lang.String toString()
        Returns the redirect status code and location.
        Overrides:
        toString in class PatternRule