org.eclipse.emf.emfstore.internal.server.model.versioning.operations.impl
Class CreateDeleteOperationImpl

java.lang.Object
  extended by org.eclipse.emf.common.notify.impl.BasicNotifierImpl
      extended by org.eclipse.emf.ecore.impl.BasicEObjectImpl
          extended by org.eclipse.emf.ecore.impl.EObjectImpl
              extended by org.eclipse.emf.emfstore.internal.common.model.impl.IdentifiableElementImpl
                  extended by org.eclipse.emf.emfstore.internal.server.model.versioning.operations.impl.AbstractOperationImpl
                      extended by org.eclipse.emf.emfstore.internal.server.model.versioning.operations.impl.CreateDeleteOperationImpl
All Implemented Interfaces:
org.eclipse.emf.common.notify.Notifier, org.eclipse.emf.ecore.EObject, org.eclipse.emf.ecore.InternalEObject, APIDelegate<ESOperation>, IdentifiableElement, AbstractOperation, CreateDeleteOperation

public class CreateDeleteOperationImpl
extends AbstractOperationImpl
implements CreateDeleteOperation

An implementation of the model object ' Create Delete Operation'.

The following features are implemented:


Nested Class Summary
 
Nested classes/interfaces inherited from class org.eclipse.emf.common.notify.impl.BasicNotifierImpl
org.eclipse.emf.common.notify.impl.BasicNotifierImpl.EAdapterList<E extends Object & org.eclipse.emf.common.notify.Adapter>, org.eclipse.emf.common.notify.impl.BasicNotifierImpl.EObservableAdapterList
 
Nested classes/interfaces inherited from interface org.eclipse.emf.ecore.InternalEObject
org.eclipse.emf.ecore.InternalEObject.EStore
 
Field Summary
 
Fields inherited from class org.eclipse.emf.ecore.impl.EObjectImpl
ELAST_EOBJECT_FLAG
 
Fields inherited from interface org.eclipse.emf.ecore.InternalEObject
EOPPOSITE_FEATURE_BASE
 
Method Summary
 void apply(IdEObjectCollection collection)
          Apply an operation to the given project if it can be applied.
 org.eclipse.emf.ecore.EObject basicGetModelElement()
           
 org.eclipse.emf.common.notify.NotificationChain basicSetModelElement(org.eclipse.emf.ecore.EObject newModelElement, org.eclipse.emf.common.notify.NotificationChain msgs)
           
 Object eGet(int featureID, boolean resolve, boolean coreType)
           
 org.eclipse.emf.common.notify.NotificationChain eInverseRemove(org.eclipse.emf.ecore.InternalEObject otherEnd, int featureID, org.eclipse.emf.common.notify.NotificationChain msgs)
           
 boolean eIsSet(int featureID)
           
 void eSet(int featureID, Object newValue)
           
 void eUnset(int featureID)
           
 org.eclipse.emf.common.util.EMap<org.eclipse.emf.ecore.EObject,ModelElementId> getEObjectToIdMap()
           
 List<AbstractOperation> getLeafOperations()
          Get all operations that are a leaf operation.
 org.eclipse.emf.ecore.EObject getModelElement()
           
 Set<ModelElementId> getOtherInvolvedModelElements()
          Get all model elements that are involved in the operation other than the element the operation is directly operating on.
 ModelElementId getParentofDeletedElement(Project project)
          Get the id of the previous parent of the deleted element.
 org.eclipse.emf.common.util.EList<ReferenceOperation> getSubOperations()
           
 boolean isDelete()
           
 AbstractOperation reverse()
          Reverse the operation.
 void setDelete(boolean newDelete)
           
 void setModelElement(org.eclipse.emf.ecore.EObject newModelElement)
           
 String toString()
           
 
Methods inherited from class org.eclipse.emf.emfstore.internal.server.model.versioning.operations.impl.AbstractOperationImpl
basicGetModelElementId, basicSetModelElementId, createAPI, getAllInvolvedModelElements, getClientDate, getModelElementId, getOperationId, isAccepted, setAccepted, setClientDate, setModelElementId, toAPI
 
