com.endeca.cas.extension.annotation
Annotation Type CasManipulator


@Target(value=TYPE)
@Retention(value=RUNTIME)
public @interface CasManipulator

Indicates that a class is a CAS manipulator extension. Can be used on subclasses of Manipulator.


Required Element Summary
 boolean deleteRecordsBypassManipulator
          When this property is true, CAS will not send deleted input records into a manipulator, but will route the deleted records directly to the manipulator's output channel.
 boolean supportsIncrementals
          Indicates the capability of the manipulator to support input from an incremental acquisition of a data source.
 
Optional Element Summary
 String description
          The description of the manipulator shown in CAS Console.
 String displayName
          The display name of the manipulator shown in CAS Console.
 String id
          The id of the manipulator extension.
 

Element Detail

supportsIncrementals

public abstract boolean supportsIncrementals
Indicates the capability of the manipulator to support input from an incremental acquisition of a data source.

The records produced from an incremental acquisition represent the change in the data source since a previous acquisition. The records consist of "deleted" records as well as the added and changed records. Supporting records from an incremental acquisition means that the manipulator generates correct output. Correct output is the change in manipulator output that one would get when running full acquisition on the current data source, compared with a previous full acquisition. If the manipulator is able to generate the correct output when given the incremental change in the input records, then the manipulator supports incremental acquisition.

If the manipulator meets all of the following four criteria, it can be annotated with "supportsIncrementals=true":

If the answer is "yes" to these four questions, then a manipulator can be annotated with "supportsIncrementals=true". If the answer is "no" to any one of these questions, then further analysis is required to determine whether correct output can be produced, and further work is required to produce correct output.

If the answer is "yes" to all but the second question, it may be possible to support incremental input with only a little extra work to address the records that the manipulator does not output. To be truly correct, a manipulator should emit a "delete record" for any record that it had previously output but is now not being output. Such a delete is in response to receiving a changed record as part of an incremental input. This would generally require the manipulator to track what records it had previously output. To make such implementation easier, it is acceptable for manipulators to always replace input records that it does not want to output with a "delete record". However, it is preferable (but not required) that this not be done when operating in a full acquisition, as the delete records have no meaning and just have to be thrown away.

A "deleted record" is defined as a Record containing two PropertyValue objects. One PropertyValue is named using Endeca.Id, with the unique identifier of the record as its value. The other PropertyValue is named with Endeca.Action, and has a value of RecordType.DELETE (instead of RecordType.UPSERT). The RecordHelper class can help with working with the "action" property.


deleteRecordsBypassManipulator

public abstract boolean deleteRecordsBypassManipulator
When this property is true, CAS will not send deleted input records into a manipulator, but will route the deleted records directly to the manipulator's output channel. When the property is false, CAS will send deleted input records into the manipulator.

id

public abstract String id
The id of the manipulator extension. This id must be unique across all CAS extensions. If not specified, the id is the fully qualified class name of the manipulator.

Default:
""

displayName

public abstract String displayName
The display name of the manipulator shown in CAS Console.

Default:
""

description

public abstract String description
The description of the manipulator shown in CAS Console.

Default:
""


Copyright © 2011 Endeca. All Rights Reserved.