/** * Completes a composite operation. * * @param name the name for the operation * @param description the description of the operation * @param modelElementId the id of the model element that is most important for the operation * @throws InvalidHandleException if the handle is invalid */ public void end(String name, String description, ModelElementId modelElementId) throws InvalidHandleException { checkAndCloseHandle(); compositeOperation.setCompositeName(name); compositeOperation.setCompositeDescription(description); compositeOperation.setClientDate(new Date()); compositeOperation.setReversed(false); compositeOperation.setModelElementId(modelElementId); operationRecorder.endCompositeOperation(); dropAllReferences(); }
/** * Completes a the given semantic composite operation. * * @param semanticCompositeOperation a semanticCompositeOperation that was executed and represents * the composite * @throws InvalidHandleException if the handle is invalid */ public void end(SemanticCompositeOperation semanticCompositeOperation) throws InvalidHandleException { checkAndCloseHandle(); semanticCompositeOperation.setClientDate(new Date()); semanticCompositeOperation.setReversed(false); semanticCompositeOperation.getSubOperations().addAll(compositeOperation.getSubOperations()); operationRecorder.endCompositeOperation(semanticCompositeOperation); }