Methods inherited from class org.eclipse.emf.emfstore.internal.common.model.impl.IdentifiableElementImpl
getIdentifier, setIdentifier
 
Methods inherited from class org.eclipse.emf.ecore.impl.EObjectImpl
eAdapters, eClass, eContainerFeatureID, eDeliver, eInternalContainer, eInvoke, eIsProxy, eSetClass, eSetDeliver, eSetProxyURI
 
Methods inherited from class org.eclipse.emf.ecore.impl.BasicEObjectImpl
eAllContents, eBaseStructuralFeatureID, eBasicRemoveFromContainer, eBasicRemoveFromContainerFeature, eBasicSetContainer, eContainer, eContainingFeature, eContainmentFeature, eContains, eContents, eCrossReferences, eDerivedOperationID, eDerivedOperationID, eDerivedStructuralFeatureID, eDerivedStructuralFeatureID, eDirectResource, eDynamicBasicRemoveFromContainer, eDynamicGet, eDynamicGet, eDynamicInverseAdd, eDynamicInverseRemove, eDynamicInvoke, eDynamicIsSet, eDynamicIsSet, eDynamicSet, eDynamicSet, eDynamicUnset, eDynamicUnset, eGet, eGet, eGet, eInternalResource, eInverseAdd, eInverseAdd, eInverseRemove, eInvoke, eIsSet, eObjectForURIFragmentSegment, eOpenGet, eOpenIsSet, eOpenSet, eOpenUnset, eProxyURI, eResolveProxy, eResource, eSet, eSetResource, eSetStore, eSetting, eStore, eUnset, eURIFragmentSegment, eVirtualGet, eVirtualGet, eVirtualIsSet, eVirtualSet, eVirtualUnset
 
Methods inherited from class org.eclipse.emf.common.notify.impl.BasicNotifierImpl
eNotificationRequired, eNotify
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.eclipse.emf.emfstore.internal.server.model.versioning.operations.AbstractOperation
getAllInvolvedModelElements, getClientDate, getModelElementId, getOperationId, isAccepted, setAccepted, setClientDate, setModelElementId
 
Methods inherited from interface org.eclipse.emf.emfstore.internal.common.model.IdentifiableElement
getIdentifier, setIdentifier
 
Methods inherited from interface org.eclipse.emf.ecore.EObject
eAllContents, eClass, eContainer, eContainingFeature, eContainmentFeature, eContents, eCrossReferences, eGet, eGet, eInvoke, eIsProxy, eIsSet, eResource, eSet, eUnset
 
Methods inherited from interface org.eclipse.emf.common.notify.Notifier
eAdapters, eDeliver, eNotify, eSetDeliver
 
Methods inherited from interface org.eclipse.emf.emfstore.internal.common.api.APIDelegate
createAPI, toAPI
 
Methods inherited from interface org.eclipse.emf.ecore.InternalEObject
eNotificationRequired
 

Method Detail

apply

public void apply(IdEObjectCollection collection)
Description copied from interface: AbstractOperation
Apply an operation to the given project if it can be applied. Apply will silently fail if the operation can not be applied because the given project can not support the operation (e.g. element is missing). To make sure an operation can be applied you can use canApply().

Specified by:
apply in interface AbstractOperation
Parameters:
collection - the project

reverse

public AbstractOperation reverse()
Description copied from class: AbstractOperationImpl
Reverse the operation. The reversed operation is build such that applying this operation and then the reversed operation to a project does not change the project in total effect.

Specified by:
reverse in interface AbstractOperation
Specified by:
reverse in class AbstractOperationImpl
Returns:
the reversed operation

isDelete

public boolean isDelete()

Specified by:
isDelete in interface CreateDeleteOperation
Returns:
the value of the 'Delete' attribute.
See Also:
CreateDeleteOperation.setDelete(boolean), OperationsPackage.getCreateDeleteOperation_Delete()

setDelete

public void setDelete(boolean newDelete)

Specified by:
setDelete in interface CreateDeleteOperation
Parameters:
newDelete - the new value of the 'Delete' attribute.
See Also:
CreateDeleteOperation.isDelete()

getModelElement

public org.eclipse.emf.ecore.EObject getModelElement()

