atg.repository.search.indexing
Class LoaderImpl

java.lang.Object
  extended by atg.nucleus.logging.VariableArgumentApplicationLoggingImpl
      extended by atg.nucleus.GenericService
          extended by atg.repository.search.indexing.LoaderImpl
All Implemented Interfaces:
NameContextBindingListener, NameContextElement, NameResolver, AdminableService, ApplicationLogging, atg.nucleus.logging.ApplicationLoggingSender, atg.nucleus.logging.TraceApplicationLogging, VariableArgumentApplicationLogging, ComponentNameResolver, Service, ServiceListener, java.util.EventListener
Direct Known Subclasses:
BulkLoaderImpl

public class LoaderImpl
extends GenericService

The base class for the bulk loader and the incremental loader. This class implements recursing through the items (calling the various customizer classes when appropriate), gathering property values, generating documents, and sending them to the indexer for indexing.

The loader works primarily from an IndexingOutputConfig, which specifies the repository, the repository items of interest, their properties, and any customizing classes to use.

The basic algorythm for generating the documents is a recursive breadth-first traversal of the hierarchy of repository items defined in the XML definition file. As the loader traverses down the hierarchy it pushes parent repository items onto the Context object. In each case, it uses PropertyAccessor.getMetaPropertyValue(atg.repository.search.indexing.Context, atg.repository.RepositoryItem, java.lang.String, atg.repository.search.indexing.specifier.PropertyTypeEnum) to retrieve the child item property.

For a bulk/full load (see BulkLoaderImpl), the loader performs a query for top-level repository items, then iterates through any sub-items specified, until it reaches a document-level item.

For an incremental load (see IncrementalLoaderImpl), the loader starts from an item, looks from parents, building Context stack as it traverses up the hierarchy. Once it has a complete set of parents, it pops off any sub-document level items, then then generates a document for the document-level item.

In either case (bulk or incremental), once a document-level repository item is encountered, the loader begins collecting property values. It first collects any property values specified for parents (or other not document branches of the item hierarchy), and then continues the breadth-first traversal, collecting property values as it goes.

The loader then begins generating the XML document, once all the property values are collected. It uses any specified PropertyFormatters and PropertyValuesFilters to convert the collected property values into string values.

Once the document has been created, the Loader then uses the DocumentSubmitter to send the output to the indexer for indexing. Typically the submitter will be an instance of the atg.repository.search.indexing.submitter.BpiDocumentSubmitter, but other submitters may be used for debugging.

The order of customizer class invocation is:

Created: March 30 2005


Field Summary
static java.lang.String CLASS_VERSION
          Class version string
protected static java.lang.String DELETE_DOCUMENT
          For performance monitor
protected static java.lang.String GET_GENERATOR_PROPERTY
          For performance monitor
protected static java.lang.String GET_META_PROPERTY
          For performance monitor
protected static java.lang.String GET_SUB_PROPERTY_VALUE
          For performance monitor
protected static java.lang.String GET_TEXT_PROPERTY
          For performance monitor
protected static java.lang.String MY_RESOURCE_NAME
          Resource name used for messages.
protected static java.lang.String PROCESS_PROPERTIES
          For performance monitor
protected static java.lang.String REGENERATE_FOR_CHANGE
          For performance monitor
protected static java.util.ResourceBundle sResourceBundle
           
protected static java.lang.String START_QUERY
          For performance monitor
 
Fields inherited from class atg.nucleus.GenericService
SERVICE_INFO_KEY
 
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
LoaderImpl()
           
 
Method Summary
 void addActiveContext(Context pContext)
          Add a Context to the list of active contexts.
protected  java.lang.String addUniqueParamsToURL(java.lang.String pBaseURL, java.util.Map pMapUniqueParams)
          Add any unique params to the URL.
 void adjustIncrementalQueue(IndexingOutputConfig pIndexingOutputConfig, atg.search.index.IndexInfo pIndexInfo)
          Pass-through method to adjust incremental queues.
protected  void afterSessionStart(Context pContext)
          This method is invoked immediately after a DocumentSubmitter session is started.
