A custom sweep consists of a sweep object that retrieves
instances of a target class, an action object that identifies an action
handler to process the instances, and a user-implemented action handler.
About this task
The easiest way to create a sweep object and sweep action
object is with the IBM® Administration Console for Content
Platform Engine.
However, you can also create these objects with a custom application
that uses the Content Engine API.
Procedure
To create a custom sweep:
- Implement the
SweepActionHandler interface, either as a Java™ or JavaScript
component.
A sweep object passes instances from a target class to a sweep action handler as an array of
SweepItem objects. Iterating the array, the handler gets instances of the target
class and processes them. The handler can set a status value to indicate the processing outcome of
an instance. A status value is persisted in the form of a CmSweepResult object.
- Create an action object, represented by
CmSweepAction.
- Create a sweep object, represented by either
CmCustomSweepJob, CmCustomSweepPolicy,
or CmCustomQueueSweep. A sweep object
represents a background service that evaluates all instances of a
specified class based on filter criteria.