uk.org.ogsadai.persistence.activity
Interface ActivitySpecDAO

All Superinterfaces:
DAO
All Known Implementing Classes:
DummyActivitySpecDAO, SimpleFileActivitySpecDAO

public interface ActivitySpecDAO
extends DAO

This interface manages the persistence of activity-related information. It populates objects with state from persistence media and also persists state represented by objects.

Author:
The OGSA-DAI Project Team

Method Summary
 void deleteActivitySpec(ActivityID activityID)
          Delete the specification of an activity.
 ActivitySpec getActivitySpec(ActivityID activityID)
          Get the specification of a activity.
 boolean hasPersistedStateChanged(ActivityID activityID)
          Has the persisted state changed for a given activity?
 void insertActivitySpec(ActivitySpec activitySpec)
          Insert the specification of an activity.
 boolean isActivityKnown(ActivityID activityID)
          Is an activity recorded in the persistence media?
 java.util.List listActivities()
          Get a list of activities persisted in the persistence media.
 

Method Detail

listActivities

java.util.List listActivities()
                              throws PersistenceException
Get a list of activities persisted in the persistence media.

Returns:
List<ActivityID>
Throws:
PersistenceException - If any problems arise when interacting with the persistence media.

isActivityKnown

boolean isActivityKnown(ActivityID activityID)
                        throws PersistenceException
Is an activity recorded in the persistence media?

Parameters:
activityID - Activity ID
Returns:
true if the activity is known.
Throws:
PersistenceException - If any problems arise when interacting with the persistence media.

getActivitySpec

ActivitySpec getActivitySpec(ActivityID activityID)
                             throws ActivityUnknownException,
                                    PersistenceException
Get the specification of a activity.

Parameters:
activityID - Activity ID
Returns:
activity specification.
Throws:
ActivityUnknownException - If the activity is unknown i.e. not recorded in the persistence media.
PersistenceException - If any problems arise when interacting with the persistence media.

deleteActivitySpec

void deleteActivitySpec(ActivityID activityID)
                        throws PersistenceException
Delete the specification of an activity.

Parameters:
activityID - Activity ID
Throws:
PersistenceException - If any problems arise when interacting with the persistence media.

insertActivitySpec

void insertActivitySpec(ActivitySpec activitySpec)
                        throws PersistenceException
Insert the specification of an activity. Any existing state is for the activity is overwritten.

Parameters:
activitySpec - Activity specification
Throws:
PersistenceException - If any problems arise when interacting with the persistence media.

hasPersistedStateChanged

boolean hasPersistedStateChanged(ActivityID activityID)
                                 throws PersistenceException
Has the persisted state changed for a given activity?

Parameters:
activityID - Activity ID
Returns:
true if it has.
Throws:
PersistenceException - If any problems arise when interacting with the persistence media.