Package com._1c.g5.v8.derived.operations
Class OperationContext
java.lang.Object
com._1c.g5.v8.derived.operations.OperationContext
- All Implemented Interfaces:
IObjectDerivedDataContext
Managed operation context
-
Constructor Summary
ConstructorsConstructorDescriptionOperationContext
(String segmentId, OperationType operationType, boolean important, Consumer<org.eclipse.core.runtime.IProgressMonitor> operation) Constructs an instance of the operationOperationContext
(String segmentId, OperationType operationType, boolean important, Consumer<org.eclipse.core.runtime.IProgressMonitor> operation, IModalOperationController modalOperationController) -
Method Summary
Modifier and TypeMethodDescriptionlong
Gets the identifier of the object the context belongs to.Gets the identifier of the session the context is being collected for.org.eclipse.emf.ecore.EClass
Gets the EClass of the target object.Gets the modal operation controller for the modal operation (if any)Gets the the object the context belongs to.Consumer<org.eclipse.core.runtime.IProgressMonitor>
Gets the operation executableGets the associated operation typeGets the derived data segment identifier this context is collected for.Gets the associated transaction handle (if any).long
Gets the current version of the context.boolean
Checks if the full rebuild mode is set for the object.boolean
Checks if the operation is important one.boolean
Checks the inactivity status of this contextboolean
isModal()
Checks if this operation is modal one.boolean
mergeUpdates
(IObjectDerivedDataContext context) Merges updates into the context.void
setFullRebuild
(boolean fullRebuild) Sets/resets the full rebuild designator for the context object DD.void
setInactive
(boolean inactive) Sets the inactive flag for a contextvoid
setTransactionHandle
(Object transactionHandle) Sets the transaction handle for this context.void
setVersion
(long version) Sets an external version designator of the context.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com._1c.g5.v8.derived.context.IObjectDerivedDataContext
loadData, saveData
-
Constructor Details
-
OperationContext
public OperationContext(String segmentId, OperationType operationType, boolean important, Consumer<org.eclipse.core.runtime.IProgressMonitor> operation) Constructs an instance of the operation- Parameters:
segmentId
- The target pipeline segment identifier. May not benull
operationType
- The operation type. May not benull
operation
- The executable part of the operation. May not benull
-
OperationContext
public OperationContext(String segmentId, OperationType operationType, boolean important, Consumer<org.eclipse.core.runtime.IProgressMonitor> operation, IModalOperationController modalOperationController)
-
-
Method Details
-
getBmObjectId
public long getBmObjectId()Description copied from interface:IObjectDerivedDataContext
Gets the identifier of the object the context belongs to.- Specified by:
getBmObjectId
in interfaceIObjectDerivedDataContext
- Returns:
- The identifier of the object.
-
getComputationCause
Description copied from interface:IObjectDerivedDataContext
Gets the identifier of the session the context is being collected for. Used only for sync contexts.- Specified by:
getComputationCause
in interfaceIObjectDerivedDataContext
- Returns:
- The identifier of the session.
-
getEClass
public org.eclipse.emf.ecore.EClass getEClass()Description copied from interface:IObjectDerivedDataContext
Gets the EClass of the target object.- Specified by:
getEClass
in interfaceIObjectDerivedDataContext
- Returns:
- The target object EClass.
-
getModalOperationController
Gets the modal operation controller for the modal operation (if any)- Returns:
- The modal operation controller. May be
null
-
getObjectId
Description copied from interface:IObjectDerivedDataContext
Gets the the object the context belongs to.- Specified by:
getObjectId
in interfaceIObjectDerivedDataContext
- Returns:
- The object, never
null
-
getOperation
Gets the operation executable- Returns:
- The operation executable. May not be
null
-
getOperationType
Gets the associated operation type- Returns:
- The type of the operation. May not be
null
-
getSegmentId
Description copied from interface:IObjectDerivedDataContext
Gets the derived data segment identifier this context is collected for.- Specified by:
getSegmentId
in interfaceIObjectDerivedDataContext
- Returns:
- The unique identifier of the DD segment.
-
getTransactionHandle
Description copied from interface:IObjectDerivedDataContext
Gets the associated transaction handle (if any).- Specified by:
getTransactionHandle
in interfaceIObjectDerivedDataContext
- Returns:
- The associated transaction handle (if any).
null
otherwise.
-
getVersion
public long getVersion()Description copied from interface:IObjectDerivedDataContext
Gets the current version of the context. The version is defined during the snapshotting of the context. The verison is used during the context merge process to update the base version.- Specified by:
getVersion
in interfaceIObjectDerivedDataContext
- Returns:
- The version of the context.
-
isFullRebuild
public boolean isFullRebuild()Description copied from interface:IObjectDerivedDataContext
Checks if the full rebuild mode is set for the object.- Specified by:
isFullRebuild
in interfaceIObjectDerivedDataContext
- Returns:
- True if the full rebuild is required for the given top object.
-
isImportant
public boolean isImportant()Checks if the operation is important one. The system waits all important tasks to finish before the closure of the project context- Returns:
- True if the operation is important
-
isModal
public boolean isModal()Checks if this operation is modal one.- Returns:
- True if the operation is modal. False otherwise
-
mergeUpdates
Description copied from interface:IObjectDerivedDataContext
Merges updates into the context. The base version of this context is being updated according to the verison of the provided context- Specified by:
mergeUpdates
in interfaceIObjectDerivedDataContext
- Parameters:
context
- The source of updates. Cannot benull
.
-
setFullRebuild
public void setFullRebuild(boolean fullRebuild) Description copied from interface:IObjectDerivedDataContext
Sets/resets the full rebuild designator for the context object DD.- Specified by:
setFullRebuild
in interfaceIObjectDerivedDataContext
- Parameters:
fullRebuild
- Full rebuild flag.
-
setTransactionHandle
Description copied from interface:IObjectDerivedDataContext
Sets the transaction handle for this context.- Specified by:
setTransactionHandle
in interfaceIObjectDerivedDataContext
-
setVersion
public void setVersion(long version) Description copied from interface:IObjectDerivedDataContext
Sets an external version designator of the context. Called by the DD framework and should not be used by clients directly- Specified by:
setVersion
in interfaceIObjectDerivedDataContext
- Parameters:
version
- A version to set
-
isInactive
public boolean isInactive()Description copied from interface:IObjectDerivedDataContext
Checks the inactivity status of this context- Specified by:
isInactive
in interfaceIObjectDerivedDataContext
- Returns:
- True if context is inactive
-
setInactive
public void setInactive(boolean inactive) Description copied from interface:IObjectDerivedDataContext
Sets the inactive flag for a context- Specified by:
setInactive
in interfaceIObjectDerivedDataContext
- Parameters:
inactive
- The inactivity state to set
-