public class CustomCatalogVariantProducer extends GenericService implements VariantProducer, atg.repository.search.indexing.producer.UpdateFromRequestVariantProducer, IndexConstants
VariantProducer
that produces a variant for each
ancestor catalog of the indexing document item type.atg.repository.search.index.producer.VariantProducer
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
CLASS_VERSION |
protected CatalogProperties |
mCatalogProperties |
protected boolean |
mEnableCatalogVariants |
SERVICE_INFO_KEY
CATALOG_ATTR, CATALOGS_ITER_ATTR
DEFAULT_LOG_TRACE_STATUS
DEFAULT_LOG_DEBUG_STATUS, DEFAULT_LOG_ERROR_STATUS, DEFAULT_LOG_INFO_STATUS, DEFAULT_LOG_WARNING_STATUS
Constructor and Description |
---|
CustomCatalogVariantProducer() |
Modifier and Type | Method and Description |
---|---|
protected java.util.Collection |
getAncestorCatalogs(Context pContext,
RepositoryItem pItem,
java.util.Map<java.lang.String,java.lang.String> pUniqueParams)
Gets the ancestor catalogs for the given item type.
|
protected java.util.Collection |
getAncestorCatalogsForCategory(Context pContext,
RepositoryItem pCategory,
RepositoryItemDescriptor pBaseItemDescriptor,
java.util.Map<java.lang.String,java.lang.String> pUniqueParams)
Gets the ancestor catalogs for the given category.
|
protected java.util.Collection |
getAncestorCatalogsForProduct(Context pContext,
RepositoryItem pProduct,
RepositoryItemDescriptor pBaseItemDescriptor,
java.util.Map<java.lang.String,java.lang.String> pUniqueParams)
Gets the ancestor catalogs for the given category.
|
protected java.util.Collection |
getAncestorCatalogsForSku(Context pContext,
RepositoryItem pSku,
RepositoryItemDescriptor pBaseItemDescriptor,
java.util.Map<java.lang.String,java.lang.String> pUniqueParams)
Gets the ancestor catalogs for the given category.
|
java.lang.String |
getCatalogProfilePropertyName()
Returns property catalogProfilePropertyName.
|
CatalogProperties |
getCatalogProperties()
Gets the CatalogProperties object that holds meta-data about the names
of item-descriptors and property-descriptors used in custom catalogs.
|
boolean |
isEnableCatalogVariants()
Gets the enableCatalogVariants property.
|
boolean |
prepareNextVariant(Context pContext,
java.lang.String pPropertyName,
RepositoryItem pItem,
int pIndex,
java.util.Map pUniqueParams)
Get the next variant.
|
void |
restoreRequestState(DynamoHttpServletRequest pRequest,
java.lang.Object pRestoreObject) |
void |
setCatalogProfilePropertyName(java.lang.String pCatalogProfilePropertyName)
Sets property catalogProfilePropertyName.
|
void |
setCatalogProperties(CatalogProperties pCatalogProperties)
Sets the CatalogProperties object that holds meta-data about the names
of item-descriptors and property-descriptors used in custom catalogs.
|
void |
setEnableCatalogVariants(boolean pEnableCatalogVariants)
Sets the enableCatalogVariants property.
|
void |
updateContextToReflectRequest(Context pContext,
DynamoHttpServletRequest pRequest,
java.util.Map<java.lang.String,java.lang.String> pUniqueParams) |
java.lang.Object |
updateRequestStateFromParameterMap(DynamoHttpServletRequest pRequest,
IndexingOutputConfig pIndexingOutputConfig,
java.util.Map<java.lang.String,java.lang.String> pUniqueParams) |
addLogListener, createAdminServlet, doStartService, doStopService, getAbsoluteName, getAdminServlet, getAdminServletOutputStreamEncoding, getLoggingForVlogging, getLogListenerCount, getLogListeners, getName, getNameContext, getNucleus, getRoot, getServiceConfiguration, getServiceInfo, isAdminServletUseServletOutputStream, 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, setAdminServletOutputStreamEncoding, setAdminServletUseServletOutputStream, setLoggingDebug, setLoggingError, setLoggingInfo, setLoggingTrace, setLoggingWarning, setNucleus, setServiceInfo, startService, stopService
vlogDebug, vlogDebug, vlogDebug, vlogDebug, vlogDebugTrace, vlogError, vlogError, vlogError, vlogError, vlogInfo, vlogInfo, vlogInfo, vlogInfo, vlogTrace, vlogTrace, vlogTrace, vlogTrace, vlogWarning, vlogWarning, vlogWarning, vlogWarning
public static java.lang.String CLASS_VERSION
protected boolean mEnableCatalogVariants
protected CatalogProperties mCatalogProperties
public void setCatalogProfilePropertyName(java.lang.String pCatalogProfilePropertyName)
public java.lang.String getCatalogProfilePropertyName()
public boolean isEnableCatalogVariants()
This property accessor is used to index multiple versions of products when they contain catalog specific values in their info objects. If your custom catalog definition does not include any catalog specific properties, then catalog variant generation should be disabled. If you add any catalog specific properties that you would like to index, then you should set enableCatalogVariants to 'true' so that a product document is generated for each of the catalogs it is contained in.
public void setEnableCatalogVariants(boolean pEnableCatalogVariants)
public CatalogProperties getCatalogProperties()
public void setCatalogProperties(CatalogProperties pCatalogProperties)
public boolean prepareNextVariant(Context pContext, java.lang.String pPropertyName, RepositoryItem pItem, int pIndex, java.util.Map pUniqueParams)
prepareNextVariant
in interface VariantProducer
pContext
- the current context.pPropertyName
- the name of the property in questionpItem
- the original context item.pIndex
- the index of the variantpUniqueParams
- the parameters that will be added
to the items URI. Keys and values should all be strings.protected java.util.Collection getAncestorCatalogs(Context pContext, RepositoryItem pItem, java.util.Map<java.lang.String,java.lang.String> pUniqueParams)
protected java.util.Collection getAncestorCatalogsForCategory(Context pContext, RepositoryItem pCategory, RepositoryItemDescriptor pBaseItemDescriptor, java.util.Map<java.lang.String,java.lang.String> pUniqueParams)
protected java.util.Collection getAncestorCatalogsForProduct(Context pContext, RepositoryItem pProduct, RepositoryItemDescriptor pBaseItemDescriptor, java.util.Map<java.lang.String,java.lang.String> pUniqueParams)
protected java.util.Collection getAncestorCatalogsForSku(Context pContext, RepositoryItem pSku, RepositoryItemDescriptor pBaseItemDescriptor, java.util.Map<java.lang.String,java.lang.String> pUniqueParams)
public void updateContextToReflectRequest(Context pContext, DynamoHttpServletRequest pRequest, java.util.Map<java.lang.String,java.lang.String> pUniqueParams)
updateContextToReflectRequest
in interface atg.repository.search.indexing.producer.UpdateFromRequestVariantProducer
public java.lang.Object updateRequestStateFromParameterMap(DynamoHttpServletRequest pRequest, IndexingOutputConfig pIndexingOutputConfig, java.util.Map<java.lang.String,java.lang.String> pUniqueParams)
updateRequestStateFromParameterMap
in interface atg.repository.search.indexing.producer.UpdateFromRequestVariantProducer
public void restoreRequestState(DynamoHttpServletRequest pRequest, java.lang.Object pRestoreObject)
restoreRequestState
in interface atg.repository.search.indexing.producer.UpdateFromRequestVariantProducer