protected  void beforeSessionEnd(Context pContext)
          This method is invoked immediately before a DocumentSubmitter session is closed.
 boolean cancelActiveContext(java.lang.String pConfigurationPath)
          Cancel the active context with the specified name.
protected  int claimGeneration(java.lang.String pConfigPath, java.lang.String pContentId, boolean pIncremental, boolean pUseConfigurationClaims, IndexingOutputConfig pIOC)
          Claim a generation for updating.
protected  javax.servlet.Servlet createAdminServlet()
          Create the admininistration servlet.
protected  Context createContext()
          Create a new context.
protected  atg.repository.search.indexing.OutputDocumentContent createEmptyOutputDocumentContent()
          Create a new, empty, OutputDocumentContent object.
protected  void deleteDocumentItem(RepositoryItem pItem, Context pContext)
          Remove the specified repository item pItem from the index.
 void doStopService()
          When doStopService is called, exit out of our update activity thread, if any.
 atg.repository.search.indexing.ContextStatus[] getActiveContextStatuses()
          Get an array of ContextStatuses...
protected  RepositoryItem[] getArrayFromMultiRepoItems(java.lang.Object pItems)
          Return an array of RepositoryItems representing the repository items the come from the property pItem.
 ConfigStatePersister getConfigStatePersister()
          Get the configuration state persister.
 int getDocumentsPerTransaction()
          Get the number of documents per transaction.
 atg.repository.search.indexing.IncrementalItemQueue getIncrementalItemQueue()
          Get the incremental item queue component, used for tracking changes to repository items for the registered configurations.
 int getLoggingInfoStatusCount()
          Get how often to print out count/progress status information.
 javax.transaction.TransactionManager getTransactionManager()
          Get the transaction manager from the configStatePersister.
 long getUpdateActivityTimeMillis()
          Get the number of milliseconds to wait between updates to lastActivity time.
 boolean getUpdateLastActivityTimeInSeparateThread()
          Whether to update last activity time in a separate thread.
protected  void initContext(Context pContext, IndexingOutputConfig pConfig, int pClaimedGeneration, atg.search.index.IndexInfo pIndexInfo)
          Initialize the context, using the specified parameter values.
protected  boolean isConnectionRelated(java.lang.Throwable pEx)
          Return true if the exception is, or was caused by, a java.net.ConnectException.
 boolean isEchoDocumentsToStdout()
          Whether to echo documents to stdout.
 boolean isPrettyPrint()
          Get whether the XHTML should be pretty printed (that is, indented).
 boolean isPropertyLoggingDebug()
          Whether to turn on logging debug for invidual property values.
static boolean isSubTypeOfItemDesc(RepositoryItemDescriptor pItemDesc, RepositoryItemDescriptor pSuper)
          Returns whether pItemDesc is a subtype (or equal to) pSuper.
 boolean isTransactionPerDocument()
          Whether to wrap all repository calls within a document in a transaction.
 atg.repository.search.indexing.LoaderImpl.UpdateActivityInfo nextQueuedUpdateActivity()
          Return the next queued item for an update activity.
protected  void outputAndSubmitDocument(Context pContext)
          Create the XHTML file for the Context's OutputDocumentContent and submit it using the DocumentSubmitterSession.
 void popMembershipContexts(atg.search.index.IndexInfo pIndexInfo)
          If this is a multisite indexing operation, pop site membership context from into the MembershipContext.
 void processItem(Context pContext, RepositoryItem pItem, atg.repository.search.indexing.specifier.OutputItemSpecifier pSpecifier)
          Process the specified item.
protected  void processMetaProperty(Context pContext, RepositoryItem pItem, atg.repository.search.indexing.specifier.OutputProperty pOutputProperty, atg.repository.search.indexing.PropertyAccessor pPropAccessor, java.lang.Object pPropertyValue)
          Process a single meta property
protected  void processParentProperties(Context pContext)
          Process any of the properties of containing items on the the context's stack.
protected  void processProperties(Context pContext, RepositoryItem pItem, atg.repository.search.indexing.specifier.OutputItemSpecifier pSpecifier, boolean pIsMeta)
          Process any properties: that is collect any property values.
