You can set restrictions on Orders by adding a ProcPropertyRestriction processor to any pipeline, for example, the validateForCheckout pipeline.

To do so, create an instance of atg.commerce.expression.ProcPropertyRestriction, defining the rule by which Orders are to be evaluated in ProcPropertyRestriction.ruleExpression and setting the remaining properties as necessary. (See the table in the previous section for more information on the properties of ProcPropertyRestriction.) Then add the processor at any point in any pipeline.

For example, you might check Orders against certain restrictions before checkout by adding a link to the validateForCheckout pipeline in <ATG2007.3dir>/DCS/src/config/atg/commerce/commercepipeline.xml. To insert a new link, add a new element to the XML file that references atg.commerce.expression.ProcPropertyRestrictions, as follows:

<pipelinechain name="validateForCheckout" transaction="TX_REQUIRED"
   headlink="validateOrderForCheckout"
   classname="atg.service.pipeline.PipelineChain"
   resultclassname="atg.service.pipeline.PipelineResultImpl">
   <pipelinelink name="propertyRestrictions" transaction="TX_MANDATORY">
      <processor
          jndi="/atg/commerce/expression/ProcPropertyRestrictions"/>

. . .

</pipelinechain>

For more information on pipelines and how to extend them, see the Processor Chains and the Pipeline Manager chapter.

 
loading table of contents...