Start page / Plug-In Development / Universal Extensions / Input Components / Value Processing / Value Engineer Factory
Value Engineer Factory
Implementing a Value Engineer
Interface: de.espirit.firstspirit.client.access.editor.ValueEngineerFactory
Developer API documentation: ValueEngineerFactory<T, F extends GomFormElement>
The value engineer factory class is responsible for instantiating an object of a type which implements ValueEngineer<T>, binding the input component's GOM form element definition class to the input component's value engineer class.
Parameterization:
- T must correspond to the component value type used as the working value in the input component.
- F extends GomFormElement must correspond to the GOM form element definition used for the input component.
Example
/**
* Value engineer factory that creates a value engineer for the input component "Point"
* and configures that value engineer object with a fitting value engineer context object.
*
* Point: Working component value used by SiteArchitect and ContentCreator gadget classes for the input component
* GomPoint: GOM form definition class for "Point"
* PointValueEngineer: Value engineer class for "Point"
*/
public class PointValueEngineerFactory implements ValueEngineerFactory<Point, GomPoint> {
@Override
public Class<Point> getType() {
return Point.class;
}
@Override
public ValueEngineer<Point> create(final ValueEngineerContext<GomPoint> context) {
return new PointValueEngineer(context);
}
}