Package com._1c.g5.v8.derived.operations
Class OperationContext
- java.lang.Object
-
- com._1c.g5.v8.derived.operations.OperationContext
-
- All Implemented Interfaces:
IObjectDerivedDataContext
public final class OperationContext extends Object implements IObjectDerivedDataContext
Managed operation context
-
-
Constructor Summary
Constructors Constructor Description OperationContext(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
All Methods Instance Methods Concrete Methods Modifier and Type Method Description longgetBmObjectId()Gets the identifier of the object the context belongs to.ObjectgetComputationCause()Gets the identifier of the session the context is being collected for.org.eclipse.emf.ecore.EClassgetEClass()Gets the EClass of the target object.IModalOperationControllergetModalOperationController()Gets the modal operation controller for the modal operation (if any)ObjectgetObjectId()Gets the the object the context belongs to.Consumer<org.eclipse.core.runtime.IProgressMonitor>getOperation()Gets the operation executableOperationTypegetOperationType()Gets the associated operation typeStringgetSegmentId()Gets the derived data segment identifier this context is collected for.ObjectgetTransactionHandle()Gets the associated transaction handle (if any).longgetVersion()Gets the current version of the context.booleanisFullRebuild()Checks if the full rebuild mode is set for the object.booleanisImportant()Checks if the operation is important one.booleanisModal()Checks if this operation is modal one.booleanmergeUpdates(IObjectDerivedDataContext context)Merges updates into the context.voidsetFullRebuild(boolean fullRebuild)Sets/resets the full rebuild designator for the context object DD.voidsetTransactionHandle(Object transactionHandle)Sets the transaction handle for this context.voidsetVersion(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 Detail
-
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 benulloperationType- The operation type. May not benulloperation- 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 Detail
-
getBmObjectId
public long getBmObjectId()
Description copied from interface:IObjectDerivedDataContextGets the identifier of the object the context belongs to.- Specified by:
getBmObjectIdin interfaceIObjectDerivedDataContext- Returns:
- The identifier of the object.
-
getComputationCause
public Object getComputationCause()
Description copied from interface:IObjectDerivedDataContextGets the identifier of the session the context is being collected for. Used only for sync contexts.- Specified by:
getComputationCausein interfaceIObjectDerivedDataContext- Returns:
- The identifier of the session.
-
getEClass
public org.eclipse.emf.ecore.EClass getEClass()
Description copied from interface:IObjectDerivedDataContextGets the EClass of the target object.- Specified by:
getEClassin interfaceIObjectDerivedDataContext- Returns:
- The target object EClass.
-
getModalOperationController
public IModalOperationController getModalOperationController()
Gets the modal operation controller for the modal operation (if any)- Returns:
- The modal operation controller. May be
null
-
getObjectId
public Object getObjectId()
Description copied from interface:IObjectDerivedDataContextGets the the object the context belongs to.- Specified by:
getObjectIdin interfaceIObjectDerivedDataContext- Returns:
- The object, never
null
-
getOperation
public Consumer<org.eclipse.core.runtime.IProgressMonitor> getOperation()
Gets the operation executable- Returns:
- The operation executable. May not be
null
-
getOperationType
public OperationType getOperationType()
Gets the associated operation type- Returns:
- The type of the operation. May not be
null
-
getSegmentId
public String getSegmentId()
Description copied from interface:IObjectDerivedDataContextGets the derived data segment identifier this context is collected for.- Specified by:
getSegmentIdin interfaceIObjectDerivedDataContext- Returns:
- The unique identifier of the DD segment.
-
getTransactionHandle
public Object getTransactionHandle()
Description copied from interface:IObjectDerivedDataContextGets the associated transaction handle (if any).- Specified by:
getTransactionHandlein interfaceIObjectDerivedDataContext- Returns:
- The associated transaction handle (if any).
nullotherwise.
-
getVersion
public long getVersion()
Description copied from interface:IObjectDerivedDataContextGets 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:
getVersionin interfaceIObjectDerivedDataContext- Returns:
- The version of the context.
-
isFullRebuild
public boolean isFullRebuild()
Description copied from interface:IObjectDerivedDataContextChecks if the full rebuild mode is set for the object.- Specified by:
isFullRebuildin 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
public boolean mergeUpdates(IObjectDerivedDataContext context)
Description copied from interface:IObjectDerivedDataContextMerges updates into the context. The base version of this context is being updated according to the verison of the provided context- Specified by:
mergeUpdatesin interfaceIObjectDerivedDataContext- Parameters:
context- The source of updates. Cannot benull.
-
setFullRebuild
public void setFullRebuild(boolean fullRebuild)
Description copied from interface:IObjectDerivedDataContextSets/resets the full rebuild designator for the context object DD.- Specified by:
setFullRebuildin interfaceIObjectDerivedDataContext- Parameters:
fullRebuild- Full rebuild flag.
-
setTransactionHandle
public void setTransactionHandle(Object transactionHandle)
Description copied from interface:IObjectDerivedDataContextSets the transaction handle for this context.- Specified by:
setTransactionHandlein interfaceIObjectDerivedDataContext
-
setVersion
public void setVersion(long version)
Description copied from interface:IObjectDerivedDataContextSets an external version designator of the context. Called by the DD framework and should not be used by clients directly- Specified by:
setVersionin interfaceIObjectDerivedDataContext- Parameters:
version- A version to set
-
-