Package com.e1c.g5.v8.dt.check.context
Class CheckContextCollectingSession
java.lang.Object
com.e1c.g5.v8.dt.check.context.CheckContextCollectingSession
The session which must be used by
ICheck
developers to react on data changes and schedule the check
to run, as the part of com.e1c.g5.v8.dt.check.context.*ContextCollector call lifecycle. To schedule the check
the developer should call one of add*Check methods of this class.
This class is instantiated by the check engine and must not be instantiated by check developers.
Technically is a IContextCollectingSession
wrapper that limits the ability of users to operate with DD contexts with
only necessary operations/scopes. It helps to prevent check developers from overloading the system with cross-
activated checks, etc-
Constructor Summary
ConstructorsConstructorDescriptionCheckContextCollectingSession
(String checkId, CheckComplexity complexity, boolean criticalDataIntegrityCheck, IContextCollectingSession session) Constructs an instance of the session -
Method Summary
Modifier and TypeMethodDescriptionvoid
addFullCheck
(IBmObject modelObject) Schedule a full model check for a given object (starting from the corresponding top object) and a current check.void
addLanguageCheck
(String moduleUri) Schedules a language check for the given language modulevoid
addModelCheck
(IBmObject modelObject) Schedule a model check for the given model object.void
addModelCheck
(IBmObject modelObject, Map<String, String> additionalContext) Schedule a model check for the given model object.getAdditionalContext
(IBmObject modelObject) Gets a current state of an additional context being collected at the moment
-
Constructor Details
-
CheckContextCollectingSession
public CheckContextCollectingSession(String checkId, CheckComplexity complexity, boolean criticalDataIntegrityCheck, IContextCollectingSession session) Constructs an instance of the session- Parameters:
checkId
- The identifier of the check the session is being constructed. May not benull
complexity
- The complexity of the check. May not benull
criticalDataIntegrityCheck
- The critical data integrity check flagsession
- The DD context collecting session. May not benull
-
-
Method Details
-
addLanguageCheck
Schedules a language check for the given language module- Parameters:
moduleUri
- The module to schedule the check for. May not benull
-
addModelCheck
Schedule a model check for the given model object.- Parameters:
modelObject
- The model object to add the check for. May not benull
. The object should be received from the context object being provided by ACC via theOnModelObjectAssociationContextCollector.collectContextOnObjectAssociation(IBmObject, com._1c.g5.v8.bm.core.event.BmSubEvent, CheckContextCollectingSession)
oror be attached to the transaction being collected from the context object
additionalContext
- Additional context which may be supplied to the check execution stage. Cannot benull
, may be empty
-
addModelCheck
Schedule a model check for the given model object.- Parameters:
modelObject
- The model object to add the check for. May not benull
. The object should be received from the context object being provided by ACC via theOnModelObjectAssociationContextCollector.collectContextOnObjectAssociation(IBmObject, com._1c.g5.v8.bm.core.event.BmSubEvent, CheckContextCollectingSession)
oror be attached to the transaction being collected from the context object
-
getAdditionalContext
Gets a current state of an additional context being collected at the moment- Parameters:
modelObject
- The target model object, cannot benull
- Returns:
- The current state of an additional context. Never
null
-
addFullCheck
Schedule a full model check for a given object (starting from the corresponding top object) and a current check. Does nothing in case if the full model check for all objects (full rebuild) is already scheduled for the object- Parameters:
modelObject
- The model object to add the check for. May not benull
. The object should be received from the context object being provided by ACC via theOnModelObjectAssociationContextCollector.collectContextOnObjectAssociation(IBmObject, com._1c.g5.v8.bm.core.event.BmSubEvent, CheckContextCollectingSession)
oror be attached to the transaction being collected from the context object
-