com.ibm.jdg2e.simplemodel.core
Interface IRoadTrip

All Known Implementing Classes:
RoadTrip

public interface IRoadTrip

Defines the model operations that are available as part of the public API.


Field Summary
static java.lang.String LISTADD
          Property Change Event key
static java.lang.String LISTREMOVE
          Property Change Event key
 
Method Summary
 ILocation addLocation(java.lang.String location, java.lang.String activity, int political)
          Create a ILocation in the RoadTrip.
 void addPropertyChangeListener(org.eclipse.jface.util.IPropertyChangeListener listener)
          Add a property change listener.
 java.lang.Object[] getLocations()
          Returns the model content in the form of an array.
 void removeLocation(ILocation modelElement)
          The passed ILocation reference is removed from the model.
 void removePropertyChangeListener(org.eclipse.jface.util.IPropertyChangeListener listener)
          Removes a property change listener.
 void resetList()
          Resets list to the default location content.
 

Field Detail

LISTADD

public static final java.lang.String LISTADD
Property Change Event key

See Also:
Constant Field Values

LISTREMOVE

public static final java.lang.String LISTREMOVE
Property Change Event key

See Also:
Constant Field Values
Method Detail

addLocation

public ILocation addLocation(java.lang.String location,
                             java.lang.String activity,
                             int political)
Create a ILocation in the RoadTrip. If nulls are passed default values are used.

Parameters:
location - name for new object instance
activity - description for activity
political - identifier for political unit
Returns:
ILocation the model object that was added.

addPropertyChangeListener

public void addPropertyChangeListener(org.eclipse.jface.util.IPropertyChangeListener listener)
Add a property change listener. This simple change listener is used to identify changes to IRoadTrip content (adds/removes). It does not report attribute changes to ModelElements.

Parameters:
listener -

getLocations

public java.lang.Object[] getLocations()
Returns the model content in the form of an array. Intended to support the needs of the content provider getElements() method.

Returns:
Object[] - an ILocation array.

removeLocation

public void removeLocation(ILocation modelElement)
The passed ILocation reference is removed from the model.

Parameters:
modelElement -

removePropertyChangeListener

public void removePropertyChangeListener(org.eclipse.jface.util.IPropertyChangeListener listener)
Removes a property change listener.

Parameters:
listener -

resetList

public void resetList()
Resets list to the default location content.