atg.endeca.index
Class DynamicPropertySchemaSynchronization

java.lang.Object
  extended by atg.nucleus.logging.VariableArgumentApplicationLoggingImpl
      extended by atg.nucleus.GenericService
          extended by atg.endeca.index.DynamicPropertySchemaSynchronization
All Implemented Interfaces:
atg.naming.AbsoluteNameable, NameContextBindingListener, NameContextElement, atg.naming.NameContextParentable, NameResolver, AdminableService, atg.nucleus.Configured, ApplicationLogging, atg.nucleus.logging.ApplicationLoggingSender, atg.nucleus.logging.TraceApplicationLogging, VariableArgumentApplicationLogging, ComponentNameResolver, Service, ServiceListener, atg.repository.search.indexing.IndexingSynchronization, java.util.EventListener

public class DynamicPropertySchemaSynchronization
extends GenericService
implements atg.repository.search.indexing.IndexingSynchronization

A synchronization that tracks dynamic properties generated in an indexing run (via the ProcessingPropertiesCallback interface), then submits schema entries for those properties a SchemaGenerator.

Created: January 25 2012


Nested Class Summary
static class DynamicPropertySchemaSynchronization.DynamicOutputPropertyInfo
          A class that to track dynamic output property info.
 
Field Summary
static java.lang.String ATTR_DYNAMIC_PROPERTIES
          The context attribute used to store dynamic properties.
static java.lang.String CLASS_VERSION
          Class version string from source code control system.
 
Fields inherited from class atg.nucleus.GenericService
SERVICE_INFO_KEY
 
Fields inherited from interface atg.nucleus.logging.TraceApplicationLogging
DEFAULT_LOG_TRACE_STATUS
 
Fields inherited from interface atg.nucleus.logging.ApplicationLogging
DEFAULT_LOG_DEBUG_STATUS, DEFAULT_LOG_ERROR_STATUS, DEFAULT_LOG_INFO_STATUS, DEFAULT_LOG_WARNING_STATUS
 
Constructor Summary
DynamicPropertySchemaSynchronization()
           
 
Method Summary
 void afterSessionStart(atg.repository.search.indexing.Context pContext)
          This method is invoked immediately after a DocumentSubmitter session is started.
 void beforeSessionEnd(atg.repository.search.indexing.Context pContext)
          This method is invoked immediately before a DocumentSubmitter session is closed.
 void doStartService()
          This is called after a Service has been created, placed into the naming hierarchy, and initialized with its configured property values.
 atg.repository.search.indexing.DocumentSubmitter getDocumentSubmitter()
          Returns property documentSubmitter.
 java.util.Map<java.lang.String,java.lang.String> getEveryDynamicSchemaRecordProperties()
          Returns property everyDynamicSchemaRecordProperties.
protected  java.util.List<atg.repository.search.indexing.specifier.OutputProperty> getOutputPropertiesForLocale(java.util.Collection<DynamicPropertySchemaSynchronization.DynamicOutputPropertyInfo> pInfos, java.util.Locale pLocale)
          Return the list of output properties associated with the specified locale.
 SchemaExporter getSchemaExporter()
          Returns property schemaExporter.
 java.lang.String getSchemaExporterPath()
          Returns property schemaExporterPath.
protected  void modifyRecords(java.util.List<atg.repository.search.indexing.specifier.OutputProperty> pSourceProperties, Records pRecords, java.util.Locale pLocale)
          Make any modify the records generated by the specified locale.
 void processingProperties(atg.repository.search.indexing.Context pContext, RepositoryItem pItem, atg.repository.search.indexing.specifier.OutputItemSpecifier pSpecifier, atg.repository.search.indexing.specifier.OutputProperty[] pProperties, boolean pIsMeta, java.util.Map<atg.repository.search.indexing.specifier.OutputProperty,java.lang.Object> pGeneratorMap)
           
 void setEveryDynamicSchemaRecordProperties(java.util.Map<java.lang.String,java.lang.String> pEveryDynamicSchemaRecordProperties)
          Sets property everyDynamicSchemaRecordProperties.
 void setSchemaExporter(SchemaExporter pSchemaExporter)
          Sets property schemaExporter.
 void setSchemaExporterPath(java.lang.String pSchemaExporterPath)
          Sets property schemaExporterPath.
 
Methods inherited from class atg.nucleus.GenericService
addLogListener, createAdminServlet, doStopService, getAbsoluteName, getAdminServlet, getAdminServletOutputStreamEncoding, getLoggingForVlogging, getLogListenerCount, getLogListeners, getName, getNameContext, getNucleus, getRoot, getServiceConfiguration, getServiceInfo, isAdminServletUseServletOutputStream, isLoggingDebug, isLoggingError, isLoggingInfo, isLoggingTrace, isLoggingWarning, isRunning, logDebug, logDebug, logDebug, logError, logError, logError, logInfo, logInfo, logInfo, logTrace, logTrace, logTrace, logWarning, logWarning, logWarning, nameContextElementBound, nameContextElementUnbound, removeLogListener, reResolveThis, resolveName, resolveName, resolveName, resolveName, sendLogEvent, setAdminServletOutputStreamEncoding, setAdminServletUseServletOutputStream, setLoggingDebug, setLoggingError, setLoggingInfo, setLoggingTrace, setLoggingWarning, setNucleus, setServiceInfo, startService, stopService
 
Methods inherited from class atg.nucleus.logging.VariableArgumentApplicationLoggingImpl
vlogDebug, vlogDebug, vlogDebug, vlogDebug, vlogDebugTrace, vlogError, vlogError, vlogError, vlogError, vlogInfo, vlogInfo, vlogInfo, vlogInfo, vlogTrace, vlogTrace, vlogTrace, vlogTrace, vlogWarning, vlogWarning, vlogWarning, vlogWarning
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CLASS_VERSION

public static final java.lang.String CLASS_VERSION
Class version string from source code control system.

See Also:
Constant Field Values

ATTR_DYNAMIC_PROPERTIES

public static final java.lang.String ATTR_DYNAMIC_PROPERTIES
The context attribute used to store dynamic properties.

See Also:
Constant Field Values
Constructor Detail

DynamicPropertySchemaSynchronization

public DynamicPropertySchemaSynchronization()
Method Detail

setEveryDynamicSchemaRecordProperties

public void setEveryDynamicSchemaRecordProperties(java.util.Map<java.lang.String,java.lang.String> pEveryDynamicSchemaRecordProperties)
Sets property everyDynamicSchemaRecordProperties. Properties to add to each dynamically generated schema record.


getEveryDynamicSchemaRecordProperties

public java.util.Map<java.lang.String,java.lang.String> getEveryDynamicSchemaRecordProperties()
Returns property everyDynamicSchemaRecordProperties. Properties to add to each dynamically generated schema record.


getDocumentSubmitter

public atg.repository.search.indexing.DocumentSubmitter getDocumentSubmitter()
Returns property documentSubmitter. The document submitter to use for exporting the schema.


setSchemaExporter

public void setSchemaExporter(SchemaExporter pSchemaExporter)
Sets property schemaExporter. The schema exporter to use.


getSchemaExporter

public SchemaExporter getSchemaExporter()
Returns property schemaExporter. The schema exporter to use.


setSchemaExporterPath

public void setSchemaExporterPath(java.lang.String pSchemaExporterPath)
Sets property schemaExporterPath. Path to the schema exporter. Will be resolved after startup if schemaExport is not set explicitly.


getSchemaExporterPath

public java.lang.String getSchemaExporterPath()
Returns property schemaExporterPath. Path to the schema exporter. Will be resolved after startup if schemaExport is not set explicitly.


afterSessionStart

public void afterSessionStart(atg.repository.search.indexing.Context pContext)
                       throws atg.repository.search.indexing.IndexingException
This method is invoked immediately after a DocumentSubmitter session is started.

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:
atg.repository.search.indexing.IndexingException

beforeSessionEnd

public void beforeSessionEnd(atg.repository.search.indexing.Context pContext)
                      throws atg.repository.search.indexing.IndexingException
This method is invoked immediately before a DocumentSubmitter session is closed.

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:
atg.repository.search.indexing.IndexingException

modifyRecords

protected void modifyRecords(java.util.List<atg.repository.search.indexing.specifier.OutputProperty> pSourceProperties,
                             Records pRecords,
                             java.util.Locale pLocale)
Make any modify the records generated by the specified locale.


getOutputPropertiesForLocale

protected java.util.List<atg.repository.search.indexing.specifier.OutputProperty> getOutputPropertiesForLocale(java.util.Collection<DynamicPropertySchemaSynchronization.DynamicOutputPropertyInfo> pInfos,
                                                                                                               java.util.Locale pLocale)
Return the list of output properties associated with the specified locale.


processingProperties

public void processingProperties(atg.repository.search.indexing.Context pContext,
                                 RepositoryItem pItem,
                                 atg.repository.search.indexing.specifier.OutputItemSpecifier pSpecifier,
                                 atg.repository.search.indexing.specifier.OutputProperty[] pProperties,
                                 boolean pIsMeta,
                                 java.util.Map<atg.repository.search.indexing.specifier.OutputProperty,java.lang.Object> pGeneratorMap)

doStartService

public void doStartService()
                    throws ServiceException
Description copied from class: GenericService
This is called after a Service has been created, placed into the naming hierarchy, and initialized with its configured property values. The Service should override this method to start any processes it requires.

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