Specified by:
getModelElement in interface CreateDeleteOperation
Returns:
the value of the 'Model Element' containment reference.
See Also:
CreateDeleteOperation.setModelElement(EObject), OperationsPackage.getCreateDeleteOperation_ModelElement()

basicGetModelElement

public org.eclipse.emf.ecore.EObject basicGetModelElement()


basicSetModelElement

public org.eclipse.emf.common.notify.NotificationChain basicSetModelElement(org.eclipse.emf.ecore.EObject newModelElement,
                                                                            org.eclipse.emf.common.notify.NotificationChain msgs)


setModelElement

public void setModelElement(org.eclipse.emf.ecore.EObject newModelElement)

Specified by:
setModelElement in interface CreateDeleteOperation
Parameters:
newModelElement - the new value of the 'Model Element' containment reference.
See Also:
CreateDeleteOperation.getModelElement()

getSubOperations

public org.eclipse.emf.common.util.EList<ReferenceOperation> getSubOperations()

Specified by:
getSubOperations in interface CreateDeleteOperation
Returns:
the value of the 'Sub Operations' containment reference list.
See Also:
OperationsPackage.getCreateDeleteOperation_SubOperations()

getEObjectToIdMap

public org.eclipse.emf.common.util.EMap<org.eclipse.emf.ecore.EObject,ModelElementId> getEObjectToIdMap()

Specified by:
getEObjectToIdMap in interface CreateDeleteOperation
Returns:
the value of the 'EObject To Id Map' map.
See Also:
OperationsPackage.getCreateDeleteOperation_EObjectToIdMap()

eInverseRemove

public org.eclipse.emf.common.notify.NotificationChain eInverseRemove(org.eclipse.emf.ecore.InternalEObject otherEnd,
                                                                      int featureID,
                                                                      org.eclipse.emf.common.notify.NotificationChain msgs)

Overrides:
eInverseRemove in class AbstractOperationImpl

eGet

public Object eGet(int featureID,
                   boolean resolve,
                   boolean coreType)

Specified by:
eGet in interface org.eclipse.emf.ecore.InternalEObject
Overrides:
eGet in class AbstractOperationImpl

eSet

public void eSet(int featureID,
                 Object newValue)

Specified by:
eSet in interface org.eclipse.emf.ecore.InternalEObject
Overrides:
eSet in class AbstractOperationImpl

eUnset

public void eUnset(int featureID)

Specified by:
eUnset in interface org.eclipse.emf.ecore.InternalEObject
Overrides:
eUnset in class AbstractOperationImpl

eIsSet

public boolean eIsSet(int featureID)

Specified by:
eIsSet in interface org.eclipse.emf.ecore.InternalEObject
Overrides:
eIsSet in class AbstractOperationImpl

toString

public String toString()

Overrides:
toString in class AbstractOperationImpl

getOtherInvolvedModelElements

public Set<ModelElementId> getOtherInvolvedModelElements()
Description copied from class: AbstractOperationImpl
Get all model elements that are involved in the operation other than the element the operation is directly operating on.

Specified by:
getOtherInvolvedModelElements in interface AbstractOperation
Overrides:
getOtherInvolvedModelElements in class AbstractOperationImpl
Returns:
a set of model element ids
See Also:
AbstractOperationImpl.getOtherInvolvedModelElements()

getLeafOperations

public List<AbstractOperation> getLeafOperations()
Get all operations that are a leaf operation. In case this operation is not containing any other operations it will return itself.

Specified by:
getLeafOperations in interface AbstractOperation
Returns:
a list of leaf operations
See Also:
AbstractOperation.getLeafOperations()

getParentofDeletedElement

public ModelElementId getParentofDeletedElement(Project project)
Get the id of the previous parent of the deleted element. Returns null if the deleted element did not have a parent at the time of deletion or the parent cannot be determined anymore since it has also been removed from the given project.

Specified by:
getParentofDeletedElement in interface CreateDeleteOperation
Parameters:
project - the current project (needed to derive the parent)
Returns:
the element id
See Also:
CreateDeleteOperation.getParentofDeletedElement(org.eclipse.emf.emfstore.internal.common.model.Project)


Copyright © 2015. All Rights Reserved.