oss.net.pstream.rewrite
Class RewriteVariableHandler

java.lang.Object
  |
  +--oss.net.pstream.rewrite.RewriteVariableHandler
Direct Known Subclasses:
HostNameRewriteVariableHandler, HostPathRewriteVariableHandler, HostPortRewriteVariableHandler, HostProtocolRewriteVariableHandler, RequestContextRewriteVariableHandler, RequestHeaderRewriteVariableHandler, RequestHostRewriteVariableHandler, ResponseBodyRewriteVariableHandler, ResponseHeaderRewriteVariableHandler, SessionRewriteVariableHandler, TargetNameRewriteVariableHandler, TargetPathRewriteVariableHandler, TargetPortRewriteVariableHandler, TargetProtocolRewriteVariableHandler, TargetQueryRewriteVariableHandler, UservarRewriteVariableHandler

public abstract class RewriteVariableHandler
extends java.lang.Object

An abstract class to predefine common strings and the functions used for resolving rewrite variables in both RewriteCondition and RewriteRule sets.

Title:

Description:

Copyright: Copyright (c) 2002

Company:

Version:
1.0
Author:
unascribed

Field Summary
protected  boolean _debug
           
protected  java.lang.String _lookupKey
           
protected static java.lang.String CONTENT_TYPE
           
protected static java.lang.String HOST_NAME
           
protected static java.lang.String HOST_PATH
           
protected static java.lang.String HOST_PORT
           
protected static java.lang.String HOST_PROTOCOL
           
protected static java.lang.String REQUEST_CONTEXT
           
protected static java.lang.String REQUEST_HEADER
           
protected static java.lang.String REQUEST_HOST
           
protected static java.lang.String RESPONSE_BODY
           
protected static java.lang.String RESPONSE_HEADER
           
protected static java.lang.String SESSION
           
protected static java.lang.String TARGET_FILE
           
protected static java.lang.String TARGET_NAME
           
protected static java.lang.String TARGET_PATH
           
protected static java.lang.String TARGET_PORT
           
protected static java.lang.String TARGET_PROTOCOL
           
protected static java.lang.String TARGET_QUERY
           
protected static java.lang.String TARGET_URL
           
protected static java.lang.String USERVAR
           
 
Constructor Summary
RewriteVariableHandler(boolean Debug)
          Default constructure required to set the debug variable for child use.
 
Method Summary
abstract  java.lang.String getValue(PortletStreamParameters Params)
          Returns the value of this variable from the passed Params.
abstract  java.lang.String getVariableName()
          Returns a reference to the static name of this variable.
abstract  boolean isPreFetch()
          A boolean telling if this variable is PreFetch, meaning that it must be set before the request is made.
 void setLookupKey(java.lang.String LookupKey)
          Sets the lookup key if this handler is a lookup handler
abstract  void setValue(PortletStreamParameters Params, java.lang.String Value)
          Sets the value of this variable to the passed Params.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_debug

protected boolean _debug

HOST_PROTOCOL

protected static java.lang.String HOST_PROTOCOL

HOST_NAME

protected static java.lang.String HOST_NAME

HOST_PORT

protected static java.lang.String HOST_PORT

HOST_PATH

protected static java.lang.String HOST_PATH

TARGET_PROTOCOL

protected static java.lang.String TARGET_PROTOCOL

TARGET_NAME

protected static java.lang.String TARGET_NAME

TARGET_PORT

protected static java.lang.String TARGET_PORT

TARGET_PATH

protected static java.lang.String TARGET_PATH

TARGET_FILE

protected static java.lang.String TARGET_FILE

TARGET_QUERY

protected static java.lang.String TARGET_QUERY

RESPONSE_BODY

protected static java.lang.String RESPONSE_BODY

CONTENT_TYPE

protected static java.lang.String CONTENT_TYPE

TARGET_URL

protected static java.lang.String TARGET_URL

SESSION

protected static java.lang.String SESSION

REQUEST_HEADER

protected static java.lang.String REQUEST_HEADER

RESPONSE_HEADER

protected static java.lang.String RESPONSE_HEADER

USERVAR

protected static java.lang.String USERVAR

REQUEST_CONTEXT

protected static java.lang.String REQUEST_CONTEXT

REQUEST_HOST

protected static java.lang.String REQUEST_HOST

_lookupKey

protected java.lang.String _lookupKey
Constructor Detail

RewriteVariableHandler

public RewriteVariableHandler(boolean Debug)
Default constructure required to set the debug variable for child use.

Parameters:
Debug - Turns on/off debugging for The write variables.
Method Detail

setLookupKey

public void setLookupKey(java.lang.String LookupKey)
Sets the lookup key if this handler is a lookup handler


getVariableName

public abstract java.lang.String getVariableName()
Returns a reference to the static name of this variable.


getValue

public abstract java.lang.String getValue(PortletStreamParameters Params)
                                   throws RewriteException
Returns the value of this variable from the passed Params.

Parameters:
Params - The PortletStreamParameters object from which to retrieve the value.
Returns:
A string representation of the value of this variable.
Throws:
RewriteException - if you screw up.

setValue

public abstract void setValue(PortletStreamParameters Params,
                              java.lang.String Value)
                       throws RewriteException
Sets the value of this variable to the passed Params.

Parameters:
Params - The PortletStreamParameters object to which to set the value
Value - the string representation of the value to be set.
Throws:
RewriteException - if you screw up.

isPreFetch

public abstract boolean isPreFetch()
A boolean telling if this variable is PreFetch, meaning that it must be set before the request is made. If false, then it cannot be set until after the request is made.



Copyright © 2000 Dummy Corp. All Rights Reserved.