public class ScriptIndexable extends ScriptRunner implements Indexable, atg.endeca.eacclient.ApplicationScriptRunner
Created: November 28 2011
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
CLASS_VERSION
Class version string
|
java.lang.String |
PROMOTE_CONTENT_SCRIPT_NAME
Script name for promote content.
|
DEFAULT_SLEEP_TIME, PROVISIONING_SERVICE_SUFFIX, SERVICE_SUFFIX
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 |
---|
ScriptIndexable() |
Modifier and Type | Method and Description |
---|---|
boolean |
baselineUpdate()
Execute the EAC script to perform a baseline update.
|
boolean |
cancel(IndexingTask pTask,
boolean pBaseline)
Cancel the currently in-process performBulkLoad or
processQueuedIncrementalUpdates.
|
protected boolean |
checkResult(com.endeca.eac.client.StateType pResult,
java.lang.String pAppName,
java.lang.String pScriptName) |
java.lang.String |
getBaselineScriptName()
Returns property baselineScriptName.
|
java.lang.String |
getEACHost()
Returns property EACHost.
|
int |
getEACPort()
Returns property EACPort.
|
java.util.Set<java.lang.String> |
getIndexingOutputConfigPaths()
Return the set of IndexingOutputConfigs associated with this Indexable.
|
java.lang.String |
getPartialScriptName()
Returns property partialScriptName.
|
java.lang.String |
getReleaseUpdateLockScriptName()
Sets property releaseUpdateLockScriptName.
|
java.lang.String[] |
getScriptsForDefaultApplication()
Return the script IDs for the default application.
|
boolean |
isCancelling()
Returns property cancelling.
|
boolean |
isEnabled()
Returns property enabled.
|
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 |
isSupportsStatusCounts()
Whether this object supports returning/updating status counts.
|
boolean |
mayNeedCleanup()
Whether this task may need cleanup.
|
boolean |
partialUpdate()
Execute the EAC script to perform a partial update.
|
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.
|
boolean |
promoteContent()
Run the promote context script.
|
boolean |
runUpdateScript(java.lang.String pScriptName)
Runs the update script with the given name.
|
void |
setBaselineScriptName(java.lang.String pBaselineScriptName)
Sets property baselineScriptName.
|
void |
setEnabled(boolean pEnabled)
Sets property enabled.
|
void |
setPartialScriptName(java.lang.String pPartialScriptName)
Sets property partialScriptName.
|
void |
setReleaseUpdateLockScriptName(java.lang.String pReleaseUpdateLockScriptName)
Returns property releaseUpdateLockScriptName.
|
calculateEndpointAddress, calculateProvisioningEndpointAddress, doStartService, exec, externalExec, getApplication, getControlLocator, getControlPort, getEACScriptTimeout, getIndexingApplicationConfiguration, getProvisioningLocator, getProvisioningPort, getScriptIdsForApplication, getServiceProtocol, getSleepTime, setEACHost, setEACPort, setEACScriptTimeout, setIndexingApplicationConfiguration, setServiceProtocol, setSleepTime, startScript, stopScript, testExec, testStartWait, waitForScript
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
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 final java.lang.String PROMOTE_CONTENT_SCRIPT_NAME
public void setEnabled(boolean pEnabled)
public boolean isEnabled()
public boolean isCancelling()
public void setBaselineScriptName(java.lang.String pBaselineScriptName)
public java.lang.String getBaselineScriptName()
public void setPartialScriptName(java.lang.String pPartialScriptName)
public java.lang.String getPartialScriptName()
public java.lang.String getReleaseUpdateLockScriptName()
public void setReleaseUpdateLockScriptName(java.lang.String pReleaseUpdateLockScriptName)
public java.lang.String getEACHost()
ScriptRunner
getEACHost
in class ScriptRunner
public int getEACPort()
ScriptRunner
getEACPort
in class ScriptRunner
public atg.repository.search.indexing.BulkLoaderResults performBaselineUpdate(IndexingTask pTask) throws IndexingException
This is called "performBulkLoad" rather than "bulkLoad" so that MultiConfigLoader could implement it.
performBaselineUpdate
in interface Indexable
pTask
- the current indexing task. May be null if notIndexingException
public atg.repository.search.indexing.LoaderResults performPartialUpdate(IndexingTask pTask) throws IndexingException
performPartialUpdate
in interface Indexable
pTask
- the indexing task invoking the update. May be null
if called via another means.IndexingException
public boolean runUpdateScript(java.lang.String pScriptName) throws IndexingException
true
if script succeeded,
that is no essential errors occurred during script run.runUpdateScript
in interface atg.endeca.eacclient.ApplicationScriptRunner
pScriptName
- script name to runtrue
if script succeeded.IndexingException
protected boolean checkResult(com.endeca.eac.client.StateType pResult, java.lang.String pAppName, java.lang.String pScriptName)
public boolean isNeededForIncremental()
isNeededForIncremental
in interface Indexable
public void postIndexingCleanup(IndexingTask pTask, boolean pSuccess, atg.repository.search.indexing.LoaderResults pResults) throws IndexingException
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.IndexingException
public boolean mayNeedCleanup()
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()
isSupportsStatusCounts
in interface Indexable
public java.util.Set<java.lang.String> getIndexingOutputConfigPaths()
getIndexingOutputConfigPaths
in interface Indexable
public boolean isForceToBaseline()
isForceToBaseline
in interface Indexable
true
if the job should be forced to baseline.public java.lang.String[] getScriptsForDefaultApplication() throws java.rmi.RemoteException, javax.xml.rpc.ServiceException
java.rmi.RemoteException
javax.xml.rpc.ServiceException
public boolean promoteContent() throws IndexingException
promoteContent
in interface atg.endeca.eacclient.ApplicationScriptRunner
IndexingException
- if there was a communication problem
or other unexpected issue invoking promote content.public boolean baselineUpdate() throws IndexingException
IndexingException
public boolean partialUpdate() throws IndexingException
IndexingException