|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.endeca.soleng.eac.toolkit.base.EacElement com.endeca.soleng.eac.toolkit.base.Provisionable com.endeca.soleng.eac.toolkit.component.CustomComponent com.endeca.eac.toolkit.component.cas.ContentAcquisitionServerComponent
public class ContentAcquisitionServerComponent
This custom component represents a Content Acquisition System Server. It exposes methods for executing CAS crawls using the CAS Server. Crawls must be configured externally, and this component does not provide utilities for provisioning new crawls and changing the configuration of an existing crawl. Execution of commands against a non-existent crawl will fail with an exception. It is expected that developers will use an external tool or the CAS console to create and manage configuration of crawls. Though this is "provisioned" like a component in the app configuration, this object's provisioning is stored as a set of custom properties (key value pairs) on the provisioned host on which this component runs.
Field Summary |
---|
Fields inherited from class com.endeca.soleng.eac.toolkit.base.EacElement |
---|
appName, dataPrefix, eacHost, eacPort, elementId, lockManager, logDir, sslEnabled, workingDir |
Constructor Summary | |
---|---|
ContentAcquisitionServerComponent()
Constructor for the Config Manager custom component. |
Method Summary | |
---|---|
void |
checkCasVersion()
This method checks the version of the CAS server (as reported by a service call to the CAS web service) against the expected version defined when this class was built. |
void |
checkCrawlCompletedSuccessfully(String crawlName)
Checks whether or not the given crawl has completed successfully. |
void |
cleanOutputDir(String crawlName)
Cleans the crawl's output directory (specified in the crawl configuration, usually through the CAS Console), removing any files in that directory that match the naming convention used by this component. |
void |
clearCrawlOutputFromDir(String crawlName,
boolean isIncrementalCrawl,
String hostId,
String targetDir)
Deletes files associated with the specified crawl from the specified directory. |
void |
clearFullCrawlOutputFromDestinationDir(String crawlName)
Convenience method to invoke clearCrawlOutputFromDestinationDir method with the isIncrementalCrawl argument set to false. |
void |
clearIncrementalCrawlOutputFromDestinationDir(String crawlName)
Convenience method to invoke clearCrawlOutputFromDestinationDir method with the isIncrementalCrawl argument set to true. |
void |
copyBaselineCrawlOutputToDestinationDir(String crawlName)
Convenience method to invoke copyCrawlOutputToDestinationDir method with the isIncrementalCrawl argument set to false. |
void |
copyCrawlOutputToDestinationDir(String crawlName,
boolean isIncrementalCrawl)
This method is expected to be used in conjunction with the renameCrawlOutput method, as it assumes the naming convention created by that method. |
void |
copyIncrementalCrawlOutputToDestinationDir(String crawlName)
Convenience method to invoke copyCrawlOutputToDestinationDir method with the isIncrementalCrawl argument set to true. |
void |
copyOutputDimensionsFile(String crawlName,
String destDirectory)
Copy (prefix).dimensions.xml file generated by the output of an MDEX-outputter crawl to a temporary directory for subsequent intake by Workbench. |
String |
getCasCrawlFullOutputDestDir()
|
String |
getCasCrawlIncrementalOutputDestDir()
|
String |
getCasCrawlOutputDestHost()
|
String |
getCasHost()
|
String |
getCasPort()
|
String |
getCrawlOutputDir(String crawlName)
Queries the CAS to retrieve the crawl output directory from the crawl config. |
String |
getCrawlOutputPrefix(String crawlName)
Queries the CAS to retrieve the crawl output file prefix from the crawl config. |
String |
getCrawlOutputSuffix(String crawlName)
Queries the CAS to retrieve the crawl output file suffix from the crawl config. |
com.endeca.cas.wsdl.CrawlerState |
getCrawlStatus(String crawlName)
Retrieves the status of the specified crawl. |
long |
getLongPropertyValueOrDefault(String propName,
long defaultValue)
|
long |
getMaxMissedStatusChecksAllowed()
|
long |
getMaxWaitTimeSeconds()
|
long |
getMinWaitTimeSeconds()
|
int |
getNumMissedStatusChecks()
|
long |
getSlowPollingIntervalMs()
|
long |
getStandardPollingIntervalMs()
|
void |
incrementMissedStatusQueries()
|
boolean |
isCrawlActive(String crawlName)
Test whether the crawl is active (running or stopping). |
boolean |
isCrawlDefined(String crawlName)
Requests a list of crawls defined in the CAS and returns true if one of them matches the specified crawl name. |
boolean |
isCrawlFileOutput(String crawlName)
Checks if the crawl output type is File System |
boolean |
isCrawlRunning(String crawlName)
Test whether the crawl is running. |
boolean |
isCrawlStopped(String crawlName)
Test whether the crawl is stopped. |
boolean |
isCrawlStopping(String crawlName)
Test whether the crawl is stopping. |
List<String> |
listCasCrawls()
Returns a list of the crawls defined in the CAS. |
void |
renameBaselineCrawlOutput(String crawlName)
Convenience method to invoke renameCrawlOutput method with the isIncrementalCrawl argument set to false. |
void |
renameCrawlOutput(String crawlName,
boolean isIncrementalCrawl)
Renames the crawl output file for a specified crawl to include the crawl name as a prefix as well as a timestamp if it's an incremental crawl. |
void |
renameIncrementalCrawlOutput(String crawlName)
Convenience method to invoke renameCrawlOutput method with the isIncrementalCrawl argument set to true. |
void |
runBaselineCasCrawl(String crawlName)
Runs to completion a full crawl of the CAS crawl with the specified name. |
void |
runIncrementalCasCrawl(String crawlName)
Runs to completion an incremental crawl of the CAS crawl with the specified name. |
void |
setDefinition()
|
void |
setNumMissedStatusChecks(int numMissedStatusQueries)
|
void |
startBaselineCasCrawl(String crawlName)
Executes a baseline crawl for the specified crawl name. |
void |
startIncrementalCasCrawl(String crawlName)
Executes an incremental crawl for the specified crawl name. |
boolean |
waitForFinished(String crawlName)
Waits for the specified crawl to finish (to be in a non-active state) or for the maximum amount of wait time to elapse. |
Methods inherited from class com.endeca.soleng.eac.toolkit.component.CustomComponent |
---|
buildEacStub, getCustomDirectories, getHost, getHostId, getProperties, getProperty, isDefined, isDefinitionChanged, removeDefinition, setCustomDirectories, setHostId, setProperties, updateDefinition |
Methods inherited from class com.endeca.soleng.eac.toolkit.base.Provisionable |
---|
getAppDefinitionFromEac, getCachedAppDefinition, getProvisioningPort, invalidateCachedAppDefinition, setCachedAppDefinition |
Methods inherited from class com.endeca.soleng.eac.toolkit.base.EacElement |
---|
getAppName, getDataPrefix, getEacHost, getEacPort, getElementId, getLockManager, getLogDir, getWorkingDir, isSslEnabled, setAppName, setDataPrefix, setEacHost, setEacPort, setElementId, setLockManager, setLogDir, setSslEnabled, setWorkingDir |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ContentAcquisitionServerComponent()
Method Detail |
---|
public void cleanOutputDir(String crawlName) throws com.endeca.soleng.eac.toolkit.exception.CasCommunicationException, com.endeca.soleng.eac.toolkit.exception.AppConfigurationException, com.endeca.soleng.eac.toolkit.exception.EacCommunicationException, com.endeca.soleng.eac.toolkit.exception.EacComponentControlException
crawlName
- Crawl whose output directory should be cleaned.
com.endeca.soleng.eac.toolkit.exception.CasCommunicationException
com.endeca.soleng.eac.toolkit.exception.AppConfigurationException
com.endeca.soleng.eac.toolkit.exception.EacCommunicationException
com.endeca.soleng.eac.toolkit.exception.EacComponentControlException
public void setDefinition() throws com.endeca.soleng.eac.toolkit.exception.EacCommunicationException
setDefinition
in class com.endeca.soleng.eac.toolkit.component.CustomComponent
com.endeca.soleng.eac.toolkit.exception.EacCommunicationException
public boolean isCrawlDefined(String crawlName) throws com.endeca.soleng.eac.toolkit.exception.CasCommunicationException
crawlName
- Crawl to test.
com.endeca.soleng.eac.toolkit.exception.CasCommunicationException
public List<String> listCasCrawls() throws com.endeca.soleng.eac.toolkit.exception.CasCommunicationException
com.endeca.soleng.eac.toolkit.exception.CasCommunicationException
public void runBaselineCasCrawl(String crawlName) throws com.endeca.soleng.eac.toolkit.exception.CasCommunicationException, com.endeca.soleng.eac.toolkit.exception.CasControlException
crawlName
- Name of the crawl to run.
com.endeca.soleng.eac.toolkit.exception.CasCommunicationException
com.endeca.soleng.eac.toolkit.exception.CasControlException
- Thrown if the crawl does not complete successfully.public void runIncrementalCasCrawl(String crawlName) throws com.endeca.soleng.eac.toolkit.exception.CasCommunicationException, com.endeca.soleng.eac.toolkit.exception.CasControlException
crawlName
- Name of the crawl to run.
com.endeca.soleng.eac.toolkit.exception.CasCommunicationException
com.endeca.soleng.eac.toolkit.exception.CasControlException
- CasControlException Thrown if the crawl does not complete
successfully.public boolean waitForFinished(String crawlName) throws com.endeca.soleng.eac.toolkit.exception.CasCommunicationException
crawlName
- Name of the crawl to poll for status.
com.endeca.soleng.eac.toolkit.exception.CasCommunicationException
public void startBaselineCasCrawl(String crawlName) throws com.endeca.soleng.eac.toolkit.exception.CasCommunicationException
crawlName
- Name of the crawl to execute.
com.endeca.soleng.eac.toolkit.exception.CasCommunicationException
public void startIncrementalCasCrawl(String crawlName) throws com.endeca.soleng.eac.toolkit.exception.CasCommunicationException
crawlName
- Name of the crawl to execute.
com.endeca.soleng.eac.toolkit.exception.CasCommunicationException
public com.endeca.cas.wsdl.CrawlerState getCrawlStatus(String crawlName) throws com.endeca.soleng.eac.toolkit.exception.CasCommunicationException
crawlName
- Name of the crawl to query.
com.endeca.soleng.eac.toolkit.exception.CasCommunicationException
public boolean isCrawlActive(String crawlName) throws com.endeca.soleng.eac.toolkit.exception.CasCommunicationException
crawlName
- Crawl to test.
com.endeca.soleng.eac.toolkit.exception.CasCommunicationException
public boolean isCrawlFileOutput(String crawlName) throws com.endeca.soleng.eac.toolkit.exception.CasCommunicationException
crawlName
-
com.endeca.soleng.eac.toolkit.exception.CasCommunicationException
public boolean isCrawlRunning(String crawlName) throws com.endeca.soleng.eac.toolkit.exception.CasCommunicationException
crawlName
- Crawl to test.
com.endeca.soleng.eac.toolkit.exception.CasCommunicationException
public boolean isCrawlStopping(String crawlName) throws com.endeca.soleng.eac.toolkit.exception.CasCommunicationException
crawlName
- Crawl to test.
com.endeca.soleng.eac.toolkit.exception.CasCommunicationException
public boolean isCrawlStopped(String crawlName) throws com.endeca.soleng.eac.toolkit.exception.CasCommunicationException
crawlName
- Crawl to test.
com.endeca.soleng.eac.toolkit.exception.CasCommunicationException
public void clearIncrementalCrawlOutputFromDestinationDir(String crawlName) throws com.endeca.soleng.eac.toolkit.exception.CasCommunicationException, com.endeca.soleng.eac.toolkit.exception.AppConfigurationException, com.endeca.soleng.eac.toolkit.exception.EacCommunicationException, com.endeca.soleng.eac.toolkit.exception.EacComponentControlException
com.endeca.soleng.eac.toolkit.exception.CasCommunicationException
com.endeca.soleng.eac.toolkit.exception.AppConfigurationException
com.endeca.soleng.eac.toolkit.exception.EacCommunicationException
com.endeca.soleng.eac.toolkit.exception.EacComponentControlException
public void clearFullCrawlOutputFromDestinationDir(String crawlName) throws com.endeca.soleng.eac.toolkit.exception.CasCommunicationException, com.endeca.soleng.eac.toolkit.exception.AppConfigurationException, com.endeca.soleng.eac.toolkit.exception.EacCommunicationException, com.endeca.soleng.eac.toolkit.exception.EacComponentControlException
com.endeca.soleng.eac.toolkit.exception.CasCommunicationException
com.endeca.soleng.eac.toolkit.exception.AppConfigurationException
com.endeca.soleng.eac.toolkit.exception.EacCommunicationException
com.endeca.soleng.eac.toolkit.exception.EacComponentControlException
public void clearCrawlOutputFromDir(String crawlName, boolean isIncrementalCrawl, String hostId, String targetDir) throws com.endeca.soleng.eac.toolkit.exception.CasCommunicationException, com.endeca.soleng.eac.toolkit.exception.AppConfigurationException, com.endeca.soleng.eac.toolkit.exception.EacCommunicationException, com.endeca.soleng.eac.toolkit.exception.EacComponentControlException
crawlName
- Name of the crawl whose output files are to be removed.isIncrementalCrawl
- True if files are to be deleted for an incremental crawl.hostId
- ID of host on which directory to be cleaned resides.targetDir
- Directory from which target files should be removed.
com.endeca.soleng.eac.toolkit.exception.CasCommunicationException
com.endeca.soleng.eac.toolkit.exception.AppConfigurationException
com.endeca.soleng.eac.toolkit.exception.EacCommunicationException
com.endeca.soleng.eac.toolkit.exception.EacComponentControlException
public void copyIncrementalCrawlOutputToDestinationDir(String crawlName) throws com.endeca.soleng.eac.toolkit.exception.AppConfigurationException, com.endeca.soleng.eac.toolkit.exception.EacCommunicationException, com.endeca.soleng.eac.toolkit.exception.EacComponentControlException, com.endeca.soleng.eac.toolkit.exception.CasCommunicationException
com.endeca.soleng.eac.toolkit.exception.AppConfigurationException
com.endeca.soleng.eac.toolkit.exception.EacCommunicationException
com.endeca.soleng.eac.toolkit.exception.EacComponentControlException
com.endeca.soleng.eac.toolkit.exception.CasCommunicationException
public void copyBaselineCrawlOutputToDestinationDir(String crawlName) throws com.endeca.soleng.eac.toolkit.exception.AppConfigurationException, com.endeca.soleng.eac.toolkit.exception.EacCommunicationException, com.endeca.soleng.eac.toolkit.exception.EacComponentControlException, com.endeca.soleng.eac.toolkit.exception.CasCommunicationException
com.endeca.soleng.eac.toolkit.exception.AppConfigurationException
com.endeca.soleng.eac.toolkit.exception.EacCommunicationException
com.endeca.soleng.eac.toolkit.exception.EacComponentControlException
com.endeca.soleng.eac.toolkit.exception.CasCommunicationException
public void copyCrawlOutputToDestinationDir(String crawlName, boolean isIncrementalCrawl) throws com.endeca.soleng.eac.toolkit.exception.AppConfigurationException, com.endeca.soleng.eac.toolkit.exception.EacCommunicationException, com.endeca.soleng.eac.toolkit.exception.EacComponentControlException, com.endeca.soleng.eac.toolkit.exception.CasCommunicationException
crawlName
- Name of the crawl whose output is to be copied.isIncrementalCrawl
- True if the output is that of an incremental crawl.
com.endeca.soleng.eac.toolkit.exception.AppConfigurationException
com.endeca.soleng.eac.toolkit.exception.EacCommunicationException
com.endeca.soleng.eac.toolkit.exception.EacComponentControlException
com.endeca.soleng.eac.toolkit.exception.CasCommunicationException
public void renameIncrementalCrawlOutput(String crawlName) throws com.endeca.soleng.eac.toolkit.exception.AppConfigurationException, com.endeca.soleng.eac.toolkit.exception.EacCommunicationException, com.endeca.soleng.eac.toolkit.exception.EacComponentControlException, com.endeca.soleng.eac.toolkit.exception.CasCommunicationException
com.endeca.soleng.eac.toolkit.exception.AppConfigurationException
com.endeca.soleng.eac.toolkit.exception.EacCommunicationException
com.endeca.soleng.eac.toolkit.exception.EacComponentControlException
com.endeca.soleng.eac.toolkit.exception.CasCommunicationException
public void renameBaselineCrawlOutput(String crawlName) throws com.endeca.soleng.eac.toolkit.exception.AppConfigurationException, com.endeca.soleng.eac.toolkit.exception.EacCommunicationException, com.endeca.soleng.eac.toolkit.exception.EacComponentControlException, com.endeca.soleng.eac.toolkit.exception.CasCommunicationException
com.endeca.soleng.eac.toolkit.exception.AppConfigurationException
com.endeca.soleng.eac.toolkit.exception.EacCommunicationException
com.endeca.soleng.eac.toolkit.exception.EacComponentControlException
com.endeca.soleng.eac.toolkit.exception.CasCommunicationException
public void renameCrawlOutput(String crawlName, boolean isIncrementalCrawl) throws com.endeca.soleng.eac.toolkit.exception.AppConfigurationException, com.endeca.soleng.eac.toolkit.exception.EacCommunicationException, com.endeca.soleng.eac.toolkit.exception.EacComponentControlException, com.endeca.soleng.eac.toolkit.exception.CasCommunicationException
crawlName
- Name of the crawl whose output is to be renamed.isIncrementalCrawl
- True if an incremental crawl's output is to be renamed.
com.endeca.soleng.eac.toolkit.exception.AppConfigurationException
com.endeca.soleng.eac.toolkit.exception.EacCommunicationException
com.endeca.soleng.eac.toolkit.exception.EacComponentControlException
com.endeca.soleng.eac.toolkit.exception.CasCommunicationException
public String getCrawlOutputDir(String crawlName) throws com.endeca.soleng.eac.toolkit.exception.CasCommunicationException
crawlName
- Name of the crawl to be queried.
com.endeca.soleng.eac.toolkit.exception.CasCommunicationException
public String getCrawlOutputPrefix(String crawlName) throws com.endeca.soleng.eac.toolkit.exception.CasCommunicationException
crawlName
- Name of the crawl to be queried.
com.endeca.soleng.eac.toolkit.exception.CasCommunicationException
public String getCrawlOutputSuffix(String crawlName) throws com.endeca.soleng.eac.toolkit.exception.CasCommunicationException
crawlName
- Name of the crawl to be queried.
com.endeca.soleng.eac.toolkit.exception.CasCommunicationException
public void copyOutputDimensionsFile(String crawlName, String destDirectory) throws com.endeca.soleng.eac.toolkit.exception.CasCommunicationException, com.endeca.soleng.eac.toolkit.exception.AppConfigurationException, com.endeca.soleng.eac.toolkit.exception.EacCommunicationException, com.endeca.soleng.eac.toolkit.exception.EacComponentControlException
crawlName
- name of crawl which should have produced the filedestDirectory
- directory to which to copy the file, relative to working directory.
In AppConfig.xml, this is likely configured as webStudioTempDir in ConfigManager,
and accessed via ConfigManager.getWsTempDir().
com.endeca.soleng.eac.toolkit.exception.CasCommunicationException
com.endeca.soleng.eac.toolkit.exception.AppConfigurationException
com.endeca.soleng.eac.toolkit.exception.EacCommunicationException
com.endeca.soleng.eac.toolkit.exception.EacComponentControlException
public void checkCasVersion()
public void checkCrawlCompletedSuccessfully(String crawlName) throws com.endeca.soleng.eac.toolkit.exception.CasCommunicationException, com.endeca.soleng.eac.toolkit.exception.CasControlException
crawlName
- Name of the crawl to be queried.
com.endeca.soleng.eac.toolkit.exception.CasControlException
- Thrown if the crawl has not completed successfully.
com.endeca.soleng.eac.toolkit.exception.CasCommunicationException
public String getCasPort()
public String getCasHost()
public String getCasCrawlFullOutputDestDir()
public String getCasCrawlIncrementalOutputDestDir()
public String getCasCrawlOutputDestHost()
public long getLongPropertyValueOrDefault(String propName, long defaultValue)
public long getMaxMissedStatusChecksAllowed()
public long getStandardPollingIntervalMs()
public long getSlowPollingIntervalMs()
public long getMinWaitTimeSeconds()
public long getMaxWaitTimeSeconds()
public int getNumMissedStatusChecks()
public void setNumMissedStatusChecks(int numMissedStatusQueries)
public void incrementMissedStatusQueries()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |