Overview | Package | Class | Tree | Deprecated | Index | Help
| © 2005 BEA Systems, Inc.
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.bea.struts.adapter.util.rewriter
Class URLRewriter

    java.lang.Object
      com.bea.struts.adapter.util.rewriter.URLRewriter

Direct Known Subclasses:
  DefaultURLRewriter

public abstract class URLRewriter
extends Object

URL rewriter interface. Offers methods for rewriting URLs/query parameters, and adding URL rewriters to the chain.

Field Summary
`static String` | `ACTION_SECURE` Passed to `rewriteURL(javax.servlet.ServletContext, javax.servlet.ServletRequest, javax.servlet.ServletResponse, java.lang.String, java.lang.String)` for normal (non-resource) secure URLs.
`static String` | `ACTION_UNSECURE` Passed to `rewriteURL(javax.servlet.ServletContext, javax.servlet.ServletRequest, javax.servlet.ServletResponse, java.lang.String, java.lang.String)` for normal (non-resource) non-secure URLs.
`static String` | `NO_TYPE`
`static String` | `RESOURCE_SECURE` Passed to `rewriteURL(javax.servlet.ServletContext, javax.servlet.ServletRequest, javax.servlet.ServletResponse, java.lang.String, java.lang.String)` for resource (e.g., image) secure URLs.
`static String` | `RESOURCE_UNSECURE` Passed to `rewriteURL(javax.servlet.ServletContext, javax.servlet.ServletRequest, javax.servlet.ServletResponse, java.lang.String, java.lang.String)` for resource (e.g., image) non-secure URLs.

Constructor Summary
`URLRewriter()`

Method Summary
`abstract String` | `createActionURL(PageContext pageContext, String action, String type)`
`URLRewriter` | `getNextRewriter()` Get the next URLRewriter in the chain.
`boolean` | `isStandAloneForward()` Used to determine whether or not a tag is to be rendered within a nested environment, such as a portal.
`abstract String` | `rewriteName(ServletContext servletContext, ServletRequest request, String name)` Rewrite the given query parameter name.
`abstract String` | `rewriteURL(ServletContext servletContext, ServletRequest request, ServletResponse response, String url, String type)` Rewrite the given URL.
`void` | `setNextRewriter(URLRewriter nextRewriter)` Set the next URLRewriter in the chain.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### ACTION_SECURE

    public static String ACTION_SECURE

  Passed to `rewriteURL(javax.servlet.ServletContext, javax.servlet.ServletRequest, javax.servlet.ServletResponse, java.lang.String, java.lang.String)` for normal (non-resource) secure URLs.

### ACTION_UNSECURE

    public static String ACTION_UNSECURE

  Passed to `rewriteURL(javax.servlet.ServletContext, javax.servlet.ServletRequest, javax.servlet.ServletResponse, java.lang.String, java.lang.String)` for normal (non-resource) non-secure URLs.

### NO_TYPE

    public static final String NO_TYPE

See Also:
  Constant Field Values

### RESOURCE_SECURE

    public static String RESOURCE_SECURE

  Passed to `rewriteURL(javax.servlet.ServletContext, javax.servlet.ServletRequest, javax.servlet.ServletResponse, java.lang.String, java.lang.String)` for resource (e.g., image) secure URLs.

### RESOURCE_UNSECURE

    public static String RESOURCE_UNSECURE

  Passed to `rewriteURL(javax.servlet.ServletContext, javax.servlet.ServletRequest, javax.servlet.ServletResponse, java.lang.String, java.lang.String)` for resource (e.g., image) non-secure URLs.

Constructor Detail

### URLRewriter

    public URLRewriter()

Method Detail

### createActionURL

    public abstract String createActionURL(PageContext pageContext,
                                           String action,
                                           String type)

### getNextRewriter

    public URLRewriter getNextRewriter()

  Get the next URLRewriter in the chain.

  See Also:
    `setNextRewriter(com.bea.struts.adapter.util.rewriter.URLRewriter)`

### isStandAloneForward

    public boolean isStandAloneForward()

  Used to determine whether or not a tag is to be rendered within a nested environment, such as a portal.

### rewriteName

    public abstract String rewriteName(ServletContext servletContext,
                                       ServletRequest request,
                                       String name)

  Rewrite the given query parameter name.

  Parameters:
    `servletContext` - the current ServletContext.
    `request` - the current HttpServletRequest.
    `name` - the query parameter name to rewrite.
  Returns:
    the rewritten query parameter name.

### rewriteURL

    public abstract String rewriteURL(ServletContext servletContext,
                                      ServletRequest request,
                                      ServletResponse response,
                                      String url,
                                      String type)

  Rewrite the given URL.

  Parameters:
    `servletContext` - the current ServletContext.
    `request` - the current HttpServletRequest.
    `response` - the current HttpServletResponse.
    `url` - the URL to rewrite.
    `type` - the type of URL to be rewritten. This is one of the following values:
    - `action`: a standard (non-resource) URL, for which SSL is not required
    - `secure-action`: a standard (non-resource) URL, for which SSL is required
    - `resource`: a resource (e.g., image) URL, for which SSL is not required
    - `secure-resource`: a resource (e.g., image) URL, for which SSL is required
  Returns:
    the rewritten URL.

### setNextRewriter

    public void setNextRewriter(URLRewriter nextRewriter)

  Set the next URLRewriter in the chain. When `URLRewriterService.rewriteURL(javax.servlet.ServletContext, javax.servlet.ServletRequest, javax.servlet.ServletResponse, java.lang.String, java.lang.String)` is called, it will start with the URLRewriter registered in the request (`URLRewriterService.registerURLRewriter(javax.servlet.ServletRequest, com.bea.struts.adapter.util.rewriter.URLRewriter)`), and call {@link #rewriteURL) on each URLRewriter in the chain.

Overview | Package | Class | Tree | Deprecated | Index | Help
| © 2005 BEA Systems, Inc.
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2005 BEA Systems, Inc. All Rights Reserved