org.eclipse.emf.emfstore.internal.server.model.versioning.impl
Class ChangePackageImpl

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.server.model.versioning.impl.ChangePackageImpl
All Implemented Interfaces:
org.eclipse.emf.common.notify.Notifier, org.eclipse.emf.ecore.EObject, org.eclipse.emf.ecore.InternalEObject, APIDelegate<ESChangePackage>, ChangePackage

public class ChangePackageImpl
extends org.eclipse.emf.ecore.impl.EObjectImpl
implements ChangePackage

An implementation of the model object ' Change Package'.

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(Project project)
          Apply all operations in the change package to the given project.
 void apply(Project project, boolean force)
          Apply all operations in the change package to the given project.
 LogMessage basicGetLogMessage()
           
 org.eclipse.emf.common.notify.NotificationChain basicSetLogMessage(LogMessage newLogMessage, org.eclipse.emf.common.notify.NotificationChain msgs)
           
 void cannonize()
          Cannonize the change package, that is remove all operations that are masked by later operations.
static int countLeafOperations(Collection<AbstractOperation> operations)
           
static int countLeafOperations(List<ChangePackage> changePackages)
           
static int countOperations(List<ChangePackage> changePackages)
           
 ESChangePackageImpl createAPI()
          Creates the API interface for this class.
 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)
           
 Set<ModelElementId> getAllInvolvedModelElements()
          Returns all model elements that are involved in this change package.
 List<AbstractOperation> getCopyOfOperations()
          Retrieve a copy of all operations in the change package.
 org.eclipse.emf.common.util.EList<Event> getEvents()
           
 List<AbstractOperation> getLeafOperations()
          Get all leaf operations of a change package, decomposing all composite operations.
 LogMessage getLogMessage()
           
 org.eclipse.emf.common.util.EList<AbstractOperation> getOperations()
          Returns the operations of the change package.
 int getSize()
          Counts the number of Leaf Operations within this change package.
 List<AbstractOperation> getTouchingOperations(ModelElementId modelElementId)
          Get all operations of a change package, that are touching the given model element id
 org.eclipse.emf.common.util.EList<VersionProperty> getVersionProperties()
           
 ChangePackage reverse()
          Reverse the change package.
 void setLogMessage(LogMessage newLogMessage)
           
 ESChangePackageImpl toAPI()
          Returns the API interface of this class.
 
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, toString
 
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.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.ecore.InternalEObject
eNotificationRequired
 

Method Detail

getOperations

public org.eclipse.emf.common.util.EList<AbstractOperation> getOperations()
Returns the operations of the change package. Will not enforce uniqueness, do NOT add the same element twice!

Specified by:
getOperations in interface ChangePackage
Returns:
a list of operations.
See Also:
VersioningPackage.getChangePackage_Operations()

getEvents

public org.eclipse.emf.common.util.EList<Event> getEvents()

Specified by:
getEvents in interface ChangePackage
Returns:
the value of the 'Events' containment reference list.
See Also:
VersioningPackage.getChangePackage_Events()

getLogMessage

public LogMessage getLogMessage()

Specified by:
getLogMessage in interface ChangePackage
Returns:
the value of the 'Log Message' containment reference.
See Also:
ChangePackage.setLogMessage(LogMessage), VersioningPackage.getChangePackage_LogMessage()

basicGetLogMessage

public LogMessage basicGetLogMessage()


basicSetLogMessage

public org.eclipse.emf.common.notify.NotificationChain basicSetLogMessage(LogMessage newLogMessage,
                                                                          org.eclipse.emf.common.notify.NotificationChain msgs)


setLogMessage

public void setLogMessage(LogMessage newLogMessage)

Specified by:
setLogMessage in interface ChangePackage
Parameters:
newLogMessage - the new value of the 'Log Message' containment reference.
See Also:
ChangePackage.getLogMessage()

getVersionProperties

public org.eclipse.emf.common.util.EList<VersionProperty> getVersionProperties()

Specified by:
getVersionProperties in interface ChangePackage
Returns:
the value of the 'Version Properties' containment reference list.
See Also:
VersioningPackage.getChangePackage_VersionProperties()

reverse

public ChangePackage reverse()
Reverse the change package. That applying the change package and the reversed change package to a project is a nop.

Specified by:
reverse in interface ChangePackage
Returns:
the reversed change package

apply

public void apply(Project project)
Apply all operations in the change package to the given project.

Specified by:
apply in interface ChangePackage
Parameters:
project - the project
See Also:
ChangePackage.apply(org.eclipse.emf.emfstore.internal.common.model.Project)

apply

public void apply(Project project,
                  boolean force)
Apply all operations in the change package to the given project. Additional you can force the operations to be applied with illegal operations being ignored.

Specified by:
apply in interface ChangePackage
Parameters:
project - the project
force - if true, illegal Operations won't stop the other to be applied
See Also:
ChangePackage.apply(org.eclipse.emf.emfstore.internal.common.model.Project, boolean)

cannonize

public void cannonize()
Cannonize the change package, that is remove all operations that are masked by later operations.

Specified by:
cannonize in interface ChangePackage

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 org.eclipse.emf.ecore.impl.BasicEObjectImpl

eGet

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

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

eSet

public void eSet(int featureID,
                 Object newValue)

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

eUnset

public void eUnset(int featureID)

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

eIsSet

public boolean eIsSet(int featureID)

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

getCopyOfOperations

public List<AbstractOperation> getCopyOfOperations()
Retrieve a copy of all operations in the change package.

Specified by:
getCopyOfOperations in interface ChangePackage
See Also:
ChangePackage.getCopyOfOperations()

getLeafOperations

public List<AbstractOperation> getLeafOperations()
Get all leaf operations of a change package, decomposing all composite operations. The effect of the leaf operations on a project is the same as the effect of the root operations of this change package.

Specified by:
getLeafOperations in interface ChangePackage
Returns:
a list of leaf operations.

getAllInvolvedModelElements

public Set<ModelElementId> getAllInvolvedModelElements()
Returns all model elements that are involved in this change package.

Specified by:
getAllInvolvedModelElements in interface ChangePackage
Returns:
a set of model element ids
See Also:
ChangePackage.getAllInvolvedModelElements()

getTouchingOperations

public List<AbstractOperation> getTouchingOperations(ModelElementId modelElementId)
Description copied from interface: ChangePackage
Get all operations of a change package, that are touching the given model element id

Specified by:
getTouchingOperations in interface ChangePackage
Returns:
a list of leaf operations.

getSize

public int getSize()
Description copied from interface: ChangePackage
Counts the number of Leaf Operations within this change package. The method will recursivly go thru all composite operations

Specified by:
getSize in interface ChangePackage
Returns:
the number of Leaf Operations

countLeafOperations

public static int countLeafOperations(List<ChangePackage> changePackages)

countLeafOperations

public static int countLeafOperations(Collection<AbstractOperation> operations)

countOperations

public static int countOperations(List<ChangePackage> changePackages)

toAPI

public ESChangePackageImpl toAPI()
Returns the API interface of this class.

Specified by:
toAPI in interface APIDelegate<ESChangePackage>
Returns:
the API interface of this class
See Also:
APIDelegate.toAPI()

createAPI

public ESChangePackageImpl createAPI()
Creates the API interface for this class.

Specified by:
createAPI in interface APIDelegate<ESChangePackage>
Returns:
the API interface of this class
See Also:
APIDelegate.createAPI()


Copyright © 2015. All Rights Reserved.