Package com._1c.g5.v8.derived.context
Class StandardContextCollectorBuilder
java.lang.Object
com._1c.g5.v8.derived.context.StandardContextCollectorBuilder
A convenience class allowing to describe behavior of a scope collector
using a set of simple rules and then build an instance of
See the usage example below.
IScopeCollector
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();
-
Constructor Summary
ConstructorsConstructorDescriptionStandardContextCollectorBuilder
(org.eclipse.emf.ecore.EClass supportedType) Constructs a new instance for the given BM object type. -
Method Summary
Modifier and TypeMethodDescriptionbuild()
Builds a scope collector instance in compliance with the previously specified rule set.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.Says to start a rule of derived data computation in case on object association.onChange
(org.eclipse.emf.ecore.EStructuralFeature feature) Says to start a rule of derived data computation in case of given feature change.Says to start a rule of derived data computation in case of full rebuild request.
-
Constructor Details
-
StandardContextCollectorBuilder
public StandardContextCollectorBuilder(org.eclipse.emf.ecore.EClass supportedType) Constructs a new instance for the given BM object type.- Parameters:
supportedType
- the BM object type to build scope collector for
-
-
Method Details
-
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
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
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
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
-