org.eclipse.emf.emfstore.internal.client.model
Class CompositeOperationHandle

java.lang.Object
  extended by org.eclipse.emf.emfstore.internal.client.model.CompositeOperationHandle

public class CompositeOperationHandle
extends Object

A handle to control a composite operation during recording.

Author:
koegel

Constructor Summary
CompositeOperationHandle(OperationRecorder operationRecorder, CompositeOperation compositeOperation)
          Default constructor.
 
Method Summary
 void abort()
          Aborts a composite operation.
 void end(SemanticCompositeOperation semanticCompositeOperation)
          Completes a the given semantic composite operation.
 void end(String name, String description, ModelElementId modelElementId)
          Completes a composite operation.
 boolean isValid()
          Returns whether the handle is still valid.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CompositeOperationHandle

public CompositeOperationHandle(OperationRecorder operationRecorder,
                                CompositeOperation compositeOperation)
Default constructor.

Parameters:
operationRecorder - the change tracker this composite is tracked on
compositeOperation - the composite operation to be handled
Method Detail

isValid

public boolean isValid()
Returns whether the handle is still valid.

Returns:
false if the composite operation is already completed or aborted.

abort

public void abort()
           throws InvalidHandleException
Aborts a composite operation. The state before starting the composite operation will be recovered.

Throws:
InvalidHandleException - if the handle is invalid

end

public void end(String name,
                String description,
                ModelElementId modelElementId)
         throws InvalidHandleException
Completes a composite operation.

Parameters:
name - the name for the operation
description - the description of the operation
modelElementId - the id of the model element that is most important for the operation
Throws:
InvalidHandleException - if the handle is invalid

end

public void end(SemanticCompositeOperation semanticCompositeOperation)
         throws InvalidHandleException
Completes a the given semantic composite operation.

Parameters:
semanticCompositeOperation - a semanticCompositeOperation that was executed and represents the composite
Throws:
InvalidHandleException - if the handle is invalid


Copyright © 2015. All Rights Reserved.