org.eclipse.tigerstripe.workbench
Interface IModelChangeDelta


public interface IModelChangeDelta


Field Summary
static int ADD
           
static java.lang.String ATTRIBUTE
           
static int COPY
           
static java.lang.String LITERAL
           
static java.lang.String METHOD
           
static int MOVE
           
static int REMOVE
           
static int SET
           
static int UNKNOWN
           
 
Method Summary
 void apply(java.util.Collection<java.lang.Object> toCleanUp, java.util.Collection<IAbstractArtifact> toSave)
          Apply the given delta.
 URI getAffectedModelComponentURI()
          The Model component URI on which the delta has occured
 ITigerstripeModelProject[] getAffectedProjects()
          Returns all the affected projects affected by the model change Note that if a model change occurs in a project referenced by other Tigerstripe Model project, all referencing projects will be included here.
 IResource getAffectedResource()
          Return the resource where this delta is taking place
 java.lang.String getFeature()
          Returns the feature being affected for the model component
 java.lang.Object getNewValue()
          On a 0 returns the new value of the feature, on an 1 returns the add value of the feature, on a 2 returns null
 java.lang.Object getOldValue()
          On a 0 returns the old value of the feature, on an 1 returns null, on a 2 returns the value that was deleted
 ITigerstripeModelProject getProject()
          Returns the project where this delta originated.
 int getType()
          Returns the type of the model change
 

Field Detail

SET

static final int SET
See Also:
Constant Field Values

ADD

static final int ADD
See Also:
Constant Field Values

REMOVE

static final int REMOVE
See Also:
Constant Field Values

COPY

static final int COPY
See Also:
Constant Field Values

MOVE

static final int MOVE
See Also:
Constant Field Values

UNKNOWN

static final int UNKNOWN
See Also:
Constant Field Values

ATTRIBUTE

static final java.lang.String ATTRIBUTE
See Also:
Constant Field Values

METHOD

static final java.lang.String METHOD
See Also:
Constant Field Values

LITERAL

static final java.lang.String LITERAL
See Also:
Constant Field Values
Method Detail

getType

int getType()
Returns the type of the model change

Returns:
one of 0, 1, 2, -1

getAffectedModelComponentURI

URI getAffectedModelComponentURI()
The Model component URI on which the delta has occured


getNewValue

java.lang.Object getNewValue()
On a 0 returns the new value of the feature, on an 1 returns the add value of the feature, on a 2 returns null

Returns:

getOldValue

java.lang.Object getOldValue()
On a 0 returns the old value of the feature, on an 1 returns null, on a 2 returns the value that was deleted

Returns:

getFeature

java.lang.String getFeature()
Returns the feature being affected for the model component

Returns:

getAffectedProjects

ITigerstripeModelProject[] getAffectedProjects()
                                               throws TigerstripeException
Returns all the affected projects affected by the model change Note that if a model change occurs in a project referenced by other Tigerstripe Model project, all referencing projects will be included here.

Returns:
Throws:
TigerstripeException

getProject

ITigerstripeModelProject getProject()
Returns the project where this delta originated.

Returns:

getAffectedResource

IResource getAffectedResource()
Return the resource where this delta is taking place

Returns:

apply

void apply(java.util.Collection<java.lang.Object> toCleanUp,
           java.util.Collection<IAbstractArtifact> toSave)
           throws TigerstripeException
Apply the given delta. This method is used in the case of refactors.

Parameters:
toCleanUp - - upon return, this collection will contain a list of artifacts to remove.
toSave - - if not null, this will contain the list of artifacts to save to commit the delta. If null, each delta is followed by a save.
Throws:
TigerstripeException