protected  void processProperties(Context pContext, RepositoryItem pItem, atg.repository.search.indexing.specifier.OutputItemSpecifier pSpecifier, atg.repository.search.indexing.specifier.OutputProperty[] pProperties, boolean pIsMeta, java.util.Map<atg.repository.search.indexing.specifier.OutputProperty,java.lang.Object> pGeneratorMap)
          Process any properties: that is collect any property values.
protected  void processTextProperty(Context pContext, RepositoryItem pItem, atg.repository.search.indexing.specifier.OutputProperty pOutputProperty, atg.repository.search.indexing.PropertyAccessor pPropAccessor, java.lang.Object pPropertyValue)
          Process a single text property
 boolean pushMembershipContexts(atg.search.index.IndexInfo pIndexInfo)
          If this is a multisite indexing operation, push site membership context values into the MembershipContext.
 void queueUpdateActivity(atg.repository.search.indexing.LoaderImpl.UpdateActivityInfo pUpdateActivityInfo)
          Queue an last activity time update change request.
protected  void releaseContext(Context pContext)
          Release any resources claimed by the specified context.
protected  void releaseGeneration(java.lang.String pConfigPath, java.lang.String pContentId, int pGeneration, boolean pCompletedSuccessfully, boolean pIncremental, boolean pUseConfigurationClaims)
          Release the specified generation.
 void removeActiveContext(Context pContext)
          Remove a Context from the list of active contexts.
protected  void resetContextAfterDocument(Context pContext)
          Reset the Context after a generating a document.
 void setConfigStatePersister(ConfigStatePersister pConfigStatePersister)
          Set the configuration state persister.
 void setDocumentsPerTransaction(int pDocumentsPerTransaction)
          Set the number of documents per transaction.
 void setEchoDocumentsToStdout(boolean pEchoDocumentsToStdout)
          Whether to echo documents to stdout.
 void setIncrementalItemQueue(atg.repository.search.indexing.IncrementalItemQueue pIncrementalItemQueue)
          Set the incremental item queue component, used for tracking changes to repository items for the registered configurations.
 void setLoggingInfoStatusCount(int pLoggingInfoStatusCount)
          Set how often to print out count/progress status information.
protected  void setNextIncrementalGeneration(java.lang.String pConfigPath, java.lang.String pContentId, int pGeneration)
          Release the specified generation.
 void setPrettyPrint(boolean pPrettyPrint)
          Set whether the XHTML should be pretty printed (that is, indented).
 void setPropertyLoggingDebug(boolean pPropertyLoggingDebug)
          Whether to turn on logging debug for invidual property values.
 void setTransactionPerDocument(boolean pTransactionPerDocument)
          Whether to wrap all repository calls within a document in a transaction.
protected  void setupContextForNewDocument(Context pContext, RepositoryItem pItem, java.util.Map pMapParams)
          Set up our context for a new document representing pItem.
 void setUpdateActivityTimeMillis(long pUpdateActivityTimeMillis)
          Set the number of milliseconds to wait between updates to lastActivity time.
 void setUpdateLastActivityTimeInSeparateThread(boolean pUpdateLastActivityTimeInSeparateThread)
          Whether to update last activity time in a separate thread.
protected  java.lang.Object[] splitPropertyValue(atg.repository.search.indexing.specifier.OutputProperty pOutputProperty, java.lang.Object pValue)
          Split the property value into multiple values, if appropriate.
 void updateActivity(Context pContext)
          Update our last activity time.
 
Methods inherited from class atg.nucleus.GenericService
addLogListener, doStartService, getAbsoluteName, getAdminServlet, getLoggingForVlogging, getLogListenerCount, getLogListeners, getName, getNameContext, getNucleus, getRoot, getServiceConfiguration, getServiceInfo, 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, setLoggingDebug, setLoggingError, setLoggingInfo, setLoggingTrace, setLoggingWarning, setNucleus, setServiceInfo, startService, stopService
 
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

CLASS_VERSION

public static java.lang.String CLASS_VERSION
Class version string


MY_RESOURCE_NAME

protected static final java.lang.String MY_RESOURCE_NAME
Resource name used for messages.

See Also:
Constant Field Values

START_QUERY

protected static final java.lang.String START_QUERY
For performance monitor

See Also:
Constant Field Values

