public class FileBasedChangePackageImpl extends org.eclipse.emf.ecore.impl.EObjectImpl implements FileBasedChangePackage
The following features are implemented:
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| Modifier and Type | Field and Description |
|---|---|
static String |
FILE_OP_INDEX
Index of an operations file tuple consisting of the actual and the temporary file.
|
static String |
TEMP_SUFFIX
Suffix for temporary operation files.
|
| Modifier and Type | Method and Description |
|---|---|
void |
add(AbstractOperation op)
Add a single operation to this change package.
|
void |
addAll(List<AbstractOperation> ops)
Adds all given operations to this change package.
|
void |
apply(Project project)
Applies this change package to the given project.
|
void |
apply(Project project,
boolean forceApplication)
Apply all operations in the change package to the given project.
|
void |
attachToProjectSpace(ChangePackageContainer changePackageContainer)
Attaches this change package to the given value.
|
LogMessage |
basicGetLogMessage() |
org.eclipse.emf.common.notify.NotificationChain |
basicSetLogMessage(LogMessage newLogMessage,
org.eclipse.emf.common.notify.NotificationChain msgs) |
void |
clear()
Clears all operations from this change package.
|
FileBasedChangePackage |
copy()
Copies this change package.
|
ESChangePackage |
createAPI()
Creates the API interface for this class.
|
void |
delete() |
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) |
AbstractOperation |
get(int index)
Returns the operation at the given index.
|
String |
getFilePath() |
LogMessage |
getLogMessage() |
org.eclipse.emf.common.util.EList<OperationProxy> |
getOperationProxies() |
String |
getTempFilePath()
Returns the path to the temporary file
|
void |
initialize(String filePath)
Initializes this change package.
|
boolean |
isEmpty()
Whether this change package has any operations.
|
int |
leafSize()
Returns the number of leaf operations that are contained within this change package.
|
void |
move(String newFilePath)
Moves this change package.
|
ESCloseableIterable<AbstractOperation> |
operations()
Returns a handle for iterating through operations contained in this change package.
NOTE: Callers must call close on the returned handle. |
List<AbstractOperation> |
removeAtEnd(int n)
Removes the given number of operations starting from the end.
|
FileBasedChangePackage |
reverse()
Creates a copy of the change package and reverses it.
|
ESCloseableIterable<AbstractOperation> |
reversedOperations()
Returns an
ESCloseableIterable that returns the operations in a backwards fashion. |
void |
save()
Save this change package.
|
void |
setFilePath(String newFilePath)
Sets the value of the '
File Path' attribute. |
void |
setLogMessage(LogMessage newLogMessage) |
int |
size()
Returns the size of this change package, that is, how many operations are contained in it.
|
ESChangePackage |
toAPI()
Returns the API representation of this change package.
|
ChangePackage |
toInMemoryChangePackage()
Converts this file-based change package to an in-memory change package.
NOTE: for very big change packages this might cause a serious performance hit and also cause OutOfMemoryErrors. |
String |
toString() |
eAdapters, eClass, eContainerFeatureID, eDeliver, eInternalContainer, eInvoke, eIsProxy, eSetClass, eSetDeliver, eSetProxyURIeAllContents, 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, eVirtualUnseteNotificationRequired, eNotifyequals, getClass, hashCode, notify, notifyAll, wait, wait, waiteAllContents, eClass, eContainer, eContainingFeature, eContainmentFeature, eContents, eCrossReferences, eGet, eGet, eInvoke, eIsProxy, eIsSet, eResource, eSet, eUnsetpublic static final String TEMP_SUFFIX
public static final String FILE_OP_INDEX
public LogMessage getLogMessage()
getLogMessage in interface AbstractChangePackageAbstractChangePackage.setLogMessage(LogMessage),
VersioningPackage.getAbstractChangePackage_LogMessage()public LogMessage basicGetLogMessage()
public org.eclipse.emf.common.notify.NotificationChain basicSetLogMessage(LogMessage newLogMessage, org.eclipse.emf.common.notify.NotificationChain msgs)
public void setLogMessage(LogMessage newLogMessage)
setLogMessage in interface AbstractChangePackagenewLogMessage - the new value of the 'Log Message' containment reference.AbstractChangePackage.getLogMessage()public String getFilePath()
getFilePath in interface FileBasedChangePackageFileBasedChangePackage.setFilePath(String),
VersioningPackage.getFileBasedChangePackage_FilePath()public String getTempFilePath()
getTempFilePath in interface FileBasedChangePackagepublic void setFilePath(String newFilePath)
FileBasedChangePackageFile Path' attribute.
setFilePath in interface FileBasedChangePackagenewFilePath - the new value of the 'File Path' attribute.FileBasedChangePackage.getFilePath()public org.eclipse.emf.common.util.EList<OperationProxy> getOperationProxies()
getOperationProxies in interface FileBasedChangePackageVersioningPackage.getFileBasedChangePackage_OperationProxies()public org.eclipse.emf.common.notify.NotificationChain eInverseRemove(org.eclipse.emf.ecore.InternalEObject otherEnd,
int featureID,
org.eclipse.emf.common.notify.NotificationChain msgs)
eInverseRemove in class org.eclipse.emf.ecore.impl.BasicEObjectImplpublic Object eGet(int featureID, boolean resolve, boolean coreType)
eGet in interface org.eclipse.emf.ecore.InternalEObjecteGet in class org.eclipse.emf.ecore.impl.BasicEObjectImplpublic void eSet(int featureID,
Object newValue)
eSet in interface org.eclipse.emf.ecore.InternalEObjecteSet in class org.eclipse.emf.ecore.impl.BasicEObjectImplpublic void eUnset(int featureID)
eUnset in interface org.eclipse.emf.ecore.InternalEObjecteUnset in class org.eclipse.emf.ecore.impl.BasicEObjectImplpublic boolean eIsSet(int featureID)
eIsSet in interface org.eclipse.emf.ecore.InternalEObjecteIsSet in class org.eclipse.emf.ecore.impl.BasicEObjectImplpublic String toString()
toString in class org.eclipse.emf.ecore.impl.BasicEObjectImplpublic ESChangePackage toAPI()
toAPI in interface APIDelegate<ESChangePackage>toAPI in interface AbstractChangePackageAPIDelegate.toAPI()public ESChangePackage createAPI()
createAPI in interface APIDelegate<ESChangePackage>APIDelegate.createAPI()public void addAll(List<AbstractOperation> ops)
addAll in interface AbstractChangePackageops - the operations to be addedAbstractChangePackage.addAll(java.util.List)public void add(AbstractOperation op)
add in interface AbstractChangePackageop - the operation to be addedAbstractChangePackage.add(org.eclipse.emf.emfstore.internal.server.model.versioning.operations.AbstractOperation)public FileBasedChangePackage reverse()
reverse in interface AbstractChangePackagereverse in interface FileBasedChangePackageAbstractChangePackage.reverse()public FileBasedChangePackage copy()
public ESCloseableIterable<AbstractOperation> reversedOperations()
ESCloseableIterable that returns the operations in a backwards fashion.reversedOperations in interface AbstractChangePackageESCloseableIterable that must be close after iterationpublic int size()
size in interface AbstractChangePackageAbstractChangePackage.size()public ESCloseableIterable<AbstractOperation> operations()
close on the returned handle.operations in interface AbstractChangePackageAbstractChangePackage.operations()public boolean isEmpty()
isEmpty in interface AbstractChangePackagetrue, if this change package is empty, false otherwiseAbstractChangePackage.isEmpty()public List<AbstractOperation> removeAtEnd(int n)
removeAtEnd in interface AbstractChangePackagen - the number of operations to be removedAbstractChangePackage.removeAtEnd(int)public void clear()
clear in interface AbstractChangePackageAbstractChangePackage.clear()public void attachToProjectSpace(ChangePackageContainer changePackageContainer)
attachToProjectSpace in interface AbstractChangePackagechangePackageContainer - the value to which this change package will be attached toAbstractChangePackage.attachToProjectSpace(org.eclipse.emf.emfstore.internal.server.model.versioning.impl.persistent.ChangePackageContainer)public void delete()
public int leafSize()
leafSize in interface AbstractChangePackageAbstractChangePackage.leafSize()public void initialize(String filePath)
initialize in interface FileBasedChangePackagefilePath - the file path where the change package should be initializedFileBasedChangePackage.initialize(java.lang.String)public void apply(Project project)
apply in interface AbstractChangePackageproject - the project upon which the change package should be appliedAbstractChangePackage.apply(org.eclipse.emf.emfstore.internal.common.model.Project)public void apply(Project project, boolean forceApplication)
apply in interface AbstractChangePackageproject - the projectforceApplication - if true, illegal Operations won't stop the other to be appliedAbstractChangePackage.apply(org.eclipse.emf.emfstore.internal.common.model.Project,
boolean)public AbstractOperation get(int index)
get in interface AbstractChangePackageindex - the requested indexAbstractChangePackage.get(int)public ChangePackage toInMemoryChangePackage()
OutOfMemoryErrors.toInMemoryChangePackage in interface FileBasedChangePackageFileBasedChangePackage.toInMemoryChangePackage()public void save()
throws IOException
save in interface AbstractChangePackageIOException - in case saving failsAbstractChangePackage.save()public void move(String newFilePath) throws IOException
move in interface FileBasedChangePackagenewFilePath - the file path where the change package should be moved toIOException - in case of an error during moveFileBasedChangePackage.move(java.lang.String)Copyright © 2017. All rights reserved.