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.GenericRMIService
                  extended by atg.repository.search.indexing.IndexingOutputConfig
All Implemented Interfaces:
NameContextBindingListener, NameContextElement, NameResolver, AdminableService, ApplicationLogging, ComponentNameResolver, atg.nucleus.PostStartupAction, Service, ServiceListener, IndexingConstants, Schedulable, java.io.Serializable, java.rmi.Remote, java.util.EventListener

public class IndexingOutputConfig
extends GenericRMIService
implements IndexingConstants, Schedulable, 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.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(OutputItemSpecifier pSpecifier, java.util.List pListFound)
          Add the the document-level specifier(s) to pListFound.
 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, ConfigRepositoryItemChanged pItemChanged)
           
 boolean bulkLoad()
          Perform a bulk load (full index).
 boolean bulkLoad(DocumentSubmitterSession pSession)
          Perform a bulk load (full index).
 boolean bulkLoad(java.lang.String pSubmitterId, java.lang.String pSessionId, java.lang.String pCallbackUrl)
          bulk load
 boolean bulkLoadWithRetry()
          BulkLoad and keep retrying if someone else has currently claimed the configuration.
 boolean bulkLoadWithRetry(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(ItemType pType)
          correct the repository path to reflect the path of the unversioned repository
 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
static void getAllOutputItemSpecifiers(java.util.List pResults, 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.
 PropertyFormatter getDefaultFormatter()
          Get the default formatter used to format property values.
 PropertyAccessor getDefaultPropertyAccessor()
          Get 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.
 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.
 ServiceMap getFormatterMap()
          Get the formatter map.
 IncrementalLoader getIncrementalLoader()
          Whether to enable to incremental loader at startup.
 int getIncrementalUpdateMinutes()
          The number of minutes between incremental updates.
 IndexingSynchronization[] getIndexingSynchronizations()
          Get the array of indexing synchronizations.
 java.util.Set getItemDescriptors()
          Get the set of all configured item descriptors
 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 getMaxIncrementalChangesPerGeneration()
          The maximum number of repository item changes to queue up in a single generation.
 java.lang.String[] getMetaOutputPropertyNames()
          Get both the meta output property names.
 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...
 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.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
 VariantProducer[] getVariantProducers()
          Get the array of variant producers.
 java.lang.String getVersionedRepositoryPath()
          get VersionedRepositoryPath
 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 isOnPubServer()
          get OnPubServer
 boolean isTransactional()
          Returns property Transactional
protected  ItemType jaxbParseFile()
          Parse the definition and return the jaxb generated item type.
 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.
 boolean processQueuedIncrementalUpdates()
          Process any queued incremental updates
 boolean 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 setDefaultFormatter(PropertyFormatter pDefaultFormatter)
          Set the default formatter used to format property values.
 void setDefaultPropertyAccessor(PropertyAccessor pDefaultPropertyAccessor)
          Get 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 setFormatterMap(ServiceMap pFormatterMap)
          Set the formatter map.
 void setIncrementalLoader(IncrementalLoader pIncrementalLoader)
          Whether to enable to incremental loader at startup.
 void setIncrementalUpdateMinutes(int pIncrementalUpdateMinutes)
          The number of minutes between incremental updates.
 void setIndexingSynchronizations(IndexingSynchronization[] pIndexingSynchronizations)
          Set the array of indexing synchronizations.
 void setIterationProducer(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 setMaxIncrementalChangesPerGeneration(int pMaxIncrementalChangesPerGeneration)
          The maximum number of repository item changes to queue up in a single generation.
 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 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 setVariantProducers(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, 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.
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.
 void updateActivity()
           
 void warnIfMisconfiguredForSearchAdmin()
          Warn if this configuration is misconfigured for SearchAdmin.
 
Methods inherited from class atg.nucleus.GenericRMIService
addLogListener, createAdminServlet, getAbsoluteName, getAdminServlet, getLogListenerCount, getLogListeners, getName, getNameContext, getNucleus, getRef, getRoot, getServiceConfiguration, getServiceInfo, isLoggingDebug, isLoggingError, isLoggingInfo, isLoggingWarning, isRunning, logDebug, logDebug, logDebug, logError, logError, logError, logInfo, logInfo, logInfo, logWarning, logWarning, logWarning, nameContextElementBound, nameContextElementUnbound, removeLogListener, resolveName, resolveName, resolveName, resolveName, sendLogEvent, setLoggingDebug, setLoggingError, setLoggingInfo, setLoggingWarning, setServiceInfo, startService, stopService
 
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(IndexingSynchronization[] pIndexingSynchronizations)
Set the array of indexing synchronizations.


getIndexingSynchronizations

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


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

setDefaultPropertyAccessor

public void setDefaultPropertyAccessor(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 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 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.


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

setIncrementalUpdateMinutes

public void setIncrementalUpdateMinutes(int pIncrementalUpdateMinutes)
The number of minutes between incremental updates.


getIncrementalUpdateMinutes

public int getIncrementalUpdateMinutes()
The number of minutes 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.


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(IterationProducer pIterationProducer)
Set the iteration producer.


getIterationProducer

public IterationProducer getIterationProducer()
Get the iteration producer.


setVariantProducers

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


getVariantProducers

public 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,
                                                  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)

bulkLoad

public boolean bulkLoad()
                 throws IndexingException
Perform a bulk load (full index).

Throws:
IndexingException

bulkLoad

public boolean bulkLoad(DocumentSubmitterSession pSession)
                 throws IndexingException
Perform a bulk load (full index).

Throws:
IndexingException

getAllOutputItemSpecifiers

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

Parameters:
pSpecifier - a specifier
pResults -

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 boolean processQueuedIncrementalUpdates()
                                        throws IndexingException
Process any queued incremental updates

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.

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

correctRepositoryPath

protected void correctRepositoryPath(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. For now, just adds the firstWithLocale propertya ccessor.


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 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 OutputItemSpecifier[] getDocumentLevelSpecifiers()
Return the document-level specifiers.


addDocumentLevelSpecifiers

protected void addDocumentLevelSpecifiers(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 boolean 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 boolean bulkLoadWithRetry(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

updateActivity

public void updateActivity()
                    throws IndexingException
Throws:
IndexingException

shouldIncludeItem

public boolean shouldIncludeItem(Context pContext,
                                 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.

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.

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 boolean bulkLoad(java.lang.String pSubmitterId,
                        java.lang.String pSessionId,
                        java.lang.String pCallbackUrl)
                 throws java.rmi.RemoteException,
                        IndexingException
bulk load

Throws:
java.rmi.RemoteException
IndexingException

processQueuedIncrementalUpdates

public boolean processQueuedIncrementalUpdates(java.lang.String pSubmitterId,
                                               java.lang.String pSessionId,
                                               java.lang.String pCallbackUrl)
                                        throws java.rmi.RemoteException,
                                               IndexingException
process queued incremental updates

Throws:
java.rmi.RemoteException
IndexingException

cancelBulkLoad

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

Throws:
java.rmi.RemoteException

cancelIncrementalUpdate

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

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


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.


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

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