atg.adc.pipeline
Class AssignmentProcessor

java.lang.Object
  extended by atg.nucleus.logging.VariableArgumentApplicationLoggingImpl
      extended by atg.nucleus.GenericService
          extended by atg.adc.pipeline.ADCPipelineProcessor
              extended by atg.adc.pipeline.AssignmentProcessor
All Implemented Interfaces:
NameContextBindingListener, NameContextElement, NameResolver, AdminableService, ApplicationLogging, atg.nucleus.logging.ApplicationLoggingSender, atg.nucleus.logging.TraceApplicationLogging, VariableArgumentApplicationLogging, ComponentNameResolver, Service, ServiceListener, PipelineProcessor, java.util.EventListener

public class AssignmentProcessor
extends ADCPipelineProcessor

This class appends a script assignment statement to the output.


Field Summary
static java.lang.String CLASS_VERSION
          Class version string
static java.lang.String DEFAULT_QUOTE
           
 
Fields inherited from class atg.adc.pipeline.ADCPipelineProcessor
MADE_CHANGE, NO_CHANGE
 
Fields inherited from class atg.nucleus.GenericService
SERVICE_INFO_KEY
 
Fields inherited from interface atg.service.pipeline.PipelineProcessor
STOP_CHAIN_EXECUTION, STOP_CHAIN_EXECUTION_AND_COMMIT, STOP_CHAIN_EXECUTION_AND_ROLLBACK
 
Fields inherited from interface atg.nucleus.logging.TraceApplicationLogging
DEFAULT_LOG_TRACE_STATUS
 
Fields inherited from interface atg.nucleus.logging.ApplicationLogging
DEFAULT_LOG_DEBUG_STATUS, DEFAULT_LOG_ERROR_STATUS, DEFAULT_LOG_INFO_STATUS, DEFAULT_LOG_WARNING_STATUS
 
Constructor Summary
AssignmentProcessor()
           
 
Method Summary
 java.lang.String getQuote()
           
 java.lang.String getStatementPrefix()
           
 java.lang.String getVariableName()
           
 java.lang.String getVariableValue()
           
protected  java.lang.String getVariableValue(ADCRequestData pRequestData)
          Get the value for the right side of the assignement statement.
 void setQuote(java.lang.String pQuote)
          The string to use for an open or close quote
 void setStatementPrefix(java.lang.String pStatementPrefix)
          An optional prefix for the assignment statement.
 void setVariableName(java.lang.String pVariableName)
          The name of the JavaScript variable to use as the assignment target
 void setVariableValue(java.lang.String pVariableValue)
          The value to be assigned to the JavaScript variable
 int updateADCData(ADCPipelineArgs pArgs)
          Add a single JavaScript assignment statement to the output buffer
 
Methods inherited from class atg.adc.pipeline.ADCPipelineProcessor
getRetCodes, isEnabled, runProcess, setEnabled
 
Methods inherited from class atg.nucleus.GenericService
addLogListener, createAdminServlet, doStartService, doStopService, getAbsoluteName, getAdminServlet, getLoggingForVlogging, getLogListenerCount, getLogListeners, getName, getNameContext, getNucleus, getRoot, getServiceConfiguration, getServiceInfo, isLoggingDebug, isLoggingError, isLoggingInfo, isLoggingTrace, isLoggingWarning, isRunning, logDebug, logDebug, logDebug, logError, logError, logError, logInfo, logInfo, logInfo, logTrace, logTrace, logTrace, logWarning, logWarning, logWarning, nameContextElementBound, nameContextElementUnbound, removeLogListener, reResolveThis, resolveName, resolveName, resolveName, resolveName, sendLogEvent, setLoggingDebug, setLoggingError, setLoggingInfo, setLoggingTrace, setLoggingWarning, setNucleus, setServiceInfo, startService, stopService
 
Methods inherited from class atg.nucleus.logging.VariableArgumentApplicationLoggingImpl
vlogDebug, vlogDebug, vlogDebug, vlogDebug, vlogError, vlogError, vlogError, vlogError, vlogInfo, vlogInfo, vlogInfo, vlogInfo, vlogTrace, vlogTrace, vlogTrace, vlogTrace, vlogWarning, vlogWarning, vlogWarning, vlogWarning
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CLASS_VERSION

public static final java.lang.String CLASS_VERSION
Class version string

See Also:
Constant Field Values

DEFAULT_QUOTE

public static final java.lang.String DEFAULT_QUOTE
See Also:
Constant Field Values
Constructor Detail

AssignmentProcessor

public AssignmentProcessor()
Method Detail

setQuote

public void setQuote(java.lang.String pQuote)
The string to use for an open or close quote

Parameters:
pQuote - the quote string

getQuote

public java.lang.String getQuote()
Returns:
The string to use for an open or close quote

setStatementPrefix

public void setStatementPrefix(java.lang.String pStatementPrefix)
An optional prefix for the assignment statement. Specify "var" to turn the assigment into a variable declaration.

Parameters:
pStatementPrefix - the initial part of the statement

getStatementPrefix

public java.lang.String getStatementPrefix()
Returns:
The prefix for the assignment statement

setVariableName

public void setVariableName(java.lang.String pVariableName)
The name of the JavaScript variable to use as the assignment target

Parameters:
pVariableName - the JavaScript variable name

getVariableName

public java.lang.String getVariableName()
Returns:
The name of the JavaScript variable to use as the assignment target

setVariableValue

public void setVariableValue(java.lang.String pVariableValue)
The value to be assigned to the JavaScript variable

Parameters:
pVariableValue - the JavaScript variable value

getVariableValue

public java.lang.String getVariableValue()
Returns:
The value to be assigned to the JavaScript variable

updateADCData

public int updateADCData(ADCPipelineArgs pArgs)
Add a single JavaScript assignment statement to the output buffer

Specified by:
updateADCData in class ADCPipelineProcessor
Parameters:
pArgs - The pipeline arguments
Returns:
MADE_CHANGE or NO_CHANGE

getVariableValue

protected java.lang.String getVariableValue(ADCRequestData pRequestData)
Get the value for the right side of the assignement statement. This base implementation returns the configured property. Subclasses can use the request data to retrieve request-specific values.

Parameters:
pRequestData - The request data that can be used to locate values
Returns:
The valaue to be assigned to the JavaScript variable