PROCESS_PROPERTIES

protected static final java.lang.String PROCESS_PROPERTIES
For performance monitor

See Also:
Constant Field Values

GET_SUB_PROPERTY_VALUE

protected static final java.lang.String GET_SUB_PROPERTY_VALUE
For performance monitor

See Also:
Constant Field Values

GET_META_PROPERTY

protected static final java.lang.String GET_META_PROPERTY
For performance monitor

See Also:
Constant Field Values

GET_TEXT_PROPERTY

protected static final java.lang.String GET_TEXT_PROPERTY
For performance monitor

See Also:
Constant Field Values

DELETE_DOCUMENT

protected static final java.lang.String DELETE_DOCUMENT
For performance monitor

See Also:
Constant Field Values

GET_GENERATOR_PROPERTY

protected static final java.lang.String GET_GENERATOR_PROPERTY
For performance monitor

See Also:
Constant Field Values

REGENERATE_FOR_CHANGE

protected static final java.lang.String REGENERATE_FOR_CHANGE
For performance monitor

See Also:
Constant Field Values

sResourceBundle

protected static java.util.ResourceBundle sResourceBundle
Constructor Detail

LoaderImpl

public LoaderImpl()
Method Detail

setIncrementalItemQueue

public void setIncrementalItemQueue(atg.repository.search.indexing.IncrementalItemQueue pIncrementalItemQueue)
Set the incremental item queue component, used for tracking changes to repository items for the registered configurations.


getIncrementalItemQueue

public atg.repository.search.indexing.IncrementalItemQueue getIncrementalItemQueue()
Get the incremental item queue component, used for tracking changes to repository items for the registered configurations.


setConfigStatePersister

public void setConfigStatePersister(ConfigStatePersister pConfigStatePersister)
Set the configuration state persister.


getConfigStatePersister

public ConfigStatePersister getConfigStatePersister()
Get the configuration state persister.


setUpdateActivityTimeMillis

public void setUpdateActivityTimeMillis(long pUpdateActivityTimeMillis)
Set the number of milliseconds to wait between updates to lastActivity time. Note that the actual update delay may be longer, and this value only specifies a lower bound.


getUpdateActivityTimeMillis

public long getUpdateActivityTimeMillis()
Get the number of milliseconds to wait between updates to lastActivity time. Note that the actual update delay may be longer, and this value only specifies a lower bound.


setEchoDocumentsToStdout

public void setEchoDocumentsToStdout(boolean pEchoDocumentsToStdout)
Whether to echo documents to stdout. Useful for debugging.


isEchoDocumentsToStdout

public boolean isEchoDocumentsToStdout()
Whether to echo documents to stdout. Useful for debugging.


setPropertyLoggingDebug

public void setPropertyLoggingDebug(boolean pPropertyLoggingDebug)
Whether to turn on logging debug for invidual property values.


isPropertyLoggingDebug

public boolean isPropertyLoggingDebug()
Whether to turn on logging debug for invidual property values.


setTransactionPerDocument

public void setTransactionPerDocument(boolean pTransactionPerDocument)
Whether to wrap all repository calls within a document in a transaction.


isTransactionPerDocument

public boolean isTransactionPerDocument()
Whether to wrap all repository calls within a document in a transaction.


setLoggingInfoStatusCount

public void setLoggingInfoStatusCount(int pLoggingInfoStatusCount)
Set how often to print out count/progress status information. Printed out every N document, a zero value means never print status info.


getLoggingInfoStatusCount

public int getLoggingInfoStatusCount()
Get how often to print out count/progress status information. Printed out every N document, a zero value means never print status info.


setPrettyPrint

public void setPrettyPrint(boolean pPrettyPrint)
Set whether the XHTML should be pretty printed (that is, indented).


isPrettyPrint

public boolean isPrettyPrint()
Get whether the XHTML should be pretty printed (that is, indented).


setDocumentsPerTransaction

public void setDocumentsPerTransaction(int pDocumentsPerTransaction)
Set the number of documents per transaction.


getDocumentsPerTransaction

public int getDocumentsPerTransaction()
Get the number of documents per transaction.


setUpdateLastActivityTimeInSeparateThread

public void setUpdateLastActivityTimeInSeparateThread(boolean pUpdateLastActivityTimeInSeparateThread)
Whether to update last activity time in a separate thread.


getUpdateLastActivityTimeInSeparateThread

public boolean getUpdateLastActivityTimeInSeparateThread()
Whether to update last activity time in a separate thread.


processItem

public void processItem(Context pContext,
                        RepositoryItem pItem,
                        atg.repository.search.indexing.specifier.OutputItemSpecifier pSpecifier)
                 throws IndexingException
Process the specified item. The item may be the top-level item, or one its sub-items. This method is called recursively.

Parameters:
pContext - the indexing context object.
pRepositoryItem - the repository item that corresponds to this item.
pSpecifier - the specifier for this item.
Throws:
IndexingException

isSubTypeOfItemDesc

public static boolean isSubTypeOfItemDesc(RepositoryItemDescriptor pItemDesc,
                                          RepositoryItemDescriptor pSuper)
Returns whether pItemDesc is a subtype (or equal to) pSuper.

Parameters:
pItemDesc - The (presumably child) item descripor
pSuper - The item descriptor to test for parent-hood.
Returns:
true if pItemDesc is a subtype (or equal to) pSuper, return false otherwise.

updateActivity

public void updateActivity(Context pContext)
                    throws IndexingException
Update our last activity time. Only for internal use.

Throws:
IndexingException

getArrayFromMultiRepoItems

protected RepositoryItem[] getArrayFromMultiRepoItems(java.lang.Object pItems)
Return an array of RepositoryItems representing the repository items the come from the property pItem. pItem may be a single RepositoryItem instnace, and array of RepositoryItems, a Collection, or a Map (with RepositoryItems for values).

Parameters:
pItems - the object from which to extract repository items
Returns:
the array of extracted repository items.

isConnectionRelated

protected boolean isConnectionRelated(java.lang.Throwable pEx)
Return true if the exception is, or was caused by, a java.net.ConnectException.

Returns:
true if a java.net.ConnectException was involved in this exception

outputAndSubmitDocument

protected void outputAndSubmitDocument(Context pContext)
                                throws IndexingException
Create the XHTML file for the Context's OutputDocumentContent and submit it using the DocumentSubmitterSession.

Throws:
IndexingException

setupContextForNewDocument

protected void setupContextForNewDocument(Context pContext,
                                          RepositoryItem pItem,
                                          java.util.Map pMapParams)
Set up our context for a new document representing pItem. Sets the currentURL, outputDocumentContent, and documentRepositoryId of pContext.

Parameters:
pContext - the context to be updated
pItem - the document-level item used to update pContext
pMapParams - the map of distinguising keys and values that will be appened as query params to the document URL. Both keys and values must be strings.

addUniqueParamsToURL

protected java.lang.String addUniqueParamsToURL(java.lang.String pBaseURL,
                                                java.util.Map pMapUniqueParams)
Add any unique params to the URL.

Parameters:
pBaseURL - the base URL... typically an atgrepo: URL.
pMapUniqueParams - the map of unique paramaters. This should be an ordered map for consistency sake.

resetContextAfterDocument

protected void resetContextAfterDocument(Context pContext)
Reset the Context after a generating a document. Partner method to setupContextForNewDocument.


createEmptyOutputDocumentContent

protected atg.repository.search.indexing.OutputDocumentContent createEmptyOutputDocumentContent()
Create a new, empty, OutputDocumentContent object.


processParentProperties

protected void processParentProperties(Context pContext)
                                throws IndexingException
Process any of the properties of containing items on the the context's stack. This method collects the property values.

Parameters:
pContext - the context, currently set to the document level.
Throws:
IndexingException

processProperties

protected void processProperties(Context pContext,
                                 RepositoryItem pItem,
                                 atg.repository.search.indexing.specifier.OutputItemSpecifier pSpecifier,
                                 boolean pIsMeta)
Process any properties: that is collect any property values. This method does not recurse, but instead just collects text and meta properties from pItem. Gets the static set of properties of pSpecifier, and possibly additional property values from the PropertyAccessor, if instance of AdditionalPropertiesPropertyAccessor.

Parameters:
pContext - the current context
pItem - the current item whose property values to collect
pSpecifier - the specifier corresponding to pItem
pIsMeta - whether these properties are meta properties

processMetaProperty

protected void processMetaProperty(Context pContext,
                                   RepositoryItem pItem,
                                   atg.repository.search.indexing.specifier.OutputProperty pOutputProperty,
                                   atg.repository.search.indexing.PropertyAccessor pPropAccessor,
                                   java.lang.Object pPropertyValue)
Process a single meta property


processTextProperty

protected void processTextProperty(Context pContext,
                                   RepositoryItem pItem,
                                   atg.repository.search.indexing.specifier.OutputProperty pOutputProperty,
                                   atg.repository.search.indexing.PropertyAccessor pPropAccessor,
                                   java.lang.Object pPropertyValue)
Process a single text property


processProperties

protected void processProperties(Context pContext,
                                 RepositoryItem pItem,
                                 atg.repository.search.indexing.specifier.OutputItemSpecifier pSpecifier,
                                 atg.repository.search.indexing.specifier.OutputProperty[] pProperties,
                                 boolean pIsMeta,
                                 java.util.Map<atg.repository.search.indexing.specifier.OutputProperty,java.lang.Object> pGeneratorMap)
Process any properties: that is collect any property values. This method does not recurse, but instead just collects text and meta properties from pItem.

Parameters:
pContext - the current context
pItem - the current item whose property values to collect
pSpecifier - the specifier corresponding to pItem
pProperties - the array of output properties to collect
pIsMeta - whether these properties are meta properties

splitPropertyValue

protected java.lang.Object[] splitPropertyValue(atg.repository.search.indexing.specifier.OutputProperty pOutputProperty,
                                                java.lang.Object pValue)
Split the property value into multiple values, if appropriate. This method splits if the property value is a collection or an array.

Parameters:
pOutputProperty - the output property the corresponds to this value.
pValue - the property value
Returns:
the array of split values. If the value was not split, returns a single element array.

createContext

protected Context createContext()
Create a new context. One context is created for each update (incremental or bulk).


initContext

protected void initContext(Context pContext,
                           IndexingOutputConfig pConfig,
                           int pClaimedGeneration,
                           atg.search.index.IndexInfo pIndexInfo)
Initialize the context, using the specified parameter values.

Parameters:
pContext - the context to initialize
pSession - the document submitter session
pConfig - the indexing output config
pClaimedGeneration - the claimed generation for this update.

releaseContext

protected void releaseContext(Context pContext)
Release any resources claimed by the specified context. Does not release any associated document submitter.

Parameters:
pContext - The context to release.

claimGeneration

protected int claimGeneration(java.lang.String pConfigPath,
                              java.lang.String pContentId,
                              boolean pIncremental,
                              boolean pUseConfigurationClaims,
                              IndexingOutputConfig pIOC)
                       throws IndexingException
Claim a generation for updating. This uses the ConfigStatePersister to claim a given generation for updating.

Parameters:
pConfigPath - the configuration path for for indexing output config whose index shoudl be udpated.
pContentId - The content ID that uniquely identifies the configuration.
pIncremental - whether we are claiming this generation for an incremental update.
pUseConfigurationClaims - If true, use configuration claims and enforce exclusive access to a configuration + content ID by throwing exceptions if calims cannot be obtaind.
Returns:
the numeric ID of the claimed generation. This result must be passed into releaseGeneration when the indexing update is complete. Returns -1 if the generation was already cleaimed by someone else.
Throws:
IndexingException

releaseGeneration

protected void releaseGeneration(java.lang.String pConfigPath,
                                 java.lang.String pContentId,
                                 int pGeneration,
                                 boolean pCompletedSuccessfully,
                                 boolean pIncremental,
                                 boolean pUseConfigurationClaims)
                          throws IndexingException
Release the specified generation. Uses ConfigStatePersister to release the specified generation.

Parameters:
pConfigPath - The configuration path of the generation
pGeneration - the numeric id of the generation, previously returned by claimedGeneration.
pCompletedSuccessfully - whether the generation completed successfully.
pIncremental - whether the generation is an incremental generation.
pUseConfigurationClaims - If true, use configuration claims and enforce exclusive access to a configuration + content ID by throwing exceptions if calims cannot be obtaind.
Throws:
IndexingException

setNextIncrementalGeneration

protected void setNextIncrementalGeneration(java.lang.String pConfigPath,
                                            java.lang.String pContentId,
                                            int pGeneration)
                                     throws IndexingException
Release the specified generation. Uses ConfigStatePersister to release the specified generation.

Parameters:
pConfigPath - The configuration path of the generation
pGeneration - the numeric id of the generation, previously returned by claimedGeneration.
pCompletedSuccessfully - whether the generation completed successfully.
pIncremental - whether the generation is an incremental generation.
Throws:
IndexingException

addActiveContext

public void addActiveContext(Context pContext)
Add a Context to the list of active contexts. This list of contexts is used by the HTML admin to display status information.

Parameters:
pContext - the context to add.

removeActiveContext

public void removeActiveContext(Context pContext)
Remove a Context from the list of active contexts.

Parameters:
pContext - the context to remove.

cancelActiveContext

public boolean cancelActiveContext(java.lang.String pConfigurationPath)
Cancel the active context with the specified name. Returns true if it found a context to cancel, false otherwise.


getActiveContextStatuses

public atg.repository.search.indexing.ContextStatus[] getActiveContextStatuses()
Get an array of ContextStatuses... this represents a snapshot of the Contexts currently being processes by this loader.


createAdminServlet

protected javax.servlet.Servlet createAdminServlet()
Create the admininistration servlet.

Overrides:
createAdminServlet in class GenericService

getTransactionManager

public javax.transaction.TransactionManager getTransactionManager()
Get the transaction manager from the configStatePersister.


deleteDocumentItem

protected void deleteDocumentItem(RepositoryItem pItem,
                                  Context pContext)
                           throws IndexingException
Remove the specified repository item pItem from the index. pItem should be a document level item.

Throws:
IndexingException

afterSessionStart

protected void afterSessionStart(Context pContext)
                          throws IndexingException
This method is invoked immediately after a DocumentSubmitter session is started.

Parameters:
pContext - the Context for the current indexing operation. The DocumentSubmitterSession is available as a property, as is the IndexingOutputConfig and other state information.
Throws:
IndexingException

beforeSessionEnd

protected void beforeSessionEnd(Context pContext)
                         throws IndexingException
This method is invoked immediately before a DocumentSubmitter session is closed.

Parameters:
pContext - the Context for the current indexing operation. The DocumentSubmitterSession is available as a property, as is the IndexingOutputConfig and other state information.
Throws:
IndexingException

queueUpdateActivity

public void queueUpdateActivity(atg.repository.search.indexing.LoaderImpl.UpdateActivityInfo pUpdateActivityInfo)
Queue an last activity time update change request.


nextQueuedUpdateActivity

public atg.repository.search.indexing.LoaderImpl.UpdateActivityInfo nextQueuedUpdateActivity()
Return the next queued item for an update activity. An update activity represents a request to update the last activity time of a running update.


doStopService

public void doStopService()
                   throws ServiceException
When doStopService is called, exit out of our update activity thread, if any.

Overrides:
doStopService in class GenericService
Throws:
ServiceException - if the Service had a problem shutting down

adjustIncrementalQueue

public void adjustIncrementalQueue(IndexingOutputConfig pIndexingOutputConfig,
                                   atg.search.index.IndexInfo pIndexInfo)
                            throws IndexingException
Pass-through method to adjust incremental queues.

Throws:
IndexingException

pushMembershipContexts

public boolean pushMembershipContexts(atg.search.index.IndexInfo pIndexInfo)
If this is a multisite indexing operation, push site membership context values into the MembershipContext.

Parameters:
pIndexInfo - the object containing the context information
Returns:
false if the operation assocaited with the IndexInfo should use membership contexts but there are no context values (e.g. is a multisite index but there are no assocated sites) indicating that no work needs to be done.

popMembershipContexts

public void popMembershipContexts(atg.search.index.IndexInfo pIndexInfo)
If this is a multisite indexing operation, pop site membership context from into the MembershipContext.

Parameters:
pIndexInfo - the object containing the context information