Package com._1c.g5.v8.derived.context
Class PartBasedContextCollectorBuilder
- java.lang.Object
- 
- com._1c.g5.v8.derived.context.PartBasedContextCollectorBuilder
 
- 
 public class PartBasedContextCollectorBuilder extends Object A convenience class allowing to describe behavior of a scope collector using a set of simple rules and then build an instance ofIScopeCollectorin 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 SummaryConstructors Constructor Description PartBasedContextCollectorBuilder(String segmentId, org.eclipse.emf.ecore.EClass supportedType)Constructs a new instance for the given BM object type.
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description IContextCollectorbuild()Builds a scope collector instance in compliance with the previously specified rule set.PartBasedContextCollectorBuildercompute(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.
 Custom context collectors cannot be combined with standard ones (defined via other compute***(..) methods) or other custom context collectors.PartBasedContextCollectorBuildercompute(String... partIds)Says that in case of the previously specified event, the given parts of the previously specified object must be computed.
 Standard context collecting rules cannot be combined with custom ones (defined via compute(ICaseSpecificContextCollector) method).PartBasedContextCollectorBuildercomputeInSegment(String segmentId, String... partIds)Schedules async re-computation of the DD segment with the given set of parts.
 Standard context collecting rules cannot be combined with custom ones (defined via compute(ICaseSpecificContextCollector) method).PartBasedContextCollectorBuilderflowChildren(org.eclipse.emf.ecore.EReference reference)Says that in case of the previously specified event derived data must be computed for the children of the context object.PartBasedContextCollectorBuilderflowCollectionAffectedElements()Says that in case of the previously specified event derived data must be computed for the affected elements of collection.PartBasedContextCollectorBuilderflowCollectionRemovedElements()Says that in case of the previously specified event derived data must be computed for the removed elements of collection.PartBasedContextCollectorBuilderflowContainer()Says that in case of the previously specified event derived data must be computed for the direct container of the context object.PartBasedContextCollectorBuilderflowContainer(int distance)Says that in case of the previously specified event derived data must be computed for the container of the context object.PartBasedContextCollectorBuilderonAssociation()Says to start a rule of derived data computation in case on object association.PartBasedContextCollectorBuilderonChange(org.eclipse.emf.ecore.EStructuralFeature feature)Says to start a rule of derived data computation in case of given feature change.PartBasedContextCollectorBuilderonChange(org.eclipse.emf.ecore.EStructuralFeature... features)Collects scope on change of any feature from the provided set.PartBasedContextCollectorBuilderonFullRebuild()Says to start a rule of derived data computation in case of full object rebuild request.PartBasedContextCollectorBuilderonRemoval()Says to start a rule of derived data computation in case of object removal.PartBasedContextCollectorBuildersegment(String segmentId)Sets active DD segments for the current builder.
 
- 
- 
- 
Constructor Detail- 
PartBasedContextCollectorBuilderpublic PartBasedContextCollectorBuilder(String segmentId, org.eclipse.emf.ecore.EClass supportedType) Constructs a new instance for the given BM object type.- Parameters:
- segmentId- The default DD segment to be used for scope collection.
- supportedType- the BM object type to build scope collector for. Cannot be- null.
 
 
- 
 - 
Method Detail- 
buildpublic IContextCollector build() Builds a scope collector instance in compliance with the previously specified rule set.- Returns:
- the built scope collector
 
 - 
computepublic PartBasedContextCollectorBuilder 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.
 Custom context collectors cannot be combined with standard ones (defined via other compute***(..) methods) or other custom context collectors. UseAggregatingContextCollectorinstead.- Parameters:
- customContextCollector- the custom scope collector. Cannot be null.
- Returns:
- the reference to the current builder for method chaining
 
 - 
computepublic PartBasedContextCollectorBuilder compute(String... partIds) Says that in case of the previously specified event, the given parts of the previously specified object must be computed.
 Standard context collecting rules cannot be combined with custom ones (defined via compute(ICaseSpecificContextCollector) method).- Parameters:
- partIds- the IDs of the derived data parts to compute
- Returns:
- the reference to the current builder for method chaining
 
 - 
computeInSegmentpublic PartBasedContextCollectorBuilder computeInSegment(String segmentId, String... partIds) Schedules async re-computation of the DD segment with the given set of parts.
 Standard context collecting rules cannot be combined with custom ones (defined via compute(ICaseSpecificContextCollector) method).- Parameters:
- partIds- The set of parts for the re-computation.
- Returns:
- the reference to the current builder for method chaining
 
 - 
flowChildrenpublic PartBasedContextCollectorBuilder flowChildren(org.eclipse.emf.ecore.EReference reference) Says that in case of the previously specified event derived data must be computed for the children of the context object.- Parameters:
- reference- a reference to the children
- Returns:
- the reference to the current builder for method chaining
 
 - 
flowCollectionAffectedElementspublic PartBasedContextCollectorBuilder flowCollectionAffectedElements() Says that in case of the previously specified event derived data must be computed for the affected elements of collection.- Returns:
- the reference to the current builder for method chaining
 
 - 
flowCollectionRemovedElementspublic PartBasedContextCollectorBuilder flowCollectionRemovedElements() Says that in case of the previously specified event derived data must be computed for the removed elements of collection.- Returns:
- the reference to the current builder for method chaining
 
 - 
flowContainerpublic PartBasedContextCollectorBuilder flowContainer() Says that in case of the previously specified event derived data must be computed for the direct container of the context object.- Returns:
- the reference to the current builder for method chaining
 
 - 
flowContainerpublic PartBasedContextCollectorBuilder flowContainer(int distance) Says that in case of the previously specified event derived data must be computed for the container of the context object.- Parameters:
- distance- the distance to the container. If distance is 1, it means that the derived data must be computed for the direct container, if 2, for the container of the container, and so on
- Returns:
- the reference to the current builder for method chaining
 
 - 
onAssociationpublic PartBasedContextCollectorBuilder 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
 
 - 
onChangepublic PartBasedContextCollectorBuilder 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
 
 - 
onChangepublic PartBasedContextCollectorBuilder onChange(org.eclipse.emf.ecore.EStructuralFeature... features) Collects scope on change of any feature from the provided set. This is a convinience method to define similar scope collecting rules.- Parameters:
- features- The set of features.
- Returns:
- the reference to the current builder for method chaining
 
 - 
onFullRebuildpublic PartBasedContextCollectorBuilder onFullRebuild() Says to start a rule of derived data computation in case of full object rebuild request.- Returns:
- the reference to the current builder for method chaining
 
 - 
onRemovalpublic PartBasedContextCollectorBuilder onRemoval() Says to start a rule of derived data computation in case of object removal.- Returns:
- the reference to the current builder for method chaining
 
 - 
segmentpublic PartBasedContextCollectorBuilder segment(String segmentId) Sets active DD segments for the current builder. All next scope definitions are being collected for this segment.- Parameters:
- segmentId- The DD segment to set. Cannot be- null
- Returns:
- the reference to the current builder for method chaining
 
 
- 
 
-