You create a manipulator by extending the Manipulator abstract class and other supporting classes.
The listModules task of the CAS Server Command-line Utility and the listModules() call of the CAS Server API both return the attribute values you specify in the @CasManipulator annotations.
To create a manipulator extension:
public class SubstringManipulator extends Manipulator<SubstringManipulatorConfig>{
}
@CasManipulator( supportsIncrementals=true, deleteRecordsBypassManipulator = true, displayName="Substring Manipulator", description="Generates a new property that is a substring of another property value") public class SubstringManipulator extends Manipulator<SubstringManipulatorConfig>
public Class<SubstringManipulatorConfig> getConfigurationClass() {
return SubstringManipulatorConfig.class;
}
public ManipulatorRuntime createManipulatorRuntime(
SubstringManipulatorConfig configuration, PipelineComponentRuntimeContext context) {
return new SubstringManipulatorRuntime(context, configuration);
}
public Class<SubstringManipulatorRuntime> getRuntimeClass() {
return SubstringManipulatorRuntime.class;
}
To see many of the steps above, refer to the sample manipulator extension in <install path>\CAS\version\sample\cas-extensions\src\main\com\endeca\cas\extension \sample\manipulator\substring\SubstringManipulator.java.