Class OperationContext

    • 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 be null
        operationType - The operation type. May not be null
        operation - The executable part of the operation. May not be null
    • Method Detail

      • getModalOperationController

        public IModalOperationController getModalOperationController()
        Gets the modal operation controller for the modal operation (if any)
        Returns:
        The modal operation controller. May be 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
      • 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 interface IObjectDerivedDataContext
        Returns:
        The version of the context.
      • 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
      • 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 interface IObjectDerivedDataContext
        Parameters:
        version - A version to set