org.tuckey.web.filters.urlrewrite
Class NormalRewrittenUrl

java.lang.Object
  extended by org.tuckey.web.filters.urlrewrite.NormalRewrittenUrl
All Implemented Interfaces:
RewrittenUrl

public class NormalRewrittenUrl
extends java.lang.Object
implements RewrittenUrl

Holds information about the rewirtten url.

Version:
$Revision: 1 $ $Date: 2006-08-01 21:40:28 +1200 (Tue, 01 Aug 2006) $
Author:
Paul Tuckey

Constructor Summary
  NormalRewrittenUrl(RuleExecutionOutput ruleExecutionOutput)
          Holds information about the rewirtten url.
protected NormalRewrittenUrl(java.lang.String target)
          Holds information about the rewirtten url.
 
Method Summary
 boolean doRewrite(javax.servlet.http.HttpServletRequest hsRequest, javax.servlet.http.HttpServletResponse hsResponse, javax.servlet.FilterChain chain)
          The method that actually handles the outcome and rewrites.
 java.lang.String getTarget()
          Gets the target url
 javax.servlet.ServletContext getTargetContext()
           
 boolean isEncode()
           
 boolean isForward()
           
 boolean isNoSubstitution()
           
 boolean isPermanentRedirect()
           
 boolean isPostInclude()
           
 boolean isPreInclude()
           
 boolean isProxy()
           
 boolean isRedirect()
           
 boolean isStopFilterChain()
           
 boolean isTemporaryRedirect()
           
 void setEncode(boolean b)
           
 void setForward(boolean forward)
           
 void setNoSubstitution(boolean noSubstitution)
           
 void setPermanentRedirect(boolean permanentRedirect)
           
 void setPostInclude(boolean postInclude)
           
 void setPreInclude(boolean preInclude)
           
 void setProxy(boolean proxy)
           
 void setRedirect(boolean redirect)
           
 void setStopFilterChain(boolean stopFilterChain)
           
 void setTargetContext(javax.servlet.ServletContext targetContext)
           
 void setTemporaryRedirect(boolean temporaryRedirect)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NormalRewrittenUrl

public NormalRewrittenUrl(RuleExecutionOutput ruleExecutionOutput)
Holds information about the rewirtten url.

Parameters:
ruleExecutionOutput - the url to rewrite to

NormalRewrittenUrl

protected NormalRewrittenUrl(java.lang.String target)
Holds information about the rewirtten url.

Parameters:
target - the url to rewrite to
Method Detail

getTarget

public java.lang.String getTarget()
Gets the target url

Specified by:
getTarget in interface RewrittenUrl
Returns:
the target

isForward

public boolean isForward()

setRedirect

public void setRedirect(boolean redirect)

isRedirect

public boolean isRedirect()

setForward

public void setForward(boolean forward)

setPermanentRedirect

public void setPermanentRedirect(boolean permanentRedirect)

isPermanentRedirect

public boolean isPermanentRedirect()

setTemporaryRedirect

public void setTemporaryRedirect(boolean temporaryRedirect)

isTemporaryRedirect

public boolean isTemporaryRedirect()

setEncode

public void setEncode(boolean b)

isEncode

public boolean isEncode()

isPreInclude

public boolean isPreInclude()

setPreInclude

public void setPreInclude(boolean preInclude)

isPostInclude

public boolean isPostInclude()

setPostInclude

public void setPostInclude(boolean postInclude)

isStopFilterChain

public boolean isStopFilterChain()

setStopFilterChain

public void setStopFilterChain(boolean stopFilterChain)

isProxy

public boolean isProxy()

setProxy

public void setProxy(boolean proxy)

doRewrite

public boolean doRewrite(javax.servlet.http.HttpServletRequest hsRequest,
                         javax.servlet.http.HttpServletResponse hsResponse,
                         javax.servlet.FilterChain chain)
                  throws java.io.IOException,
                         javax.servlet.ServletException
The method that actually handles the outcome and rewrites.

Specified by:
doRewrite in interface RewrittenUrl
Parameters:
hsRequest -
hsResponse -
chain -
Returns:
True if the request was rewritten otherwise false.
Throws:
javax.servlet.ServletException
java.io.IOException

getTargetContext

public javax.servlet.ServletContext getTargetContext()
Returns:
the targetContext

setTargetContext

public void setTargetContext(javax.servlet.ServletContext targetContext)
Parameters:
targetContext - the targetContext to set

isNoSubstitution

public boolean isNoSubstitution()

setNoSubstitution

public void setNoSubstitution(boolean noSubstitution)