Package com._1c.g5.v8.derived.context
Class StandardContextCollectorBuilder
- java.lang.Object
-
- com._1c.g5.v8.derived.context.StandardContextCollectorBuilder
-
public class StandardContextCollectorBuilder extends Object
A convenience class allowing to describe behavior of a scope collector using a set of simple rules and then build an instance ofIScopeCollector
in compliance with these rules.
See the usage example below.
ICaseSpecificScopeCollector onFeatureBChangeScopeCollector = ... IScopeCollector scopeCollector = new ScopeCollectorBuilder(SOME_OBJECT_TYPE) .onAssociation().compute(PART_A, PART_B) .onChange(FEATURE_A) .compute(PART_B) .flowChildren(FEATURE_C).compute(PART_A, PART_B) .onChange(FEATURE_B).compute(onFeatureBChangeScopeCollector) .build();
- See Also:
IContextCollector
,ICaseSpecificContextCollector
-
-
Constructor Summary
Constructors Constructor Description StandardContextCollectorBuilder(org.eclipse.emf.ecore.EClass supportedType)
Constructs a new instance for the given BM object type.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description IContextCollector
build()
Builds a scope collector instance in compliance with the previously specified rule set.StandardContextCollectorBuilder
compute(ICaseSpecificContextCollector customContextCollector)
Says that in case of the previously specified event, the given custom scope collector must be invoked to define which parts of the previously specified object must be computed.StandardContextCollectorBuilder
onAssociation()
Says to start a rule of derived data computation in case on object association.StandardContextCollectorBuilder
onChange(org.eclipse.emf.ecore.EStructuralFeature feature)
Says to start a rule of derived data computation in case of given feature change.StandardContextCollectorBuilder
onFullRebuild()
Says to start a rule of derived data computation in case of full rebuild request.
-
-
-
Method Detail
-
build
public IContextCollector build()
Builds a scope collector instance in compliance with the previously specified rule set.- Returns:
- the built scope collector
-
compute
public StandardContextCollectorBuilder compute(ICaseSpecificContextCollector customContextCollector)
Says that in case of the previously specified event, the given custom scope collector must be invoked to define which parts of the previously specified object must be computed.- Parameters:
customContextCollector
- the custom scope collector- Returns:
- the reference to the current builder for method chaining
-
onAssociation
public StandardContextCollectorBuilder onAssociation()
Says to start a rule of derived data computation in case on object association.- Returns:
- the reference to the current builder for method chaining
-
onChange
public StandardContextCollectorBuilder onChange(org.eclipse.emf.ecore.EStructuralFeature feature)
Says to start a rule of derived data computation in case of given feature change.- Parameters:
feature
- the feature- Returns:
- the reference to the current builder for method chaining
-
onFullRebuild
public StandardContextCollectorBuilder onFullRebuild()
Says to start a rule of derived data computation in case of full rebuild request.- Returns:
- the reference to the current builder for method chaining
-
-