Package com.rosetta.model.lib.process
Interface BuilderProcessor
public interface BuilderProcessor
- Author:
- TomForwood Class defining a processor that runs on a RosettaModelObjectBuilder instances of this class are designed to be used with the RosettaModelObjectBuilder process method to perform visitor pattern processing on the object tree. They are permitted to make changes to the underlying objects and can return an accumulated result in the report object BuilderProcessors added to the rosetta model using the processor syntax will be automatically run during the ingestion stages and can be used to perform custom mapping logic
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescription<T> voidprocessBasic(RosettaPath path, Class<T> rosettaType, Collection<? extends T> instances, RosettaModelObjectBuilder parent, AttributeMeta... metas) process a list of rosetta primitive type - allows new values to be added or removed from the list<T> voidprocessBasic(RosettaPath path, Class<T> rosettaType, T instance, RosettaModelObjectBuilder parent, AttributeMeta... metas) process a rosetta primitive type<R extends RosettaModelObject>
booleanprocessRosetta(RosettaPath path, Class<R> rosettaType, RosettaModelObjectBuilder builder, RosettaModelObjectBuilder parent, AttributeMeta... metas) Process a rosetta object<R extends RosettaModelObject>
booleanprocessRosetta(RosettaPath path, Class<R> rosettaType, List<? extends RosettaModelObjectBuilder> builders, RosettaModelObjectBuilder parent, AttributeMeta... metas) Processes a list of Rosetta objects - allows new values to be added or removed from the listreport()
-
Method Details
-
processRosetta
<R extends RosettaModelObject> boolean processRosetta(RosettaPath path, Class<R> rosettaType, RosettaModelObjectBuilder builder, RosettaModelObjectBuilder parent, AttributeMeta... metas) Process a rosetta object- Parameters:
path- the RosettaPath taken to the objectrosettaType- the Type of the objectbuilder- a RosettaModelObjectBuilder representing the objectparent- the RosettaModelObjectBuilder which contains this object as an attributemetas- Flags indicating meta information about the attribute returns true if this processor is interested in processing the objects fields
-
processRosetta
<R extends RosettaModelObject> boolean processRosetta(RosettaPath path, Class<R> rosettaType, List<? extends RosettaModelObjectBuilder> builders, RosettaModelObjectBuilder parent, AttributeMeta... metas) Processes a list of Rosetta objects - allows new values to be added or removed from the list- Parameters:
path- the RosettaPath taken to the objectsrosettaType- the Type of the objectsbuilders- a List of RosettaModelObjectBuilder representing the objectsparent- the RosettaModelObjectbuilder which contains these object as an attributemetas- Flags indicating meta information about the attribute
-
processBasic
<T> void processBasic(RosettaPath path, Class<T> rosettaType, T instance, RosettaModelObjectBuilder parent, AttributeMeta... metas) process a rosetta primitive type- Parameters:
path- the RosettaPath taken to the objectsrosettaType- the Type of the objectsinstance- the primitive value to be processedparent- the RosettaModelObjectBuilder which contains these object as an attributemetas- Flags indicating meta information about the attribute
-
processBasic
<T> void processBasic(RosettaPath path, Class<T> rosettaType, Collection<? extends T> instances, RosettaModelObjectBuilder parent, AttributeMeta... metas) process a list of rosetta primitive type - allows new values to be added or removed from the list- Parameters:
path- the RosettaPath taken to the objectsrosettaType- the Type of the objectsinstances- the list of primitive value to be processedparent- the RosettaModelObjectbuilder which contains these object as an attributemetas- Flags indicating meta information about the attribute
-
report
BuilderProcessor.Report report()- Returns:
- a report representing the result of this processor
-