EAC Component API methods for CAS

In your AppConfig.xml code, you can coordinate CAS crawls and baseline or partial updates using the methods available in ContentAcquisitionServerComponent.

The more important methods available in ContentAcquisitionServerComponent are listed in the following table and are used in examples throughout this chapter.
Method Description
runBaselineCasCrawl() Runs a full CAS crawl to completion. This method starts the crawl and also calls waitForFinished() to check for completion. The method throws an exception if the crawl does not complete successfully.
startBaselineCasCrawl() Starts a baseline crawl but does not check for completion. If the crawl is not already provisioned, or if the CAS can't be reached, this method throws an exception.
runIncrementalCasCrawl() Runs an incremental crawl to completion. This method starts the crawl and calls waitForFinished() to check for completion. The method throws an exception if the crawl does not complete successfully.
startIncrementalCasCrawl() Starts an incremental crawl but does not check for completion. If the crawl is not already provisioned, or if the CAS Service can't be reached, this method throws an exception.
waitForFinished() Waits for the specified crawl to finish (to be in a non-active state) or for the maximum amount of wait time to elapse. (The wait time is specified by the maxCasCrawlWaitSeconds property. The default is -1 which indicates the script should wait indefinately until the CAS crawl completes.) While waiting, the method thread sleeps, swallowing any InterruptedExceptions that are caught.
getCrawlStatus() Retrieves the status of the specified crawl.
isCrawlActive() Test whether the crawl is active (running or stopping).
exportDimensionValueIdMappings() Exports dimension value Id mappings from a Dimension Value Id Manager to a CSV file at the path specified on the CAS Server.
importDimensionValueIdMappings() Imports dimension value Id mappings from a CSV file located at the specified path to a specified Dimension Value Id Manager.

For additional details about ContentAcquisitionServerComponent, see the Javadoc installed in CAS\<version>\doc\cas-dt-javadoc.