atg.repository.search.indexing
Class IndexingOutputConfig

java.lang.Object
  extended by java.rmi.server.RemoteObject
      extended by java.rmi.server.RemoteServer
          extended by java.rmi.server.UnicastRemoteObject
              extended by atg.nucleus.logging.VariableArgumentApplicationLoggingRMIImpl
                  extended by atg.nucleus.GenericRMIService
                      extended by atg.repository.search.indexing.IndexingOutputConfig
All Implemented Interfaces:
NameContextBindingListener, NameContextElement, NameResolver, AdminableService, ApplicationLogging, atg.nucleus.logging.ApplicationLoggingSender, atg.nucleus.logging.TraceApplicationLogging, VariableArgumentApplicationLogging, ComponentNameResolver, atg.nucleus.PostStartupAction, Service, ServiceListener, IndexingConstants, atg.repository.search.indexing.IndexingSynchronization, atg.repository.search.indexing.RemoteIndexingOutputConfig, Schedulable, java.io.Serializable, java.rmi.Remote, java.util.EventListener

public class IndexingOutputConfig
extends GenericRMIService
implements IndexingConstants, atg.repository.search.indexing.IndexingSynchronization, Schedulable, atg.repository.search.indexing.RemoteIndexingOutputConfig, atg.nucleus.PostStartupAction

Specifies output options, the most important of which is the XML files that define which properties are emitted for indexing. This class is the central configuration class for specifyhing the output that will be sent to the indexer.

The output from this class can be farther customized by the use of PropertyFormatters, PropertyAccessors and VariantProducers.

Created: February 16 2005

See Also:
Serialized Form

Field Summary
static java.lang.String CLASS_VERSION
          Class version string
static java.lang.ThreadLocal mDocumentSubmitterTL
           
protected  int mJobId
          the jobId of our scheduled task
static java.lang.String[] REQUIRED_DOCUMENT_OUTPUT_PROPERTIES
          The list of output properties required for documents.
static java.lang.String[] REQUIRED_EVERY_ITEM_OUTPUT_PROPERTIES
          The list of output properties required for every repository item.
 
Fields inherited from class atg.nucleus.GenericRMIService
SERVICE_INFO_KEY
 
Fields inherited from class java.rmi.server.RemoteObject
ref
 
Fields inherited from interface atg.repository.search.indexing.IndexingConstants
BASE_URL_OUTPUT_PROPERTY_NAME, CONTEXT_OUTPUT_PROPERTY_NAME, DEFAULT_FORMATTER_KEY, PROP_TYPE_BOOLEAN, PROP_TYPE_DATE, PROP_TYPE_ENUM, PROP_TYPE_FLOAT, PROP_TYPE_INTEGER, PROP_TYPE_STRING, PROP_TYPE_TEXT, PROP_TYPE_UNKNOWN, URL_OUTPUT_PROPERTY_NAME
 
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
IndexingOutputConfig()
          constructor
 
Method Summary
protected  void addBasicFilters()
          Add in the basic filter to the filterMap.
protected  void addBasicFormatters()
          Add in the basic formatters to the formatterMap.
protected  void addBasicPropertyAccessors()
          Add in the basic property accessors to the propertyAccessorMap.
protected  void addDocumentLevelSpecifiers(atg.repository.search.indexing.specifier.OutputItemSpecifier pSpecifier, java.util.List pListFound)
          Add the the document-level specifier(s) to pListFound.
protected  java.lang.String[] addValidationMessage(java.lang.String pType, java.lang.String pMessage)
          Add a validation message to the array of validation messages
 void afterSessionStart(Context pContext)
          This method is invoked immediately after a DocumentSubmitter session is closed.
 boolean allowPeriodicIndexing()
          Whether to allow scheduled indexing.
 void beforeSessionEnd(Context pContext)
          This method is invoked immediately before a DocumentSubmitter session is closed.
 java.lang.String buildUriForRepositoryItem(Context pContext, Repository pRepository, atg.repository.search.indexing.ConfigRepositoryItemChanged pItemChanged)
           
 atg.repository.search.indexing.BulkLoaderResults bulkLoad()
          Perform a bulk load (full index).
 atg.repository.search.indexing.BulkLoaderResults bulkLoad(atg.repository.search.indexing.DocumentSubmitterSession pSession)
          Perform a bulk load (full index).
 atg.repository.search.indexing.LoaderResults bulkLoad(java.lang.String pSubmitterId, java.lang.String pSessionId, java.lang.String pCallbackUrl)
          bulk load
 atg.repository.search.indexing.BulkLoaderResults bulkLoadWithRetry()
          BulkLoad and keep retrying if someone else has currently claimed the configuration.
 atg.repository.search.indexing.BulkLoaderResults bulkLoadWithRetry(atg.repository.search.indexing.DocumentSubmitterSession pDocSubSession)
          BulkLoad and keep retrying if someone else has currently claimed the configuration.
protected  void calculateOutputPropertyNames()
          Calculate the various output properties.
protected  java.lang.String[] calculateOutputPropertyNames(java.lang.Boolean pIsMeta)
          Calculate the output property names.
 boolean cancelBulkLoad()
          cancel bulk load
 boolean cancelIncrementalUpdate()
          cancel incremental update
 void clearIterationState(Context pContext)
           
protected  boolean containsString(java.lang.String pString, java.lang.String[] pStrings)
          Whether the string array pStrings contains the specified string pString.
protected  void correctRepositoryPath(atg.repository.search.config.ItemType pType)
          correct the repository path to reflect the path of the unversioned repository
protected  javax.servlet.Servlet createAdminServlet()
          Creates and returns a new Servlet that will administer this service.
 void doStartService()
          Start up the service, parsing the definition file, etc.
 void doStopService()
          The default implementation is to just stop our scheduled job.
 boolean executeSynchronizationsOnly()
          Do an incremental update, but only run the synchronizations, do NOT process any queued updates.
protected  void exportAsRemoteService()
          export this IndexingOutputConfig as a remote service that can be accessed via the RmiServer
 java.util.List<java.lang.String> generateTestDocument(java.lang.String pId)
          Invoked by the AdminServlet, generates a single output document for the item specified by the ID parameter or returns an error message.
