atg.commerce.search
Class CustomCatalogXMLBuilder

java.lang.Object
  extended by atg.search.query.formhandlers.MapXMLBuilder
      extended by atg.commerce.search.CustomCatalogXMLBuilder
All Implemented Interfaces:
XMLBuilder

public class CustomCatalogXMLBuilder
extends MapXMLBuilder

This class extends the default MapXMLBuilder to automatically add a query constraint that will force results to contain only results that are contained in the user's current custom catalog. By default the user's current custom catalog is defined by the atg.commerce.catalog.CustomCatalogTools#getCurrentCatalog() method of atg.commerce.catalog.CustomCatalogTools.

See Also:
atg.commerce.catalog.CustomCatalogTools#getCurrentCatalog()

Field Summary
static java.lang.String CLASS_VERSION
          Class version string
protected  java.lang.String mCatalogMetaPropertyName
           
protected  java.lang.String mConstraintOperator
           
protected  java.lang.String mConstraintType
           
protected  CustomCatalogTools mCustomCatalogTools
           
 
Constructor Summary
CustomCatalogXMLBuilder()
           
 
Method Summary
 java.lang.String buildXML(BaseSearchFormHandler pFormHandler, ClientRequest pClientRequest, java.lang.String pTagName)
          Build the constraints XML and return it as a string.
 java.lang.String getCatalogMetaPropertyName()
           
 java.lang.String getConstraintOperator()
           
 java.lang.String getConstraintType()
           
 CustomCatalogTools getCustomCatalogTools()
           
 void setCatalogMetaPropertyName(java.lang.String pCatalogMetaPropertyName)
           
 void setConstraintOperator(java.lang.String pConstraintOperator)
           
 void setConstraintType(java.lang.String pConstraintType)
           
 void setCustomCatalogTools(CustomCatalogTools pCustomCatalogTools)
           
 
Methods inherited from class atg.search.query.formhandlers.MapXMLBuilder
buildXML, dumpHashMapMap, getDefaultValue, getFormHandler, getTagName, getTags, getWrappedXML, getWrappingXML, setDefaultValue, setWrappingXML
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CLASS_VERSION

public static java.lang.String CLASS_VERSION
Class version string


mCatalogMetaPropertyName

protected java.lang.String mCatalogMetaPropertyName

mConstraintOperator

protected java.lang.String mConstraintOperator

mConstraintType

protected java.lang.String mConstraintType

mCustomCatalogTools

protected CustomCatalogTools mCustomCatalogTools
Constructor Detail

CustomCatalogXMLBuilder

public CustomCatalogXMLBuilder()
Method Detail

getCatalogMetaPropertyName

public java.lang.String getCatalogMetaPropertyName()

setCatalogMetaPropertyName

public void setCatalogMetaPropertyName(java.lang.String pCatalogMetaPropertyName)

getConstraintOperator

public java.lang.String getConstraintOperator()

setConstraintOperator

public void setConstraintOperator(java.lang.String pConstraintOperator)

getConstraintType

public java.lang.String getConstraintType()

setConstraintType

public void setConstraintType(java.lang.String pConstraintType)

getCustomCatalogTools

public CustomCatalogTools getCustomCatalogTools()

setCustomCatalogTools

public void setCustomCatalogTools(CustomCatalogTools pCustomCatalogTools)

buildXML

public java.lang.String buildXML(BaseSearchFormHandler pFormHandler,
                                 ClientRequest pClientRequest,
                                 java.lang.String pTagName)
Build the constraints XML and return it as a string. This implementation ANDs a constraint that ensures all search results are contained in the user's current custom catalog.

Specified by:
buildXML in interface XMLBuilder
Overrides:
buildXML in class MapXMLBuilder
Parameters:
pFormHandler - the invoking form handler
pClientRequest - the client request
pTagName - the name of the tag into which to put the constriants.
Returns:
the constraints String or null