|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object atg.nucleus.logging.VariableArgumentApplicationLoggingImpl atg.nucleus.GenericService atg.endeca.index.LocaledExporter
public abstract class LocaledExporter
A base class that needs to export items by locale. Handles most of the setup/teardown of the submitter session. Appropriate for exporters that generate a relatively small number of records to be exported, since it assumes that a single Records object will hold all records comfortably in memory.
Created: November 16 2011
Nested Class Summary | |
---|---|
static class |
LocaledExporter.MinimalBulkLoaderResults
Extends BulkLoaderResults with a minimal implemental that accepts a boolean "successful" flag.. |
static class |
LocaledExporter.MinimalIncrementalLoaderResults
Extends IncrementalLoaderResults with a minimal implementation. |
Field Summary | |
---|---|
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 | |
---|---|
LocaledExporter()
|
Method Summary | |
---|---|
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. |
protected Records |
createExportRecordsForLocale(java.util.Locale pLocale)
Create the set of export records for the default Locale. |
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 the schema via our DocumentSubmitter. |
void |
export(IndexingTask pTask,
java.util.Locale pLocale,
atg.repository.search.indexing.DocumentSubmitterSession pSession)
Export the schema using the specified DocumentSubmitterSession. |
void |
exportRecords(Records pRecords,
IndexingTask pTask,
java.util.Locale pLocale,
atg.repository.search.indexing.DocumentSubmitterSession pSession)
Export the schema using the specified DocumentSubmitterSession. |
java.lang.String |
getDefaultLanguageForRecordStores()
Returns property mDefaultLanguageForRecordStores. |
atg.repository.search.indexing.DocumentSubmitter |
getDocumentSubmitter()
Returns property documentSubmitter. |
Records |
getExportRecordsForDefaultLocale()
Return the export records for the default Locale. |
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. |
protected void |
initContext(EndecaContext pContext,
IndexingTask pTask,
atg.repository.search.indexing.DocumentSubmitterSession pSession,
java.util.Locale pLocale)
Initialize the specified context object. |
boolean |
isNeededForIncremental()
Whether this Indexable is needed for an incremental update. |
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(atg.repository.search.indexing.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 |
setIndexingOutputConfig(EndecaIndexingOutputConfig pIndexingOutputConfig)
Sets property indexingOutputConfig. |
void |
setLocales(java.util.Locale[] pLocales)
Sets property locales. |
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 |
---|
public static final java.lang.String CLASS_VERSION
Constructor Detail |
---|
public LocaledExporter()
Method Detail |
---|
public void setLocales(java.util.Locale[] pLocales)
public java.util.Locale[] getLocales()
public void setDefaultLanguageForRecordStores(java.lang.String pDefaultLanguageForRecordStores)
public java.lang.String getDefaultLanguageForRecordStores()
public void setDocumentSubmitter(atg.repository.search.indexing.DocumentSubmitter pDocumentSubmitter)
public atg.repository.search.indexing.DocumentSubmitter getDocumentSubmitter()
public void setIndexingOutputConfig(EndecaIndexingOutputConfig pIndexingOutputConfig)
public EndecaIndexingOutputConfig getIndexingOutputConfig()
protected void export(IndexingTask pTask) throws atg.repository.search.indexing.IndexingException
pTask
- the current indexing task. May be null if
there is no current IndexingTask.
atg.repository.search.indexing.IndexingException
protected EndecaContext createContext()
protected void initContext(EndecaContext pContext, IndexingTask pTask, atg.repository.search.indexing.DocumentSubmitterSession pSession, java.util.Locale pLocale)
public void export(IndexingTask pTask, java.util.Locale pLocale, atg.repository.search.indexing.DocumentSubmitterSession pSession) throws atg.repository.search.indexing.IndexingException
pTask
- the current indexing task. May be null
if called outside of an IndexingPhase.pLocale
- the locale in which to export the schema.pSession
- the document submitter session to use.
atg.repository.search.indexing.IndexingException
public void exportRecords(Records pRecords, IndexingTask pTask, java.util.Locale pLocale, atg.repository.search.indexing.DocumentSubmitterSession pSession) throws atg.repository.search.indexing.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.pLocale
- the locale in which to export the schema.pSession
- the document submitter session to use.
atg.repository.search.indexing.IndexingException
protected abstract Records createExportRecords(EndecaContext pContext, java.util.Locale pLocale) throws atg.repository.search.indexing.IndexingException
pContext
- the current indexing context.pLocale
- to locale for which to generate records.
atg.repository.search.indexing.IndexingException
public atg.repository.search.indexing.LoaderResults performPartialUpdate(IndexingTask pTask) throws atg.repository.search.indexing.IndexingException
Indexable
performPartialUpdate
in interface Indexable
pTask
- the indexing task invoking the update. May be null
if called via another means.
atg.repository.search.indexing.IndexingException
public atg.repository.search.indexing.BulkLoaderResults performBaselineUpdate(IndexingTask pTask) throws atg.repository.search.indexing.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.
atg.repository.search.indexing.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 atg.repository.search.indexing.IndexingException
Indexable
cancel
in interface Indexable
pBaseline
- true if this is a baseline/full index, false if
this is an incremental/partial index.
atg.repository.search.indexing.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 Records getExportRecordsForDefaultLocale() throws atg.repository.search.indexing.IndexingException
atg.repository.search.indexing.IndexingException
protected Records createExportRecordsForLocale(java.util.Locale pLocale) throws atg.repository.search.indexing.IndexingException
atg.repository.search.indexing.IndexingException
public java.lang.String createExportRecordsAsXML() throws atg.repository.search.indexing.IndexingException
atg.repository.search.indexing.IndexingException
public java.util.Set<java.lang.String> getIndexingOutputConfigPaths()
Indexable
getIndexingOutputConfigPaths
in interface Indexable
protected javax.servlet.Servlet createAdminServlet()
GenericService
createAdminServlet
in class GenericService
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |