public class SearchUpdateAdapter
extends atg.search.adapter.customization.CustomizationDataAdapterImpl
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
CLASS_VERSION |
SERVICE_INFO_KEY
DEFAULT_LOG_TRACE_STATUS
DEFAULT_LOG_DEBUG_STATUS, DEFAULT_LOG_ERROR_STATUS, DEFAULT_LOG_INFO_STATUS, DEFAULT_LOG_WARNING_STATUS
Constructor and Description |
---|
SearchUpdateAdapter()
Constructs an instanceof RefineConfigAdapter
|
Modifier and Type | Method and Description |
---|---|
protected RepositoryIterator |
createRepositoryIterator(boolean pAutoFetchNextBatch,
int pStartIndex,
boolean pPreloadBatch,
atg.repository.ContextFilteringRules pRules)
Utility method to create a RepositoryIterator
|
java.util.List |
enumerateAutoApplyCustomizationItemsByTypeAndProject(atg.search.adapter.customization.CustomizationType pCustomizationType,
java.lang.String pProjectId)
Returns the ids for the customization items defined by this adapter.
|
java.util.List |
enumerateCustomizationItems()
Returns the ids for the customization items defined by this adapter.
|
java.util.List |
enumerateCustomizationItemsByType(atg.search.adapter.customization.CustomizationType pCustomizationType)
Returns the ids for the customization items defined by this adapter.
|
protected java.util.List<java.lang.String> |
enumerateItems(RepositoryIterator pRepositoryIterator) |
protected void |
generateXMLForProperties(java.lang.String pId,
java.util.List pOutputProperties,
java.io.OutputStream pOut) |
RepositoryItemDescriptor |
getBatchItemDescriptor() |
java.lang.String |
getBatchItemDescriptorName() |
int |
getBatchSize() |
java.lang.String |
getBatchXMLAsString(RepositoryIterator pRepositoryIterator)
Method to enumerate through the items and create the XML as a single string.
|
java.lang.String |
getBatchXMLAsString(java.lang.String pId)
Method to enumerate through the items and create the XML as a single string.
|
SearchUpdateCollector[] |
getCollectors() |
protected atg.repository.ContextFilteringRules |
getContextFilteringRules(atg.search.index.IndexInfo pIndexInfo)
Retrieve siteIds from pIndexInfo.siteIndexInfo and use same to
create ContextFilteringRules
|
protected atg.repository.ContextFilteringRules |
getContextFilteringRulesForSites(java.util.Collection<java.lang.String> pSites)
Creates a ContextFilteringRules from an array of site ids.
|
atg.search.adapter.customization.CustomizationItem |
getCustomizationItem(atg.search.adapter.customization.CustomizationType pCustomizationType,
java.lang.String pCustomizationItemId)
Returns a customization item for the requested id
|
java.lang.String |
getDisplayName()
Returns the display name for this customization adapter.
|
java.lang.String |
getIndexedIdPropertyName() |
RepositoryItemDescriptor |
getIndexedItemDescriptor() |
java.lang.String |
getIndexedItemDescriptorName() |
RepositoryItemGroup |
getIndexedItemsGroup() |
Repository |
getIndexedRepository() |
atg.repository.search.indexing.config.SearchUpdateHelper |
getSearchUpdateHelper() |
java.util.Collection |
getSupportedCustomizationTypes()
Returns a collection of the customization types supported by this adapter.
|
javax.transaction.TransactionManager |
getTransactionManager() |
SearchUpdateXMLGenerator |
getXMLGenerator() |
protected boolean |
isAdapterFullyConfigured()
Checks that necessary properties and components
required for the adapter to operate are all properly
configured.
|
boolean |
isAutoApplyAll()
Whether to auto-apply all customization items.
|
protected void |
populateListForItem(java.lang.String pId,
java.util.List pOutputProperties) |
void |
processBatches(atg.repository.search.indexing.config.SearchUpdateXMLHandler pSearchUpdateXMLHandler,
atg.search.index.IndexInfo pIndexInfo)
Main "driver" method that uses a RepositoryIterator to identify
then iterate over batches of items.
|
void |
setBatchItemDescriptorName(java.lang.String pBatchItemDescriptorName) |
void |
setBatchSize(int pBatchSize) |
void |
setCollectors(SearchUpdateCollector[] pCollectors) |
void |
setDisplayName(java.lang.String pDisplayName) |
void |
setIndexedIdPropertyName(java.lang.String pIndexedIdPropertyName) |
void |
setIndexedItemDescriptorName(java.lang.String pIndexedItemDescriptorName) |
void |
setIndexedItemsGroup(RepositoryItemGroup pIndexedItemsGroup) |
void |
setIndexedRepository(Repository pIndexedRepository) |
void |
setSearchUpdateHelper(atg.repository.search.indexing.config.SearchUpdateHelper pSearchUpdateHelper) |
void |
setTransactionManager(javax.transaction.TransactionManager pTransactionManager) |
void |
setXMLGenerator(SearchUpdateXMLGenerator pXMLGenerator) |
getDisplayNameResource, getLocalizedDisplayName, getResourceBundleName, setDisplayNameResource, setResourceBundleName
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
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getName, getNameContext
nameContextElementBound, nameContextElementUnbound
public static final java.lang.String CLASS_VERSION
public SearchUpdateAdapter()
public void setTransactionManager(javax.transaction.TransactionManager pTransactionManager)
public javax.transaction.TransactionManager getTransactionManager()
public Repository getIndexedRepository()
public void setIndexedRepository(Repository pIndexedRepository)
public SearchUpdateXMLGenerator getXMLGenerator()
public void setXMLGenerator(SearchUpdateXMLGenerator pXMLGenerator)
public void setBatchSize(int pBatchSize)
public int getBatchSize()
public void setIndexedItemDescriptorName(java.lang.String pIndexedItemDescriptorName)
public java.lang.String getIndexedItemDescriptorName()
public RepositoryItemDescriptor getIndexedItemDescriptor()
public void setBatchItemDescriptorName(java.lang.String pBatchItemDescriptorName)
public java.lang.String getBatchItemDescriptorName()
public RepositoryItemDescriptor getBatchItemDescriptor()
public void setIndexedIdPropertyName(java.lang.String pIndexedIdPropertyName)
public java.lang.String getIndexedIdPropertyName()
public void setCollectors(SearchUpdateCollector[] pCollectors)
public SearchUpdateCollector[] getCollectors()
public void setDisplayName(java.lang.String pDisplayName)
public void setIndexedItemsGroup(RepositoryItemGroup pIndexedItemsGroup)
public RepositoryItemGroup getIndexedItemsGroup()
public void setSearchUpdateHelper(atg.repository.search.indexing.config.SearchUpdateHelper pSearchUpdateHelper)
public atg.repository.search.indexing.config.SearchUpdateHelper getSearchUpdateHelper()
public boolean isAutoApplyAll()
isAutoApplyAll
in interface atg.search.adapter.customization.CustomizationDataAdapter
isAutoApplyAll
in class atg.search.adapter.customization.CustomizationDataAdapterImpl
public java.util.List enumerateCustomizationItemsByType(atg.search.adapter.customization.CustomizationType pCustomizationType)
#getCustomizationItem()
to retrieve the actual customization item.enumerateCustomizationItemsByType
in interface atg.search.adapter.customization.CustomizationDataAdapter
enumerateCustomizationItemsByType
in class atg.search.adapter.customization.CustomizationDataAdapterImpl
public java.util.List enumerateCustomizationItems()
#getCustomizationItem()
to retrieve the actual customization item.
For search updates we will deploy all commands as one single item, so only 1 id will be returned.enumerateCustomizationItems
in interface atg.search.adapter.customization.CustomizationDataAdapter
enumerateCustomizationItems
in class atg.search.adapter.customization.CustomizationDataAdapterImpl
public java.util.List enumerateAutoApplyCustomizationItemsByTypeAndProject(atg.search.adapter.customization.CustomizationType pCustomizationType, java.lang.String pProjectId) throws atg.search.adapter.exception.CustomizationItemNotFoundException
#getCustomizationItem()
to retrieve the actual customization item.enumerateAutoApplyCustomizationItemsByTypeAndProject
in interface atg.search.adapter.customization.CustomizationDataAdapter
enumerateAutoApplyCustomizationItemsByTypeAndProject
in class atg.search.adapter.customization.CustomizationDataAdapterImpl
atg.search.adapter.exception.CustomizationItemNotFoundException
public atg.search.adapter.customization.CustomizationItem getCustomizationItem(atg.search.adapter.customization.CustomizationType pCustomizationType, java.lang.String pCustomizationItemId) throws atg.search.adapter.exception.CustomizationItemNotFoundException
getCustomizationItem
in interface atg.search.adapter.customization.CustomizationDataAdapter
getCustomizationItem
in class atg.search.adapter.customization.CustomizationDataAdapterImpl
pCustomizationItemId
- The unique identifier for a CustomizationItematg.commerce.search.config.SearchUpdateCustomizationItem
atg.search.adapter.exception.CustomizationItemNotFoundException
public java.util.Collection getSupportedCustomizationTypes()
getSupportedCustomizationTypes
in interface atg.search.adapter.customization.CustomizationDataAdapter
getSupportedCustomizationTypes
in class atg.search.adapter.customization.CustomizationDataAdapterImpl
atg.searchadmin.adapter.customization.CustomizationType
public java.lang.String getDisplayName()
getDisplayName
in interface atg.search.adapter.customization.CustomizationDataAdapter
getDisplayName
in class atg.search.adapter.customization.CustomizationDataAdapterImpl
public java.lang.String getBatchXMLAsString(java.lang.String pId) throws SearchUpdateException
pId
- String int start index of the batch of indexed items to processSearchUpdateException
public java.lang.String getBatchXMLAsString(RepositoryIterator pRepositoryIterator) throws SearchUpdateException
pRepositoryIterator
- RepositoryIterator which will
iterate over pre-configured batchSearchUpdateException
protected java.util.List<java.lang.String> enumerateItems(RepositoryIterator pRepositoryIterator) throws SearchUpdateException
SearchUpdateException
protected void populateListForItem(java.lang.String pId, java.util.List pOutputProperties)
protected void generateXMLForProperties(java.lang.String pId, java.util.List pOutputProperties, java.io.OutputStream pOut) throws SearchUpdateException
SearchUpdateException
protected atg.repository.ContextFilteringRules getContextFilteringRules(atg.search.index.IndexInfo pIndexInfo)
pIndexInfo
- IndexInfo which may carry siteIds in its siteIndexInfoprotected atg.repository.ContextFilteringRules getContextFilteringRulesForSites(java.util.Collection<java.lang.String> pSites)
pSites
- The array of site idspublic void processBatches(atg.repository.search.indexing.config.SearchUpdateXMLHandler pSearchUpdateXMLHandler, atg.search.index.IndexInfo pIndexInfo) throws java.lang.Exception
pSearchUpdateXMLHandler
- SearchUpdateXMLHandler which handles the
submission of XML to the Search EnginepIndexInfo
- IndexInfo objects which may contain siteIdsjava.lang.Exception
protected boolean isAdapterFullyConfigured()
protected RepositoryIterator createRepositoryIterator(boolean pAutoFetchNextBatch, int pStartIndex, boolean pPreloadBatch, atg.repository.ContextFilteringRules pRules) throws atg.search.adapter.exception.CustomizationItemNotFoundException
pAutoFetchNextBatch
- pRules
- pPreloadBatch
- atg.search.adapter.exception.CustomizationItemNotFoundException