|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object atg.nucleus.logging.VariableArgumentApplicationLoggingImpl atg.nucleus.GenericService atg.commerce.expression.ProcPropertyRestriction
public class ProcPropertyRestriction
This processor returns the value in the returnValueForTrueEvaluation or returnValueForFalseEvaluation based on whether or not a restriction on the user's rule passed or failed. If the evaluation results in true, then the error message in the errorMessage property will be added to the pipelineResult object keyed by the string in the pipelineResultErrorMessageKey property. If the expressionParser property is null then this processor will create a new instance of the atg.commerce.expression.ExpressionParser class for its own use. If the ruleEvaluator property is null then this processor will create a new instance of the atg.commerce.expression.RuleEvaluator class for its own use.
Field Summary | |
---|---|
static java.lang.String |
CLASS_VERSION
Class version string |
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 | |
---|---|
ProcPropertyRestriction()
|
Method Summary | |
---|---|
protected void |
addErrorMessageToPipelineResult(PipelineResult pResult,
java.lang.String pErrorMessage)
This method adds the given error message to the given PipelineResult object. |
void |
doStartService()
This is called after a Service has been created, placed into the naming hierarchy, and initialized with its configured property values. |
boolean |
getAddErrorToResultOnTrueEval()
Returns property AddErrorToResultOnTrueEval |
java.lang.String |
getErrorMessage()
Returns property errorMessage |
ExpressionParser |
getExpressionParser()
Returns property ExpressionParser |
java.lang.String |
getPipelineResultErrorMessageKey()
Returns property pipelineResultErrorMessageKey |
int[] |
getRetCodes()
Returns the valid return codes 1 - The processor completed successfully 2 - The processor failed |
int |
getReturnValueForFalseEvaluation()
Returns property returnValueForFalseEvaluation |
int |
getReturnValueForTrueEvaluation()
Returns property returnValueForTrueEvaluation |
Rule |
getRule()
Returns property rule |
RuleEvaluator |
getRuleEvaluator()
Returns property RuleEvaluator |
java.lang.String |
getRuleExpression()
Returns property ruleExpression |
static void |
main(java.lang.String[] args)
|
int |
runProcess(java.lang.Object pParam,
PipelineResult pResult)
Evaluates the ruleExpression and if true, will add the string in the errorMessage property to the PipelineResult object keyed by the string in the pipelineResultErrorMessageKey property. |
void |
setAddErrorToResultOnTrueEval(boolean pAddErrorToResultOnTrueEval)
Sets property AddErrorToResultOnTrueEval |
void |
setErrorMessage(java.lang.String pErrorMessage)
Sets property errorMessage |
void |
setExpressionParser(ExpressionParser pExpressionParser)
Sets property ExpressionParser |
void |
setPipelineResultErrorMessageKey(java.lang.String pPipelineResultErrorMessageKey)
Sets property pipelineResultErrorMessageKey |
void |
setReturnValueForFalseEvaluation(int pReturnValueForFalseEvaluation)
Sets property returnValueForFalseEvaluation |
void |
setReturnValueForTrueEvaluation(int pReturnValueForTrueEvaluation)
Sets property returnValueForTrueEvaluation |
void |
setRule(Rule pRule)
Sets property rule |
void |
setRuleEvaluator(RuleEvaluator pRuleEvaluator)
Sets property RuleEvaluator |
void |
setRuleExpression(java.lang.String pRuleExpression)
Sets property ruleExpression |
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 |
---|
public static java.lang.String CLASS_VERSION
Constructor Detail |
---|
public ProcPropertyRestriction()
Method Detail |
---|
public int[] getRetCodes()
getRetCodes
in interface PipelineProcessor
public ExpressionParser getExpressionParser()
public void setExpressionParser(ExpressionParser pExpressionParser)
pExpressionParser
- the value to set for property ExpressionParserpublic RuleEvaluator getRuleEvaluator()
public void setRuleEvaluator(RuleEvaluator pRuleEvaluator)
pRuleEvaluator
- the value to set for property RuleEvaluatorpublic Rule getRule()
public void setRule(Rule pRule)
pRule
- the value to set for property rulepublic java.lang.String getRuleExpression()
public void setRuleExpression(java.lang.String pRuleExpression)
pRuleExpression
- the value to set for property ruleExpressionpublic boolean getAddErrorToResultOnTrueEval()
public void setAddErrorToResultOnTrueEval(boolean pAddErrorToResultOnTrueEval)
pAddErrorToResultOnTrueEval
- the value to set for property AddErrorToResultOnTrueEvalpublic java.lang.String getPipelineResultErrorMessageKey()
public void setPipelineResultErrorMessageKey(java.lang.String pPipelineResultErrorMessageKey)
pPipelineResultErrorMessageKey
- the value to set for property pipelineResultErrorMessageKeypublic java.lang.String getErrorMessage()
public void setErrorMessage(java.lang.String pErrorMessage)
pErrorMessage
- the value to set for property errorMessagepublic int getReturnValueForTrueEvaluation()
public void setReturnValueForTrueEvaluation(int pReturnValueForTrueEvaluation)
pReturnValueForTrueEvaluation
- the value to set for property returnValueForTrueEvaluationpublic int getReturnValueForFalseEvaluation()
public void setReturnValueForFalseEvaluation(int pReturnValueForFalseEvaluation)
pReturnValueForFalseEvaluation
- the value to set for property returnValueForFalseEvaluationpublic void doStartService() throws ServiceException
doStartService
in class GenericService
ServiceException
- if the Service had a problem starting uppublic int runProcess(java.lang.Object pParam, PipelineResult pResult) throws java.lang.Exception
runProcess
in interface PipelineProcessor
pParam
- a HashMap which must contain the objects to satisfy the rulespResult
- a PipelineResult object which stores any information which must
be returned from this method invokation
java.lang.Exception
- throws any exception back to the callerPipelineProcessor.runProcess(Object, PipelineResult)
protected void addErrorMessageToPipelineResult(PipelineResult pResult, java.lang.String pErrorMessage)
pResult
- the PipelineResult object to store the error message inpErrorMessage
- the error message to storePipelineResult
public static void main(java.lang.String[] args)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |