public abstract class PerApplicationExporter extends GenericService implements atg.endeca.index.IndexableSetIndexables
Created: November 16 2011
Modifier and Type | Class and Description |
---|---|
static class |
PerApplicationExporter.MinimalBulkLoaderResults
Extends BulkLoaderResults with a minimal implementation that
accepts a boolean "successful" flag..
|
static class |
PerApplicationExporter.MinimalIncrementalLoaderResults
Extends IncrementalLoaderResults with a minimal implementation.
|
static interface |
PerApplicationExporter.RecordsSubmittedPostProcessor<T extends PerApplicationExporter>
An interface for receiving notifications of records submitted
after they were successfully submmitted.
|
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
CLASS_VERSION
Class version string
|
static java.lang.String |
TEST_GENERATION_CONTEXT_ATTRIBUTE
A context attribute that is set if we are generating test
XML.
|
SERVICE_INFO_KEY
DEFAULT_LOG_TRACE_STATUS
DEFAULT_LOG_DEBUG_STATUS, DEFAULT_LOG_ERROR_STATUS, DEFAULT_LOG_INFO_STATUS, DEFAULT_LOG_WARNING_STATUS
Constructor and Description |
---|
PerApplicationExporter() |
Modifier and Type | Method and Description |
---|---|
protected void |
afterRecordSubmits(EndecaContext pContext,
IndexingTask pTask,
Records pRecords)
Do any processing post submitting records for an application.
|
protected void |
beforeSessionEnd(boolean bSuccess)
Called just before we end or cancel a session.
|
boolean |
cancel(IndexingTask pTask,
boolean pBaseline)
Cancel the currently in-process performBulkLoad or
processQueuedIncrementalUpdates.
|
protected javax.servlet.Servlet |
createAdminServlet()
Creates and returns a new Servlet that will administer this
service.
|
protected EndecaContext |
createContext()
Create the context to use.
|
protected abstract Records |
createExportRecords(EndecaContext pContext,
java.util.Locale pLocale)
Create the export records for the specified locale.
|
java.lang.String |
createExportRecordsAsXML()
Return the set of export records for the default Locale in XML form.
|
void |
doStartService()
This is called after a Service has been created, placed into the
naming hierarchy, and initialized with its configured property
values.
|
protected void |
export(IndexingTask pTask)
Generate and export records via our DocumentSubmitter.
|
void |
exportRecords(Records pRecords,
IndexingTask pTask,
EndecaContext pContext)
Export the schema using the specified DocumentSubmitterSession.
|
java.lang.String |
getApplicationKeyFromContext(Context pContext)
Return the current application key for the specified indexing context.
|
java.lang.String |
getDefaultLanguageForRecordStores()
Returns property mDefaultLanguageForRecordStores.
|
DocumentSubmitter |
getDocumentSubmitter()
Returns property documentSubmitter.
|
atg.endeca.index.configuration.IndexingApplicationConfiguration |
getIndexingApplicationConfiguration()
Returns property indexingApplicationConfiguration.
|
EndecaIndexingOutputConfig |
getIndexingOutputConfig()
Returns property indexingOutputConfig.
|
java.util.Set<java.lang.String> |
getIndexingOutputConfigPaths()
Return the set of IndexingOutputConfigs associated with this Indexable.
|
java.util.Locale[] |
getLocales()
Returns property locales.
|
PerApplicationExporter.RecordsSubmittedPostProcessor[] |
getRecordsSubmittedPostProcessors()
Returns property recordsSubmittedPostProcessors.
|
protected java.lang.String |
getXmlOutputTitle()
Return the text string used as the title for the XML output in
the HTML admin.
|
protected void |
initContext(EndecaContext pContext,
IndexingTask pTask,
atg.repository.search.indexing.DocumentSubmitterSession pSession,
java.util.Locale pLocale)
Initialize the specified context object, using
the passed in parameters.
|
boolean |
isEchoRecordsToStdout()
Returns property echoRecordsToStdout.
|
protected boolean |
isEndecaDimensionProperty(atg.repository.search.indexing.specifier.OutputProperty pProperty)
Return whether the specified property is an Endeca dimension property.
|
boolean |
isForceToBaseline()
The method is called before starting partial indexing job for all Indexable
to allow forcing the job to baseline indexing.
|
boolean |
isNeededForIncremental()
Whether this Indexable is needed for an incremental update.
|
boolean |
isSingleLanguageOverride()
Whether or not we are saving things to a single language
record store, regardless of locale.
|
boolean |
isSupportsStatusCounts()
Whether this object supports returning/updating status counts.
|
boolean |
mayNeedCleanup()
Whether this task may need cleanup.
|
atg.repository.search.indexing.BulkLoaderResults |
performBaselineUpdate(IndexingTask pTask)
Do a full/bulk load.
|
atg.repository.search.indexing.LoaderResults |
performPartialUpdate(IndexingTask pTask)
Do an incremental load (that is, process any Queued incremental
updates.
|
void |
postIndexingCleanup(IndexingTask pTask,
boolean pSuccess,
atg.repository.search.indexing.LoaderResults pResults)
Perform any post indexing cleanup.
|
protected void |
restoreDynamoRequestLocale(java.lang.Object pRestoreValue)
Restore the current dynamo request locale.
|
void |
setDefaultLanguageForRecordStores(java.lang.String pDefaultLanguageForRecordStores)
Sets property mDefaultLanguageForRecordStores.
|
void |
setDocumentSubmitter(DocumentSubmitter pDocumentSubmitter)
Sets property documentSubmitter.
|
protected java.lang.Object |
setDynamoRequestLocale(java.util.Locale pLocale)
Set the current dynamo request locale, possibly setting a
fake current local request.
|
void |
setEchoRecordsToStdout(boolean pEchoRecordsToStdout)
Sets property echoRecordsToStdout.
|
void |
setIndexables(Indexable[] pIndexables) |
void |
setIndexingApplicationConfiguration(atg.endeca.index.configuration.IndexingApplicationConfiguration pIndexingApplicationConfiguration)
Sets property indexingApplicationConfiguration.
|
void |
setIndexingOutputConfig(EndecaIndexingOutputConfig pIndexingOutputConfig)
Sets property indexingOutputConfig.
|
void |
setRecordsSubmittedPostProcessors(PerApplicationExporter.RecordsSubmittedPostProcessor[] pRecordsSubmittedPostProcessors)
Sets property recordsSubmittedPostProcessors.
|
addLogListener, doStopService, getAbsoluteName, getAdminServlet, getAdminServletOutputStreamEncoding, getLoggingForVlogging, getLogListenerCount, getLogListeners, getName, getNameContext, getNucleus, getRoot, getServiceConfiguration, getServiceInfo, isAdminServletUseServletOutputStream, isLoggingDebug, isLoggingError, isLoggingInfo, isLoggingTrace, isLoggingWarning, isRunning, logDebug, logDebug, logDebug, logError, logError, logError, logInfo, logInfo, logInfo, logTrace, logTrace, logTrace, logWarning, logWarning, logWarning, nameContextElementBound, nameContextElementUnbound, removeLogListener, reResolveThis, resolveName, resolveName, resolveName, resolveName, sendLogEvent, setAdminServletOutputStreamEncoding, setAdminServletUseServletOutputStream, setLoggingDebug, setLoggingError, setLoggingInfo, setLoggingTrace, setLoggingWarning, setNucleus, setServiceInfo, startService, stopService
vlogDebug, vlogDebug, vlogDebug, vlogDebug, vlogDebugTrace, vlogError, vlogError, vlogError, vlogError, vlogInfo, vlogInfo, vlogInfo, vlogInfo, vlogTrace, vlogTrace, vlogTrace, vlogTrace, vlogWarning, vlogWarning, vlogWarning, vlogWarning
public static java.lang.String CLASS_VERSION
public static final java.lang.String TEST_GENERATION_CONTEXT_ATTRIBUTE
public void setDefaultLanguageForRecordStores(java.lang.String pDefaultLanguageForRecordStores)
public java.lang.String getDefaultLanguageForRecordStores()
public boolean isSingleLanguageOverride()
public java.util.Locale[] getLocales()
public void setIndexingApplicationConfiguration(atg.endeca.index.configuration.IndexingApplicationConfiguration pIndexingApplicationConfiguration)
@NotNull public atg.endeca.index.configuration.IndexingApplicationConfiguration getIndexingApplicationConfiguration()
public void setEchoRecordsToStdout(boolean pEchoRecordsToStdout)
public boolean isEchoRecordsToStdout()
public void setDocumentSubmitter(DocumentSubmitter pDocumentSubmitter)
@NotNull public DocumentSubmitter getDocumentSubmitter()
public void setIndexingOutputConfig(EndecaIndexingOutputConfig pIndexingOutputConfig)
public EndecaIndexingOutputConfig getIndexingOutputConfig()
public void setRecordsSubmittedPostProcessors(PerApplicationExporter.RecordsSubmittedPostProcessor[] pRecordsSubmittedPostProcessors)
public PerApplicationExporter.RecordsSubmittedPostProcessor[] getRecordsSubmittedPostProcessors()
protected void export(IndexingTask pTask) throws IndexingException
pTask
- the current indexing task. May be null if
there is no current IndexingTask.IndexingException
protected void beforeSessionEnd(boolean bSuccess)
pSuccess
- protected EndecaContext createContext()
protected void initContext(EndecaContext pContext, IndexingTask pTask, atg.repository.search.indexing.DocumentSubmitterSession pSession, java.util.Locale pLocale)
pContext
- the context to initializepTask
- our indexing taskpSession
- our document submitter sessionpLocale
- the locale to use for the current document locale.public void exportRecords(Records pRecords, IndexingTask pTask, EndecaContext pContext) throws IndexingException
pRecords
- the records to export. If null, will generate
records using createExportRecords().pTask
- the current indexing task. May be null
if called outside of an IndexingPhase.pContext
- the EndecaContext to use. Must have a session on it.IndexingException
- if there's a problemprotected void afterRecordSubmits(EndecaContext pContext, IndexingTask pTask, Records pRecords) throws IndexingException
pRecords
- the records that were exported.pTask
- the current indexing task. May be null
if called outside of an IndexingPhase.pContext
- the EndecaContext to use. Must have a session on it.IndexingException
public java.lang.String getApplicationKeyFromContext(Context pContext)
pContext
- the indexing context.protected abstract Records createExportRecords(EndecaContext pContext, java.util.Locale pLocale) throws IndexingException
pContext
- the current indexing context.pLocale
- to locale for which to generate records.IndexingException
- if there is a problempublic atg.repository.search.indexing.LoaderResults performPartialUpdate(IndexingTask pTask) throws IndexingException
Indexable
performPartialUpdate
in interface Indexable
pTask
- the indexing task invoking the update. May be null
if called via another means.IndexingException
public atg.repository.search.indexing.BulkLoaderResults performBaselineUpdate(IndexingTask pTask) throws IndexingException
Indexable
This is called "performBulkLoad" rather than "bulkLoad" so that MultiConfigLoader could implement it.
performBaselineUpdate
in interface Indexable
pTask
- the indexing task invoking the update. May be null
if called via another means.IndexingException
public boolean isNeededForIncremental()
Indexable
isNeededForIncremental
in interface Indexable
public void postIndexingCleanup(IndexingTask pTask, boolean pSuccess, atg.repository.search.indexing.LoaderResults pResults)
Indexable
postIndexingCleanup
in interface Indexable
pTask
- the current indexing task, if any.pSuccess
- true if we are cleaning up from a successful index,
false otherwise.pResults
- the loader results (if any) returns from
performBaselineUpdate and performPartialUpdate.public boolean mayNeedCleanup()
Indexable
mayNeedCleanup
in interface Indexable
public boolean cancel(IndexingTask pTask, boolean pBaseline) throws IndexingException
Indexable
cancel
in interface Indexable
pBaseline
- true if this is a baseline/full index, false if
this is an incremental/partial index.IndexingException
public boolean isSupportsStatusCounts()
Indexable
isSupportsStatusCounts
in interface Indexable
public void doStartService() throws ServiceException
GenericService
doStartService
in class GenericService
ServiceException
- if the Service had a problem starting upprotected java.lang.Object setDynamoRequestLocale(java.util.Locale pLocale)
pLocale
- the locale to set.protected void restoreDynamoRequestLocale(java.lang.Object pRestoreValue)
pRestoreValue
- the restore value returned by setDynamoRequestLocale.public java.lang.String createExportRecordsAsXML() throws IndexingException
IndexingException
- if a problem occurredpublic java.util.Set<java.lang.String> getIndexingOutputConfigPaths()
Indexable
getIndexingOutputConfigPaths
in interface Indexable
public boolean isForceToBaseline()
isForceToBaseline
in interface Indexable
true
if the job should be forced to baseline.protected javax.servlet.Servlet createAdminServlet()
GenericService
createAdminServlet
in class GenericService
public void setIndexables(Indexable[] pIndexables)
setIndexables
in interface atg.endeca.index.IndexableSetIndexables
protected java.lang.String getXmlOutputTitle()
protected boolean isEndecaDimensionProperty(atg.repository.search.indexing.specifier.OutputProperty pProperty)
true
if the property is "storeAsDocset", "storeAsCollection",
or "storeAsMetaIndex."