static void getAllOutputItemSpecifiers(java.util.List pResults, atg.repository.search.indexing.specifier.OutputItemSpecifier pSpecifier)
          Recursively build list of all OutputItemSpecifier objects
 java.lang.String[] getAllOutputPropertyNames()
          Get both the text and meta output property names.
 BulkLoader getBulkLoader()
          Get the bulk loader used to bulk (full) index.
 int getBulkLoadWithRetryMinutes()
          Get the number of minutes to keep trying bulkLoadWithRetry.
 Schedule getBulkSchedule()
          Get property bulkschedule.
 int getBulkScheduleConsiderIndexedMinutes()
          Get the number of minutes to consider content already indexed for a scheduled bulk load.
 Scheduler getBulkScheduler()
          Get property bulkscheduler.
 atg.repository.search.indexing.ConfigRepositoryItemChangedProcessor getConfigRepositoryItemChangedProcessor()
          If provided, this optional component will be called for received repository change event.
 PropertyFormatter getDefaultFormatter()
          Get the default formatter used to format property values.
 atg.repository.search.indexing.PropertyAccessor getDefaultPropertyAccessor()
          Get the default property accessor.
 java.lang.String getDefaultPropertyAccessorPath()
          Get the nucleus path of the default property accessor.
 atg.xml.XMLFile getDefinitionFile()
          The indexing output definition file.
 java.lang.String[] getDocumentLevelOutputProperties()
          Get the list of output properties that will be added to the document-level item.
 atg.repository.search.indexing.specifier.OutputItemSpecifier[] getDocumentLevelSpecifiers()
          Return the document-level specifiers.
 DocumentSubmitter getDocumentSubmitter()
          Get the document submitter, used to submit documents to the indexing engine.
 java.lang.String[] getEveryItemOutputProperties()
          Get the list of output properties that will be added to every repository item.
 ServiceMap getFilterMap()
          Get the filter map.
 int getForceIncrementalIndexingFromGeneration()
          Whether to force incremental indexing from a particular generation, -1 means disabled.
 ServiceMap getFormatterMap()
          Get the formatter map.
 java.util.Map getForq()
           
 IncrementalLoader getIncrementalLoader()
          Whether to enable to incremental loader at startup.
 int getIncrementalUpdateSeconds()
          The number of seconds between incremental updates.
 atg.repository.search.indexing.IndexingSynchronization[] getIndexingSynchronizations()
          Get the array of indexing synchronizations.
 java.util.Set getItemDescriptors()
          Get the set of all configured item descriptors
 atg.repository.search.indexing.IterationProducer getIterationProducer()
          Get the iteration producer.
 java.lang.String getJobDescription()
          Get property jobDescription
 java.lang.String getJobName()
          Get property jobName
 int getMaxFailuresAllowedForCommitting()
          The maximum number of failures allowed when committing a document submitter session.
 int getMaxIncrementalChanges()
          The maximum number of incremental changes to accept for a given incremental update before reverting to a bulk load.
 int getMaxIncrementalChangesPerGeneration()
          The maximum number of repository item changes to queue up in a single generation.
 int getMaxIndexedItems()
          The maximum number of documents to index.
 int getMaxNumberProcessItemThreads()
          Get the maximum number of process item threads.
 java.lang.String[] getMetaOutputPropertyNames()
          Get both the meta output property names.
 java.lang.String getNonVersionRepositoryPath(java.lang.String pPath, java.util.Map pMap)
          Return the path for the non-versinon repository represented by either pPath or the value in the map that's associated with the pPath key.
 atg.repository.search.indexing.specifier.OutputItemSpecifier getOutputItemSpecifier()
          The output item specifier created from the specified definitionFile.
protected  java.util.List getOutputProperties(java.lang.Boolean pIsMeta)
          Get the specified output properties from all the elements of the hierarchy.
 ServiceMap getPropertyAccessorMap()
          Get propertyAccessorMap...
 java.util.Map<atg.repository.search.indexing.PropertyAccessor,java.util.Set<atg.repository.search.indexing.specifier.OutputProperty>> getPropertyAccessorToOutputPropertySet()
          Return a map of custom configured property accessor components to the OutputProperty instances that use them.
 Repository getRepository()
          Optional override of definition file repository specification.
 RepositoryItemGroup getRepositoryItemGroup()
          Optional override for definition file repository-item-group component setting.
 java.lang.String[] getRequiredEveryItemOutputProperties()
          Get an array of required output properties for every indexed item.
 atg.server.rmi.RmiServer getRmiServer()
          get RmiServer
 Schedule getSchedule()
          Get property schedule
 Scheduler getScheduler()
          Get property scheduler
 java.util.Map getSynchronizedRepositories()
          Used by functionality that synchronizes CA deployments with indexing to identifiy customization-only type repositories associated with IOC's repository.
 java.lang.String getTargetName()
          get TargetName
 java.lang.String getTextActiveZones()
          Get the text active zones.
 java.lang.String[] getTextOutputPropertyNames()
          Get both the text output property names.
 int getThreadMethod()
          Get property threadMethod
 Repository getTopLevelItemRepository()
          Return the repository that corresponds to the top-level "item" element in the definition file.
 java.lang.String getUnversionedRepositoryPath()
          get UnversionedRepositoryPath
 java.lang.String getUriForRepositoryItem(Context pContext, RepositoryItem pItem)
          Get a URI for the specified item
protected  java.util.List<java.lang.String[]> getValidationMessages()
          Validate configuration as much as possible
 atg.repository.search.indexing.VariantProducer[] getVariantProducers()
          Get the array of variant producers.
 java.lang.String getVersionedRepositoryPath()
          get VersionedRepositoryPath
 java.lang.String getVersionRepositoryPath(java.lang.String pPath, java.util.Map pMap)
          Return the path for the version repository represented by either pPath or the key in the map that refers to the value which is equal to pPath.
 void incrementallyLoad()
          Start the incremental loading functionality.
 void indexedItem(Context pContext, RepositoryItem pItem)
          Notification that specific item has been used to build an indexed document.
 boolean isEnableIncrementalLoading()
          Whether to enabled incremental loading.
 boolean isEnableScheduledBulkLoading()
          Whether scheduled bulk loading is enabled.
 boolean isFilterOutDollarOutputPropertyNames()
          Whether to filter out properties containing "$" from the various "outputPropertyName" properties.
 boolean isForceDeleteGenerationsOnBulkLoad()
          Whether to remove all processed generations from the indexing queue on a bulk load
 boolean isNonVersionRepository(java.lang.String pPath)
          Return true if component path resolves to a non-version repository.
 boolean isOnPubServer()
          get OnPubServer
 boolean isPeriodicActivityUpdateThreadRunning()
          Return true if the periodic activity update thread is running
 boolean isTransactional()
          Returns property Transactional
 boolean isUseConfigurationClaims()
          Whether to use configuration claims for this component.
 boolean isVersionRepository(java.lang.String pPath)
          Return true if component path resolves to a version repository.
protected  atg.repository.search.config.ItemType jaxbParseFile()
          Parse the definition and return the jaxb generated item type.
protected  void notifyIndexingInitialization()
          Notification that an indexing process is about to begin.
protected  void notifyIndexingTermination(atg.repository.search.indexing.LoaderResults pLoaderResults)
          Notification that an indexing process has completed begin.
 void performAction()
          Implements the PostStartupAction interface.
 void performScheduledTask(Scheduler pScheduler, ScheduledJob pJob)
          Called by the scheduler when it is time for this service to perform its function.
 void postIndexingCleanup(boolean pSuccess, atg.repository.search.indexing.LoaderResults pResults)
          Called to clean up change generation and perform any other post-indexing operations.
 atg.repository.search.indexing.LoaderResults processQueuedIncrementalUpdates()
          Process any queued incremental updates
 atg.repository.search.indexing.LoaderResults processQueuedIncrementalUpdates(java.lang.String pSubmitterId, java.lang.String pSessionId, java.lang.String pCallbackUrl)
          process queued incremental updates
 void setBulkLoader(BulkLoader pBulkLoader)
          Set the bulk loader used to bulk (full) index.
 void setBulkLoadWithRetryMinutes(int pBulkLoadWithRetryMinutes)
          Set the number of minutes to keep trying bulkLoadWithRetry.
 void setBulkSchedule(Schedule pBulkSchedule)
          Set property bulkSchedule.
 void setBulkScheduleConsiderIndexedMinutes(int pBulkScheduleConsiderIndexedMinutes)
          Set the number of minutes to consider content already indexed for a bulk load.
 void setBulkScheduler(Scheduler pBulkScheduler)
          Set property bulkScheduler.
 void setConfigRepositoryItemChangedProcessor(atg.repository.search.indexing.ConfigRepositoryItemChangedProcessor pProcessor)
          If provided, this optional component will be called for received repository change event.
 void setDefaultFormatter(PropertyFormatter pDefaultFormatter)
          Set the default formatter used to format property values.
 void setDefaultPropertyAccessor(atg.repository.search.indexing.PropertyAccessor pDefaultPropertyAccessor)
          Get the default property accessor.
 void setDefaultPropertyAccessorPath(java.lang.String pDefaultPropertyAccessorPath)
          Get nucleus path of the default property accessor.
 void setDefinitionFile(atg.xml.XMLFile pDefinitionFile)
          Sets the property definitionFile.
 void setDocumentLevelOutputProperties(java.lang.String[] pDocumentLevelOutputProperties)
          Set the list of output properties that will be added to the document-level item.
 void setDocumentSubmitter(DocumentSubmitter pDocumentSubmitter)
          Set the document submitter, used to submit documents to the indexing engine.
 void setEnableIncrementalLoading(boolean pEnableIncrementalLoading)
          Whether to enabled incremental loading.
 void setEnableScheduledBulkLoading(boolean pEnableScheduledBulkLoading)
          Whether scheduled bulk loading is enabled.
 void setEveryItemOutputProperties(java.lang.String[] pEveryItemOutputProperties)
          Set the list of output properties that will be added to every repository item.
 void setFilterMap(ServiceMap pFilterMap)
          Set the filter map.
 void setFilterOutDollarOutputPropertyNames(boolean pFilterOutDollarOutputPropertyNames)
          Whether to filter out properties containing "$" from the various "outputPropertyName" properties.
 void setForceDeleteGenerationsOnBulkLoad(boolean pForceDeleteGenerationsOnBulkLoad)
          Set to true to remove all processed generations from the indexing queue on a bulk load
 void setForceIncrementalIndexingFromGeneration(int pForceIncrementalIndexingFromGeneration)
          Set to a positive value to force incremental indexing start from a particular generation, -1 means disabled.
 void setFormatterMap(ServiceMap pFormatterMap)
          Set the formatter map.
 void setForq(java.util.Map pMap)
           
 void setIncrementalLoader(IncrementalLoader pIncrementalLoader)
          Whether to enable to incremental loader at startup.
 void setIncrementalUpdateSeconds(int pIncrementalUpdateSeconds)
          The number of seconds between incremental updates.
 void setIndexingSynchronizations(atg.repository.search.indexing.IndexingSynchronization[] pIndexingSynchronizations)
          Set the array of indexing synchronizations.
 void setIterationProducer(atg.repository.search.indexing.IterationProducer pIterationProducer)
          Set the iteration producer.
 void setJobDescription(java.lang.String pJobDescription)
          Set property jobDescription
 void setJobName(java.lang.String pJobName)
          Set property jobName
 void setMaxFailuresAllowedForCommitting(int pMaxFailuresAllowedForCommitting)
          The maximum number of failures allowed when committing a document submitter session.
 void setMaxIncrementalChanges(int pMaxIncrementalChanges)
          The maximum number of incremental changes to accept for a given incremental update before reverting to a bulk load.
 void setMaxIncrementalChangesPerGeneration(int pMaxIncrementalChangesPerGeneration)
          The maximum number of repository item changes to queue up in a single generation.
 void setMaxIndexedItems(int pMax)
          The maximum number of documents to index.
 void setMaxNumberProcessItemThreads(int pMaxNumberProcessItemThreads)
          Set the maximum number of process item threads.
 void setOnPubServer(boolean pOnPubServer)
          set OnPubServer
 void setPropertyAccessorMap(ServiceMap pPropertyAccessorMap)
          Set propertyAccessorMap...
 void setRepository(Repository pRepository)
          Optional override of definition file repository specification.
 void setRepositoryItemGroup(RepositoryItemGroup pRepositoryItemGroup)
          Optional override for definition file repository-item-group component setting.
 void setRmiServer(atg.server.rmi.RmiServer pRmiServer)
          set RmiServer
 void setSchedule(Schedule pSchedule)
          Set property schedule
 void setScheduler(Scheduler pScheduler)
          Set property scheduler.
 void setSynchronizedRepositories(java.util.Map pVal)
          Used by functionality that synchronizes CA deployments with indexing to identifiy customization-only type repositories associated with IOC's repository.
 void setTargetName(java.lang.String pTargetName)
          set TargetName
 void setThreadMethod(int pThreadMethod)
          Set property threadMethod
 void setTransactional(boolean pTransactional)
          Sets property Transactional
 void setUnversionedRepositoryPath(java.lang.String pUnversionedRepositoryPath)
          set UnversionedRepositoryPath
 void setUseConfigurationClaims(boolean pUseConfigurationClaims)
          Whether to use configuration claims for this component.
 void setVariantProducers(atg.repository.search.indexing.VariantProducer[] pVariantProducers)
          Set the array of variant producers.
 void setVersionedRepositoryPath(java.lang.String pVersionedRepositoryPath)
          set VersionedRepositoryPath
 boolean shouldCommitSession(Context pContext, boolean pAtEnd)
          Whether the current session should be committed or continued.
 boolean shouldIncludeItem(Context pContext, atg.repository.search.indexing.specifier.OutputItemSpecifier pSpecifier, RepositoryItem pItem)
          Whether the specific repository item should be included in the index.
 boolean shouldOutputDocument(Context pContext)
          Return true to output document, false to discard it.
protected  void startScheduledJob()
          Just block the startScheduledJob if the bulk scheduler isn't set.
 boolean stopPeriodicActivityUpdateThread()
          If the periodic activity update thread is running, terminate it.
protected  void stopScheduledJob()
          If we have a job running, stop it.
protected  void superStartScheduledJob()
          If we have a scheduler and a schedule and we are not already running start our scheduled job.
protected  void validateConfiguration()
           
 void warnIfMisconfiguredForSearchAdmin()
          Warn if this configuration is misconfigured for SearchAdmin.
 
Methods inherited from class atg.nucleus.GenericRMIService
addLogListener, getAbsoluteName, getAdminServlet, getLoggingForVlogging, getLogListenerCount, getLogListeners, getName, getNameContext, getNucleus, getRef, 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, resolveName, resolveName, resolveName, resolveName, sendLogEvent, setLoggingDebug, setLoggingError, setLoggingInfo, setLoggingTrace, setLoggingWarning, setNucleus, setServiceInfo, startService, stopService
 
Methods inherited from class atg.nucleus.logging.VariableArgumentApplicationLoggingRMIImpl
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.rmi.server.UnicastRemoteObject
clone, exportObject, exportObject, exportObject, unexportObject
 
Methods inherited from class java.rmi.server.RemoteServer
getClientHost, getLog, setLog
 
Methods inherited from class java.rmi.server.RemoteObject
equals, hashCode, toString, toStub
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

CLASS_VERSION

public static final java.lang.String CLASS_VERSION
Class version string

See Also:
Constant Field Values

REQUIRED_DOCUMENT_OUTPUT_PROPERTIES

public static java.lang.String[] REQUIRED_DOCUMENT_OUTPUT_PROPERTIES
The list of output properties required for documents. These are in additional to the REQUIRED_EVERY_ITEM_OUTPUT_PROPERTIES.


REQUIRED_EVERY_ITEM_OUTPUT_PROPERTIES

public static java.lang.String[] REQUIRED_EVERY_ITEM_OUTPUT_PROPERTIES
The list of output properties required for every repository item.


mDocumentSubmitterTL

public static java.lang.ThreadLocal mDocumentSubmitterTL

mJobId

protected int mJobId
the jobId of our scheduled task

Constructor Detail

IndexingOutputConfig

public IndexingOutputConfig()
                     throws java.rmi.RemoteException
constructor

Throws:
java.rmi.RemoteException
Method Detail

setIndexingSynchronizations

public void setIndexingSynchronizations(atg.repository.search.indexing.IndexingSynchronization[] pIndexingSynchronizations)
Set the array of indexing synchronizations.


getIndexingSynchronizations

public atg.repository.search.indexing.IndexingSynchronization[] getIndexingSynchronizations()
Get the array of indexing synchronizations.


getForq

public java.util.Map getForq()

setForq

public void setForq(java.util.Map pMap)

isForceDeleteGenerationsOnBulkLoad

public boolean isForceDeleteGenerationsOnBulkLoad()
Whether to remove all processed generations from the indexing queue on a bulk load


setForceDeleteGenerationsOnBulkLoad

public void setForceDeleteGenerationsOnBulkLoad(boolean pForceDeleteGenerationsOnBulkLoad)
Set to true to remove all processed generations from the indexing queue on a bulk load


getForceIncrementalIndexingFromGeneration

public int getForceIncrementalIndexingFromGeneration()
Whether to force incremental indexing from a particular generation, -1 means disabled. Note: this value will be saved in IncrementalItemQueueRepository for the current config item.


setForceIncrementalIndexingFromGeneration

public void setForceIncrementalIndexingFromGeneration(int pForceIncrementalIndexingFromGeneration)
Set to a positive value to force incremental indexing start from a particular generation, -1 means disabled. Note: this value will be saved in IncrementalItemQueueRepository for the current config item.


setConfigRepositoryItemChangedProcessor

public void setConfigRepositoryItemChangedProcessor(atg.repository.search.indexing.ConfigRepositoryItemChangedProcessor pProcessor)
If provided, this optional component will be called for received repository change event. The component may alter the ConfigRepositoryItemChanged record or return null to prevent the event from being recorded.

Parameters:
pProcessor - the processor component or null

getConfigRepositoryItemChangedProcessor

public atg.repository.search.indexing.ConfigRepositoryItemChangedProcessor getConfigRepositoryItemChangedProcessor()
If provided, this optional component will be called for received repository change event. The component may alter the ConfigRepositoryItemChanged record or return null to prevent the event from being recorded.

Returns:
the item changed processor or null

setSynchronizedRepositories

public void setSynchronizedRepositories(java.util.Map pVal)
Used by functionality that synchronizes CA deployments with indexing to identifiy customization-only type repositories associated with IOC's repository. When any of the repositories+item descriptors configured in this map are involved in a CA deployment, and the IOC's repository is not, causes a special CA Target Name-Customizations indexing job to be invoked. The map should contain absolute repository paths as keys. Values are comma delimited list of item descriptor names in that repository that, when deployed, should trigger the cutomizations job. Alternatively, the list of item descriptor names can be replaced with an asterix (*) to indicate that any changed item descriptor should trigger the indexing job. This property is used only on the CA instance. The repository names must reflect the actual names of the repository. In other words, verioned repository names are not translated into un-versioned repository names.

Parameters:
pVal - A map of absolute repository paths to item descriptor name lists (or an asterix)

getSynchronizedRepositories

public java.util.Map getSynchronizedRepositories()
Used by functionality that synchronizes CA deployments with indexing to identifiy customization-only type repositories associated with IOC's repository. When any of the repositories+item descriptors configured in this map are involved in a CA deployment, and the IOC's repository is not, causes a special CA Target Name-Customizations indexing job to be invoked. The map should contain absolute repository paths as keys. Values are comma delimited list of item descriptor names in that repository that, when deployed, should trigger the cutomizations job. Alternatively, the list of item descriptor names can be replaced with an asterix (*) to indicate that any changed item descriptor should trigger the indexing job. This property is used only on the CA instance. The repository names must reflect the actual names of the repository. In other words, verioned repository names are not translated into un-versioned repository names.

Returns:
A map of absolute repository paths to item descriptor name lists (or an asterix)

setDefinitionFile

public void setDefinitionFile(atg.xml.XMLFile pDefinitionFile)
Sets the property definitionFile.

Parameters:
pDefinitionFile - new value to set

getDefinitionFile

public atg.xml.XMLFile getDefinitionFile()
The indexing output definition file. This XML file determines the hierarchy of RepositoryItems and the properites that will be emitted.

Returns:
The value of the property definitionFile.

getRepository

public Repository getRepository()
Optional override of definition file repository specification. This property allows one to share an indexing output definition file between multiple IOC components, for example, when indexing multiple repositories having the same strucuture but different nucleus paths such as production and staging repositories. If the repository is not specified in this component's configuration file, then the property value represents the repository specified in the XML definition file.

See Also:
getRepositoryItemGroup()

setRepository

public void setRepository(Repository pRepository)
Optional override of definition file repository specification. This property allows one to share an indexing output definition file between multiple IOC components, for example, when indexing multiple repositories having the same strucuture but different nucleus paths such as production and staging repositories. If the repository is not specified in this component's configuration file, then the property value represents the repository specified in the XML definition file.

See Also:
setRepositoryItemGroup(atg.repository.RepositoryItemGroup)

setRepositoryItemGroup

public void setRepositoryItemGroup(RepositoryItemGroup pRepositoryItemGroup)
Optional override for definition file repository-item-group component setting. This property allows one to share an indexing output definition file between multiple IOC components, useful when indexing multiple repositories having the same strucuture but different nucleus paths. For example, when indexing production and staging repositories. If the RepositoryItemGroup is not set in this component's configuration, this property contains the RepositoryItemGroup specified in the XML definition file.

See Also:
setRepository(atg.repository.Repository)

getRepositoryItemGroup

public RepositoryItemGroup getRepositoryItemGroup()
Optional override for definition file repository-item-group component setting. This property allows one to share an indexing output definition file between multiple IOC components, useful when indexing multiple repositories having the same strucuture but different nucleus paths. For example, when indexing production and staging repositories. If the RepositoryItemGroup is not set in this component's configuration, this property contains the RepositoryItemGroup specified in the XML definition file.

See Also:
#getRepositoryPathOverride

setDefaultPropertyAccessorPath

public void setDefaultPropertyAccessorPath(java.lang.String pDefaultPropertyAccessorPath)
Get nucleus path of the default property accessor. This is the property accessor that will be used if no more specific one is specified.


getDefaultPropertyAccessorPath

public java.lang.String getDefaultPropertyAccessorPath()
Get the nucleus path of the default property accessor. This is the property accessor that will be used if no more specific one is specified.


setDefaultPropertyAccessor

public void setDefaultPropertyAccessor(atg.repository.search.indexing.PropertyAccessor pDefaultPropertyAccessor)
Get the default property accessor. This is the property accessor that will be used if no more specific one is specified.


getDefaultPropertyAccessor

public atg.repository.search.indexing.PropertyAccessor getDefaultPropertyAccessor()
Get the default property accessor. This is the property accessor that will be used if no more specific one is specified.


setPropertyAccessorMap

public void setPropertyAccessorMap(ServiceMap pPropertyAccessorMap)
Set propertyAccessorMap... this maps from name to a property accessor.


getPropertyAccessorMap

public ServiceMap getPropertyAccessorMap()
Get propertyAccessorMap... maps from name to a property accessor.


getOutputItemSpecifier

public atg.repository.search.indexing.specifier.OutputItemSpecifier getOutputItemSpecifier()
The output item specifier created from the specified definitionFile.


setBulkLoader

public void setBulkLoader(BulkLoader pBulkLoader)
Set the bulk loader used to bulk (full) index.


getBulkLoader

public BulkLoader getBulkLoader()
Get the bulk loader used to bulk (full) index.


setIncrementalLoader

public void setIncrementalLoader(IncrementalLoader pIncrementalLoader)
Whether to enable to incremental loader at startup.


getIncrementalLoader

public IncrementalLoader getIncrementalLoader()
Whether to enable to incremental loader at startup.


setEnableIncrementalLoading

public void setEnableIncrementalLoading(boolean pEnableIncrementalLoading)
Whether to enabled incremental loading. If this is true, then the incrementalLoader should be set.


isEnableIncrementalLoading

public boolean isEnableIncrementalLoading()
Whether to enabled incremental loading. If this is true, then the incrementalLoader should be set.


setUseConfigurationClaims

public void setUseConfigurationClaims(boolean pUseConfigurationClaims)
Whether to use configuration claims for this component.

Configuration claims are no longer necessary in general since the SearchAdmin now controlls indexing. This should mean that no two IOCs/loaders are ever asked to index the same content in the same content set at the same time. It may be necessary to re-enable configuration claiming (by setting this to true) if indexing work for this component is not initiated by the Search Admin, and especially in cases where multiple ATG instances could initiate the index process for the same configuration.

Parameters:
pUseConfigurationClaims - true if configuration claims are enabled for this component.

isUseConfigurationClaims

public boolean isUseConfigurationClaims()
Whether to use configuration claims for this component.

Configuration claims are no longer necessary in general since the SearchAdmin now controlls indexing. This should mean that no two IOCs/loaders are ever asked to index the same content in the same content set at the same time. It may be necessary to re-enable configuration claiming (by setting this to true) if indexing work for this component is not initiated by the Search Admin, and especially in cases where multiple ATG instances could initiate the index process for the same configuration.

Returns:
true if configuration claims are enabled for this component.

setDocumentSubmitter

public void setDocumentSubmitter(DocumentSubmitter pDocumentSubmitter)
Set the document submitter, used to submit documents to the indexing engine.


getDocumentSubmitter

public DocumentSubmitter getDocumentSubmitter()
Get the document submitter, used to submit documents to the indexing engine.


setDocumentLevelOutputProperties

public void setDocumentLevelOutputProperties(java.lang.String[] pDocumentLevelOutputProperties)
Set the list of output properties that will be added to the document-level item.


getDocumentLevelOutputProperties

public java.lang.String[] getDocumentLevelOutputProperties()
Get the list of output properties that will be added to the document-level item.


setEveryItemOutputProperties

public void setEveryItemOutputProperties(java.lang.String[] pEveryItemOutputProperties)
Set the list of output properties that will be added to every repository item.


getEveryItemOutputProperties

public java.lang.String[] getEveryItemOutputProperties()
Get the list of output properties that will be added to every repository item.


getRequiredEveryItemOutputProperties

public java.lang.String[] getRequiredEveryItemOutputProperties()
Get an array of required output properties for every indexed item.

Returns:
the required output property names

setIncrementalUpdateSeconds

public void setIncrementalUpdateSeconds(int pIncrementalUpdateSeconds)
The number of seconds between incremental updates.


getIncrementalUpdateSeconds

public int getIncrementalUpdateSeconds()
The number of seconds between incremental updates.


setBulkLoadWithRetryMinutes

public void setBulkLoadWithRetryMinutes(int pBulkLoadWithRetryMinutes)
Set the number of minutes to keep trying bulkLoadWithRetry.


getBulkLoadWithRetryMinutes

public int getBulkLoadWithRetryMinutes()
Get the number of minutes to keep trying bulkLoadWithRetry.


setMaxIncrementalChangesPerGeneration

public void setMaxIncrementalChangesPerGeneration(int pMaxIncrementalChangesPerGeneration)
The maximum number of repository item changes to queue up in a single generation.


getMaxIncrementalChangesPerGeneration

public int getMaxIncrementalChangesPerGeneration()
The maximum number of repository item changes to queue up in a single generation.


setMaxIncrementalChanges

public void setMaxIncrementalChanges(int pMaxIncrementalChanges)
The maximum number of incremental changes to accept for a given incremental update before reverting to a bulk load. The default, -1, means there is no maximum.

Parameters:
pMaxIncrementalChanges - The maximum number of incremental changes, or -1 to disabled this feature

getMaxIncrementalChanges

public int getMaxIncrementalChanges()
The maximum number of incremental changes to accept for a given incremental update before reverting to a bulk load. The default, -1, means there is no maximum.

Returns:
The maximum number of incremental changes, or -1 to if this feature is disabled.

setFormatterMap

public void setFormatterMap(ServiceMap pFormatterMap)
Set the formatter map. The formatter map maps from formatter name to a PropertyValueFormatter instance. The name keys here can be used in the "formatter" attribute of the "property" in the definition file.


getFormatterMap

public ServiceMap getFormatterMap()
Get the formatter map. The formatter map maps from formatter name to a PropertyValueFormatter instance. The name keys here can be used in the "formatter" attribute of the "property" in the definition file.


setFilterMap

public void setFilterMap(ServiceMap pFilterMap)
Set the filter map. The filter map maps from filter name to a PropertyValuesFilter instance. The name keys here can be used in the "filter" attribute of the "property" in the definition file.


getFilterMap

public ServiceMap getFilterMap()
Get the filter map. The filter map maps from filter name to a PropertyValuesFilter instance. The name keys here can be used in the "filter" attribute of the "property" in the definition file.


setDefaultFormatter

public void setDefaultFormatter(PropertyFormatter pDefaultFormatter)
Set the default formatter used to format property values.


getDefaultFormatter

public PropertyFormatter getDefaultFormatter()
Get the default formatter used to format property values.


setIterationProducer

public void setIterationProducer(atg.repository.search.indexing.IterationProducer pIterationProducer)
Set the iteration producer.


getIterationProducer

public atg.repository.search.indexing.IterationProducer getIterationProducer()
Get the iteration producer.


setVariantProducers

public void setVariantProducers(atg.repository.search.indexing.VariantProducer[] pVariantProducers)
Set the array of variant producers.


getVariantProducers

public atg.repository.search.indexing.VariantProducer[] getVariantProducers()
Get the array of variant producers.


getTopLevelItemRepository

public Repository getTopLevelItemRepository()
Return the repository that corresponds to the top-level "item" element in the definition file.


getAllOutputPropertyNames

public java.lang.String[] getAllOutputPropertyNames()
Get both the text and meta output property names.


getTextOutputPropertyNames

public java.lang.String[] getTextOutputPropertyNames()
Get both the text output property names.


getMetaOutputPropertyNames

public java.lang.String[] getMetaOutputPropertyNames()
Get both the meta output property names.


setFilterOutDollarOutputPropertyNames

public void setFilterOutDollarOutputPropertyNames(boolean pFilterOutDollarOutputPropertyNames)
Whether to filter out properties containing "$" from the various "outputPropertyName" properties.


isFilterOutDollarOutputPropertyNames

public boolean isFilterOutDollarOutputPropertyNames()
Whether to filter out properties containing "$" from the various "outputPropertyName" properties.


getTextActiveZones

public java.lang.String getTextActiveZones()
Get the text active zones. This property formats textOutputPropertyNames in a format convenient for the query API.


setTargetName

public void setTargetName(java.lang.String pTargetName)
set TargetName

Parameters:
pTargetName - the TargetName

getTargetName

public java.lang.String getTargetName()
get TargetName

Returns:
the TargetName

setUnversionedRepositoryPath

public void setUnversionedRepositoryPath(java.lang.String pUnversionedRepositoryPath)
set UnversionedRepositoryPath

Parameters:
pUnversionedRepositoryPath - the UnversionedRepositoryPath

getUnversionedRepositoryPath

public java.lang.String getUnversionedRepositoryPath()
get UnversionedRepositoryPath

Returns:
the UnversionedRepositoryPath

setVersionedRepositoryPath

public void setVersionedRepositoryPath(java.lang.String pVersionedRepositoryPath)
set VersionedRepositoryPath

Parameters:
pVersionedRepositoryPath - the VersionedRepositoryPath

getVersionedRepositoryPath

public java.lang.String getVersionedRepositoryPath()
get VersionedRepositoryPath

Returns:
the VersionedRepositoryPath

setOnPubServer

public void setOnPubServer(boolean pOnPubServer)
set OnPubServer

Parameters:
pOnPubServer - the OnPubServer

isOnPubServer

public boolean isOnPubServer()
get OnPubServer

Returns:
the OnPubServer

setRmiServer

public void setRmiServer(atg.server.rmi.RmiServer pRmiServer)
set RmiServer

Parameters:
pRmiServer - the RmiServer

getRmiServer

public atg.server.rmi.RmiServer getRmiServer()
get RmiServer

Returns:
the RmiServer

buildUriForRepositoryItem

public java.lang.String buildUriForRepositoryItem(Context pContext,
                                                  Repository pRepository,
                                                  atg.repository.search.indexing.ConfigRepositoryItemChanged pItemChanged)
                                           throws IndexingException
Throws:
IndexingException

getUriForRepositoryItem

public java.lang.String getUriForRepositoryItem(Context pContext,
                                                RepositoryItem pItem)
                                         throws IndexingException
Get a URI for the specified item

Parameters:
pItem - the item
Returns:
the uri
Throws:
IndexingException

shouldOutputDocument

public boolean shouldOutputDocument(Context pContext)
Return true to output document, false to discard it. This method always returns true.

Parameters:
pContext - the context
Returns:
true to submit document, false to discard

indexedItem

public void indexedItem(Context pContext,
                        RepositoryItem pItem)
Notification that specific item has been used to build an indexed document. This method does nothing

Parameters:
pContext - the context
pItem - the repository item

clearIterationState

public void clearIterationState(Context pContext)

generateTestDocument

public java.util.List<java.lang.String> generateTestDocument(java.lang.String pId)
Invoked by the AdminServlet, generates a single output document for the item specified by the ID parameter or returns an error message.

Parameters:
pId - the document level repository item ID

bulkLoad

public atg.repository.search.indexing.BulkLoaderResults bulkLoad()
                                                          throws IndexingException
Perform a bulk load (full index).

Throws:
IndexingException

bulkLoad

public atg.repository.search.indexing.BulkLoaderResults bulkLoad(atg.repository.search.indexing.DocumentSubmitterSession pSession)
                                                          throws IndexingException
Perform a bulk load (full index).

Throws:
IndexingException

postIndexingCleanup

public void postIndexingCleanup(boolean pSuccess,
                                atg.repository.search.indexing.LoaderResults pResults)
                         throws IndexingException
Called to clean up change generation and perform any other post-indexing operations. When invoked via the SearchAdmin, pSuccess indicates the success or failure of the entire indexing process. For example, index deployment and other non-IndexingOutputConfig related operations. If this value is false, then the incremental items processed in the indexing operation associated with pResults should not be deleted because the index will likey need to be regeneraed.

Specified by:
postIndexingCleanup in interface atg.repository.search.indexing.RemoteIndexingOutputConfig
Parameters:
pSuccess - True if the entire indexing process (including index deployment) was successful.
pResults - The result object returned from either a bulk or incremental indexing operation.
Throws:
IndexingException

getAllOutputItemSpecifiers

public static void getAllOutputItemSpecifiers(java.util.List pResults,
                                              atg.repository.search.indexing.specifier.OutputItemSpecifier pSpecifier)
Recursively build list of all OutputItemSpecifier objects

Parameters:
pSpecifier - a specifier
pResults -

getPropertyAccessorToOutputPropertySet

public java.util.Map<atg.repository.search.indexing.PropertyAccessor,java.util.Set<atg.repository.search.indexing.specifier.OutputProperty>> getPropertyAccessorToOutputPropertySet()
Return a map of custom configured property accessor components to the OutputProperty instances that use them. Only explicitly configured PropertyAccessor components are returned, OutputProperty instances that use the default property accessor are not included.

Returns:
a potentially empty map of custom PropertyAccessor to OutputProperty set

getItemDescriptors

public java.util.Set getItemDescriptors()
Get the set of all configured item descriptors

Returns:
the possibly empty set of item descriptors

calculateOutputPropertyNames

protected void calculateOutputPropertyNames()
Calculate the various output properties.


getOutputProperties

protected java.util.List getOutputProperties(java.lang.Boolean pIsMeta)
Get the specified output properties from all the elements of the hierarchy.

Parameters:
pIsMeta - true for meta, false for text, null for both.

calculateOutputPropertyNames

protected java.lang.String[] calculateOutputPropertyNames(java.lang.Boolean pIsMeta)
Calculate the output property names.

Parameters:
pIsMeta - true for meta, false for text, null for both.

incrementallyLoad

public void incrementallyLoad()
Start the incremental loading functionality. This method merely begins tracking and recording of repository changes.


processQueuedIncrementalUpdates

public atg.repository.search.indexing.LoaderResults processQueuedIncrementalUpdates()
                                                                             throws IndexingException
Process any queued incremental updates

Throws:
IndexingException

notifyIndexingInitialization

protected void notifyIndexingInitialization()
                                     throws IndexingException
Notification that an indexing process is about to begin. This method invokes the PropertyAccessor.onIndexingInitialization() method for all custom configured property accessors

Throws:
IndexingException

notifyIndexingTermination

protected void notifyIndexingTermination(atg.repository.search.indexing.LoaderResults pLoaderResults)
                                  throws IndexingException
Notification that an indexing process has completed begin. This method invokes the PropertyAccessor.onIndexingInitialization() method for all custom configured property accessors

Throws:
IndexingException

containsString

protected boolean containsString(java.lang.String pString,
                                 java.lang.String[] pStrings)
Whether the string array pStrings contains the specified string pString.

Returns:
whether pString was found in the specified string array.

validateConfiguration

protected void validateConfiguration()

addValidationMessage

protected java.lang.String[] addValidationMessage(java.lang.String pType,
                                                  java.lang.String pMessage)
Add a validation message to the array of validation messages


getValidationMessages

protected java.util.List<java.lang.String[]> getValidationMessages()
Validate configuration as much as possible


doStartService

public void doStartService()
                    throws ServiceException
Start up the service, parsing the definition file, etc.

Overrides:
doStartService in class GenericRMIService
Throws:
ServiceException - if the Service had a problem starting up

isVersionRepository

public boolean isVersionRepository(java.lang.String pPath)
Return true if component path resolves to a version repository. If resolved value is null or not a version repository, return false.

Returns:
true if version repository, false otherwise

isNonVersionRepository

public boolean isNonVersionRepository(java.lang.String pPath)
Return true if component path resolves to a non-version repository. If resolved value is null or not a non-version repository, return false.

Returns:
true if it's a version repository, false otherwise

getVersionRepositoryPath

public java.lang.String getVersionRepositoryPath(java.lang.String pPath,
                                                 java.util.Map pMap)
Return the path for the version repository represented by either pPath or the key in the map that refers to the value which is equal to pPath. The map associates version repositories to their non-versioned CA deployment target repositories.

Parameters:
pPath - the repository path
pMap - the map of version to non-version repositories
Returns:
the version repository path or null

getNonVersionRepositoryPath

public java.lang.String getNonVersionRepositoryPath(java.lang.String pPath,
                                                    java.util.Map pMap)
Return the path for the non-versinon repository represented by either pPath or the value in the map that's associated with the pPath key. The map associates version repositories to their non-versioned CA deployment target repositories.

Parameters:
pPath - the repository path
pMap - the map of version to non-version repositories
Returns:
the non-version repository path or null

correctRepositoryPath

protected void correctRepositoryPath(atg.repository.search.config.ItemType pType)
correct the repository path to reflect the path of the unversioned repository


exportAsRemoteService

protected void exportAsRemoteService()
export this IndexingOutputConfig as a remote service that can be accessed via the RmiServer


addBasicPropertyAccessors

protected void addBasicPropertyAccessors()
Add in the basic property accessors to the propertyAccessorMap. Adds the firstWithLocale and null property accessor.


addBasicFormatters

protected void addBasicFormatters()
Add in the basic formatters to the formatterMap. For now, just adds the defaultFormatter.


addBasicFilters

protected void addBasicFilters()
Add in the basic filter to the filterMap. For now, just adds the UniqueFilter and ConcatFilter filters as "unique" and "concat" respectively.


jaxbParseFile

protected atg.repository.search.config.ItemType jaxbParseFile()
                                                       throws java.io.IOException,
                                                              atg.xml.XMLFileException,
                                                              javax.xml.bind.JAXBException
Parse the definition and return the jaxb generated item type.

Throws:
java.io.IOException
atg.xml.XMLFileException
javax.xml.bind.JAXBException

getDocumentLevelSpecifiers

public atg.repository.search.indexing.specifier.OutputItemSpecifier[] getDocumentLevelSpecifiers()
Return the document-level specifiers.


addDocumentLevelSpecifiers

protected void addDocumentLevelSpecifiers(atg.repository.search.indexing.specifier.OutputItemSpecifier pSpecifier,
                                          java.util.List pListFound)
Add the the document-level specifier(s) to pListFound.

Parameters:
pSpecifier - the current specifier
pListFound - list of found specifiers

performScheduledTask

public void performScheduledTask(Scheduler pScheduler,
                                 ScheduledJob pJob)
Called by the scheduler when it is time for this service to perform its function.

Specified by:
performScheduledTask in interface Schedulable
Parameters:
pScheduler - the scheduler managing this job
pJob - the scheduled job associated with this service

setScheduler

public void setScheduler(Scheduler pScheduler)
Set property scheduler. Use setBulkScheduler instead of this method.

Parameters:
pScheduler - new value to set

getBulkScheduler

public Scheduler getBulkScheduler()
Get property bulkscheduler. This is the scheduler used for bulk indexing.


setBulkScheduler

public void setBulkScheduler(Scheduler pBulkScheduler)
Set property bulkScheduler. This is the scheduler used for bulk indexing.

Parameters:
pBulkScheduler - new value to set

getBulkSchedule

public Schedule getBulkSchedule()
Get property bulkschedule. This is the schedule used for bulk indexing.


setBulkSchedule

public void setBulkSchedule(Schedule pBulkSchedule)
Set property bulkSchedule. This is the schedule used for bulk indexing.

Parameters:
pBulkSchedule - new value to set

setBulkScheduleConsiderIndexedMinutes

public void setBulkScheduleConsiderIndexedMinutes(int pBulkScheduleConsiderIndexedMinutes)
Set the number of minutes to consider content already indexed for a bulk load.


getBulkScheduleConsiderIndexedMinutes

public int getBulkScheduleConsiderIndexedMinutes()
Get the number of minutes to consider content already indexed for a scheduled bulk load.


setEnableScheduledBulkLoading

public void setEnableScheduledBulkLoading(boolean pEnableScheduledBulkLoading)
Whether scheduled bulk loading is enabled. Note that it will only function if there is a configured schedule, and scheduler, and this property is true.


isEnableScheduledBulkLoading

public boolean isEnableScheduledBulkLoading()
Whether scheduled bulk loading is enabled. Note that it will only function if there is a configured schedule, and scheduler, and this property is true.


setMaxFailuresAllowedForCommitting

public void setMaxFailuresAllowedForCommitting(int pMaxFailuresAllowedForCommitting)
The maximum number of failures allowed when committing a document submitter session.


getMaxFailuresAllowedForCommitting

public int getMaxFailuresAllowedForCommitting()
The maximum number of failures allowed when committing a document submitter session.


startScheduledJob

protected void startScheduledJob()
Just block the startScheduledJob if the bulk scheduler isn't set.


bulkLoadWithRetry

public atg.repository.search.indexing.BulkLoaderResults bulkLoadWithRetry()
                                                                   throws IndexingException
BulkLoad and keep retrying if someone else has currently claimed the configuration.

Parameters:
pDocSubSession - the existing document submitter session. if null, will create a new document submitter session.
Throws:
IndexingException

bulkLoadWithRetry

public atg.repository.search.indexing.BulkLoaderResults bulkLoadWithRetry(atg.repository.search.indexing.DocumentSubmitterSession pDocSubSession)
                                                                   throws IndexingException
BulkLoad and keep retrying if someone else has currently claimed the configuration.

Parameters:
pDocSubSession - the existing document submitter session. if null, will create a new document submitter session.
Throws:
IndexingException

isPeriodicActivityUpdateThreadRunning

public boolean isPeriodicActivityUpdateThreadRunning()
Return true if the periodic activity update thread is running

Returns:
true if running

stopPeriodicActivityUpdateThread

public boolean stopPeriodicActivityUpdateThread()
If the periodic activity update thread is running, terminate it.


shouldIncludeItem

public boolean shouldIncludeItem(Context pContext,
                                 atg.repository.search.indexing.specifier.OutputItemSpecifier pSpecifier,
                                 RepositoryItem pItem)
Whether the specific repository item should be included in the index. The loader calls this method for each repository item as it traverses the hierarchy. This method exists here so that sub-classes of indexing output config can have fine-grained control over which items get included in an index.

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

afterSessionStart

public void afterSessionStart(Context pContext)
                       throws IndexingException
This method is invoked immediately after a DocumentSubmitter session is closed. In this case, we invoke afterSessionStart on each element in our indexingSynchronizations array property.

Specified by:
afterSessionStart in interface atg.repository.search.indexing.IndexingSynchronization
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

public void beforeSessionEnd(Context pContext)
                      throws IndexingException
This method is invoked immediately before a DocumentSubmitter session is closed. In this case, we invoke beforeSessionEnd on each element in our indexingSynchronizations array property.

Specified by:
beforeSessionEnd in interface atg.repository.search.indexing.IndexingSynchronization
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

allowPeriodicIndexing

public boolean allowPeriodicIndexing()
Whether to allow scheduled indexing. Returns true if the DAF.Search.Index module controls when indexing happens.

Returns false, if indexing jobs are started externally (as for search admin).


shouldCommitSession

public boolean shouldCommitSession(Context pContext,
                                   boolean pAtEnd)
Whether the current session should be committed or continued. By default, don't let more than maxFailures be committed. This method is invoked multiple times. If this method returns false, the session is canceled.

Parameters:
pContext - the context for the indexing session
pAtEnd - whether we are just at end.

bulkLoad

public atg.repository.search.indexing.LoaderResults bulkLoad(java.lang.String pSubmitterId,
                                                             java.lang.String pSessionId,
                                                             java.lang.String pCallbackUrl)
                                                      throws java.rmi.RemoteException,
                                                             IndexingException
bulk load

Specified by:
bulkLoad in interface atg.repository.search.indexing.RemoteIndexingOutputConfig
Throws:
java.rmi.RemoteException
IndexingException

processQueuedIncrementalUpdates

public atg.repository.search.indexing.LoaderResults processQueuedIncrementalUpdates(java.lang.String pSubmitterId,
                                                                                    java.lang.String pSessionId,
                                                                                    java.lang.String pCallbackUrl)
                                                                             throws java.rmi.RemoteException,
                                                                                    IndexingException
process queued incremental updates

Specified by:
processQueuedIncrementalUpdates in interface atg.repository.search.indexing.RemoteIndexingOutputConfig
Throws:
java.rmi.RemoteException
IndexingException

cancelBulkLoad

public boolean cancelBulkLoad()
                       throws java.rmi.RemoteException
cancel bulk load

Specified by:
cancelBulkLoad in interface atg.repository.search.indexing.RemoteIndexingOutputConfig
Throws:
java.rmi.RemoteException

cancelIncrementalUpdate

public boolean cancelIncrementalUpdate()
                                throws java.rmi.RemoteException
cancel incremental update

Specified by:
cancelIncrementalUpdate in interface atg.repository.search.indexing.RemoteIndexingOutputConfig
Throws:
java.rmi.RemoteException

getScheduler

public Scheduler getScheduler()
Get property scheduler

Returns:
scheduler

setSchedule

public void setSchedule(Schedule pSchedule)
Set property schedule

Parameters:
pSchedule - new value to set

getSchedule

public Schedule getSchedule()
Get property schedule

Returns:
schedule

setJobName

public void setJobName(java.lang.String pJobName)
Set property jobName

Parameters:
pJobName - new value to set

getJobName

public java.lang.String getJobName()
Get property jobName

Returns:
jobName

setJobDescription

public void setJobDescription(java.lang.String pJobDescription)
Set property jobDescription

Parameters:
pJobDescription - new value to set

getJobDescription

public java.lang.String getJobDescription()
Get property jobDescription

Returns:
jobDescription

setThreadMethod

public void setThreadMethod(int pThreadMethod)
Set property threadMethod

Parameters:
pThreadMethod - new value to set

getThreadMethod

public int getThreadMethod()
Get property threadMethod

Returns:
threadMethod

setTransactional

public void setTransactional(boolean pTransactional)
Sets property Transactional


isTransactional

public boolean isTransactional()
Returns property Transactional


setMaxIndexedItems

public void setMaxIndexedItems(int pMax)
The maximum number of documents to index. Use only for testing, to artifically limit the indexed document count. To use this, set maxNumberProcessItemThreads to 1 to avoid mutli-threaded issues.

A value of zero or less disables this feature.

Parameters:
pMax - the maximum number of documents to index

getMaxIndexedItems

public int getMaxIndexedItems()
The maximum number of documents to index. Use only for testing, to artifically limit the indexed document count. To use this, set maxNumberProcessItemThreads to 1 to avoid mutli-threaded issues. A value of zero or less disables this feature.

Parameters:
pMax - the maximum number of documents to index

setMaxNumberProcessItemThreads

public void setMaxNumberProcessItemThreads(int pMaxNumberProcessItemThreads)
Set the maximum number of process item threads. Any value less than 2 means items will be processed in a single thread.


getMaxNumberProcessItemThreads

public int getMaxNumberProcessItemThreads()
Get the maximum number of process item threads. Any value less than 2 means items will be processed in a single thread.


doStopService

public void doStopService()
                   throws ServiceException
The default implementation is to just stop our scheduled job. Subclasses should override this to perform any extra cleanup they may require.

Overrides:
doStopService in class GenericRMIService
Throws:
ServiceException - if an error occurred during the operation

superStartScheduledJob

protected void superStartScheduledJob()
If we have a scheduler and a schedule and we are not already running start our scheduled job. Subclasses should use this method to start the scheduled job.


stopScheduledJob

protected void stopScheduledJob()
If we have a job running, stop it. Subclasses should use this method to stop the scheduled job.


warnIfMisconfiguredForSearchAdmin

public void warnIfMisconfiguredForSearchAdmin()
Warn if this configuration is misconfigured for SearchAdmin. NOTE: In 2006.3, all indexing was handled via the incremental loader. In 2007.1, the SearchAdmin was introduced and the incremental loader was no longer used. With the introduction of live indexing, we now have two different ways of existing - normal indexing via the Search Admin and live indexing via the incremental loader. However, 2006.3 customers may still have enableScheduleBulkLoading=true and the documentSubmitter set for IOC that are now indexed via the Search Admin. These IOC should set enableIncrementalLoading=false. Only live indexing should set this to true. So we introduced a second enableLiveIndexing flag so we can set enableIncrementalLoading=false unless enableLiveIndexing is set to true. This will avoid cases where the customer forgot to set enableIncrementalLoading=false for non-live indexing IOCs.


executeSynchronizationsOnly

public boolean executeSynchronizationsOnly()
                                    throws IndexingException
Do an incremental update, but only run the synchronizations, do NOT process any queued updates. For 2007.1 and later, this method is only useful for debugging.

Parameters:
pIndexingOutputConfig - the output config whose synchronizations should be executed.
Returns:
true if completed successfully. Return false if the load was canceled.
Throws:
IndexingException

createAdminServlet

protected javax.servlet.Servlet createAdminServlet()
Description copied from class: GenericRMIService
Creates and returns a new Servlet that will administer this service. By default, this creates a ServiceAdminServlet, but subclasses may create their own servlets.

Overrides:
createAdminServlet in class GenericRMIService

performAction

public void performAction()
Implements the PostStartupAction interface. This is where we register this class as a remote interface in the RMIServer registry. We do that here because the RMIServer may not be initialized yet when this classes' doStartService is invoked.

Specified by:
performAction in interface atg.nucleus.PostStartupAction