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

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

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

Direct Known Subclasses:
  DefaultStrutsURLRewriter

    public abstract class StrutsURLRewriter

extends Object

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

This abstract class is intended to be implemented only by BEA Weblogic Portal. BEA Systems reserves the right to add abstract methods to this abstract class without notice. Extensions of this abstract class by other parties must not be expected to compile without change in future versions of BEA Weblogic Portal.

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
`StrutsURLRewriter()`

Method Summary
`abstract String` | `createActionURL(javax.servlet.jsp.PageContext pageContext, String action, String type)`
`StrutsURLRewriter` | `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(javax.servlet.ServletContext servletContext, javax.servlet.ServletRequest request, String name)` Rewrite the given query parameter name.
`abstract String` | `rewriteURL(javax.servlet.ServletContext servletContext, javax.servlet.ServletRequest request, javax.servlet.ServletResponse response, String url, String type)` Rewrite the given URL.
`void` | `setNextRewriter(StrutsURLRewriter nextRewriter)` Set the next StrutsURLRewriter in the chain.

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

Field Detail

### NO_TYPE

    public static final String NO_TYPE

See Also
  Constants Summary

### 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.

### 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.

### 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.

### 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.

Constructor Detail

### StrutsURLRewriter

    public StrutsURLRewriter()

Method Detail

### rewriteName

    public abstract String rewriteName(javax.servlet.ServletContext servletContext,
                                       javax.servlet.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(javax.servlet.ServletContext servletContext,
                                      javax.servlet.ServletRequest request,
                                      javax.servlet.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.

### getNextRewriter

    public StrutsURLRewriter getNextRewriter()

  Get the next URLRewriter in the chain.

  Returns
    the next `StrutsUrlRewriter` in the rewriter chain
  See Also
    `setNextRewriter(com.bea.struts.adapter.util.rewriter.StrutsURLRewriter)`

### createActionURL

    public abstract String createActionURL(javax.servlet.jsp.PageContext pageContext,
                                           String action,
                                           String type)

### setNextRewriter

    public void setNextRewriter(StrutsURLRewriter nextRewriter)

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

  Parameters
    `nextRewriter` - the `StrutsURLRewriter to insert after this rewriter in the chain`

### isStandAloneForward

    public boolean isStandAloneForward()

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

  Returns
    whether or not a forward is for an non-Portlet application or not

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2008 BEA Systems, Inc. All Rights Reserved