org.eclipse.emf.emfstore.server.model
Interface ESChangePackage

All Known Implementing Classes:
ESChangePackageImpl, ESFileBasedChangePackageImpl

public interface ESChangePackage

Represents a change package.

Author:
emueller, wesendon

Method Summary
 void add(ESOperation operation)
          Add a single a operation to this change package.
 void addAll(List<ESOperation> ops)
          Adds a list of operations to this change package.
 void clear()
          Clears all operations from this change package.
 ESLogMessage getLogMessage()
          Returns the ESLogMessage that was entered by the user and is supposed to describe the changes within the change package.
 boolean isEmpty()
          Whether this change package contains any operations.
 ESCloseableIterable<ESOperation> operations()
          Returns an ESCloseableIterable that iterates over all operations of this change package.
 List<ESOperation> removeFromEnd(int howMany)
          Removes the given number of operations from this change package beginning at the end.
 ESChangePackage reverse()
          Returns the operations of this change package in the reversed order.
 void setLogMessage(ESLogMessage logMessage)
          Sets the log message of this change package.
 int size()
          Returns the number of operations this change package contains.
 

Method Detail

getLogMessage

ESLogMessage getLogMessage()
Returns the ESLogMessage that was entered by the user and is supposed to describe the changes within the change package.

Returns:
the log message as entered by the user

setLogMessage

void setLogMessage(ESLogMessage logMessage)
Sets the log message of this change package.

Parameters:
logMessage - the log message to be set

addAll

void addAll(List<ESOperation> ops)
Adds a list of operations to this change package.

Parameters:
ops - the operations to be added
Since:
1.5

add

void add(ESOperation operation)
Add a single a operation to this change package.

Parameters:
operation - the operation to be added
Since:
1.5

clear

void clear()
Clears all operations from this change package.

Since:
1.5

isEmpty

boolean isEmpty()
Whether this change package contains any operations.

Returns:
true, if this change package contains no operations, false otherwise
Since:
1.5

removeFromEnd

List<ESOperation> removeFromEnd(int howMany)
Removes the given number of operations from this change package beginning at the end.

Parameters:
howMany - the number of operations to be removed
Returns:
the list of removed operations
Since:
1.5

operations

ESCloseableIterable<ESOperation> operations()
Returns an ESCloseableIterable that iterates over all operations of this change package.
You MUST call close on the returned ESCloseableIterable.

Returns:
an ESCloseableIterable that enables iterating over all operations.
Since:
1.5

reverse

ESChangePackage reverse()
Returns the operations of this change package in the reversed order. Note that you must call close() on the returned ESCloseableIterable.

Returns:
the operations in reversed order
Since:
1.5

size

int size()
Returns the number of operations this change package contains.

Returns:
the number of operations within this change package
Since:
1.5


Copyright © 2016. All Rights Reserved.