uk.ac.soton.itinnovation.grid.service.dataresource
Interface DataResourceManager

All Known Implementing Classes:
OgsaDaiDataResourceManager, PlaintextDataResourceManager, RDBMSDataResourceManager

public interface DataResourceManager

Implementations of DataResourceManager are responsible for the creation and destruction of resources on a backend. The management methods in this interface each take a bean holding information about the resource they are managing. They should use this information to perform whatever actions they need to on the backend. They can optionally modify this information, as the bean is saved after the method returns.

Author:
ds

Method Summary
 void connectDataResource(DataResourceBean bean)
          Connect an existing resource on the backend.
 void connectDataResourceRole(DataResourceRoleBean bean)
          Connect a data resource role on the backend.
 void createDataResource(DataResourceBean bean)
          Create a new resource on the backend.
 void createDataResourceRole(DataResourceRoleBean bean)
          Create a data resource role on the backend.
 void createDataResourceSubscription(DataResourceSubscriptionBean bean)
          Perform any required actions on the backend to subscribe to a role.
 List<org.apache.axis.message.addressing.EndpointReferenceType> createDefaultRoles(MatchRule owner, DataResourceBean bean, DataResource service, String metricURI)
          Create any default roles on a newly created data resource.
 void destroyDataResource(DataResourceBean bean)
          Destroy a data resource on the backend.
 void destroyDataResourceRole(DataResourceRoleBean bean)
          Destroy a role on the backend.
 void destroyDataResourceSubscription(DataResourceSubscriptionBean bean)
          Perform any required actions on the backend to unsubscribe to a role.
 void disconnectDataResource(DataResourceBean bean)
          Disconnect a data resource on the backend.
 void disconnectDataResourceRole(DataResourceRoleBean bean)
          Disconnect a role on the backend.
 boolean isConfigurationLoaded()
          Determine whether configuration files have been loaded and the service is ready to respond to requests.
 void reloadConfiguration()
          Instruct the data resource manager to reload any configuration files it needs.
 void writeDataResourceConfiguration(String resourceID, String jdbcURL)
          Writes or re-writes configuration for a data resource
 

Method Detail

createDataResource

void createDataResource(DataResourceBean bean)
                        throws GridFailureException
Create a new resource on the backend. createDefaultRoles(uk.ac.soton.itinnovation.grid.types.MatchRule, uk.ac.soton.itinnovation.grid.service.dataresource.beans.DataResourceBean, uk.ac.soton.itinnovation.grid.comms.dataresource.DataResource, java.lang.String) will be called shortly after this method to allow the creation of any default roles that allow users to access the resource.

Parameters:
bean - A bean holding information about the resource to be created
Throws:
GridFailureException

connectDataResource

void connectDataResource(DataResourceBean bean)
                         throws GridFailureException
Connect an existing resource on the backend.

Parameters:
bean - A bean holding information about the resource to be connected
Throws:
GridFailureException

destroyDataResource

void destroyDataResource(DataResourceBean bean)
                         throws GridFailureException
Destroy a data resource on the backend. Unlike disconnectDataResource(uk.ac.soton.itinnovation.grid.service.dataresource.beans.DataResourceBean), this method should totally remove the data resource and any data contained within it. This method will only be called on resources that were created with createDataResource(uk.ac.soton.itinnovation.grid.service.dataresource.beans.DataResourceBean).

Parameters:
bean - A bean holding information about the resource to be destroyed
Throws:
GridFailureException

disconnectDataResource

void disconnectDataResource(DataResourceBean bean)
                            throws GridFailureException
Disconnect a data resource on the backend. This method should leave any data that was contained within the data resource intact. This method will only be called by resources that were created with connectDataResource(uk.ac.soton.itinnovation.grid.service.dataresource.beans.DataResourceBean).

Parameters:
bean - A bean holding information about the resource to be disconnected
Throws:
GridFailureException

createDataResourceRole

void createDataResourceRole(DataResourceRoleBean bean)
                            throws GridFailureException
Create a data resource role on the backend.

Parameters:
bean - A bean holding information about the role to be created
Throws:
GridFailureException

connectDataResourceRole

void connectDataResourceRole(DataResourceRoleBean bean)
                             throws GridFailureException
Connect a data resource role on the backend.

Parameters:
bean - A bean holding information about the role to be connected
Throws:
GridFailureException

destroyDataResourceRole

void destroyDataResourceRole(DataResourceRoleBean bean)
                             throws GridFailureException
Destroy a role on the backend. Unlike disconnectDataResourceRole(uk.ac.soton.itinnovation.grid.service.dataresource.beans.DataResourceRoleBean), this method should totally remove the role from the backend. It will only be called on resources that were created with createDataResourceRole(uk.ac.soton.itinnovation.grid.service.dataresource.beans.DataResourceRoleBean).

Parameters:
bean - A bean holding information about the role to be destroyed
Throws:
GridFailureException

disconnectDataResourceRole

void disconnectDataResourceRole(DataResourceRoleBean bean)
                                throws GridFailureException
Disconnect a role on the backend. This method should leave the actual role intact. It will only be called on resources that were created with connectDataResourceRole(uk.ac.soton.itinnovation.grid.service.dataresource.beans.DataResourceRoleBean).

Parameters:
bean - A bean holding information about the role to be disconnected
Throws:
GridFailureException

createDataResourceSubscription

void createDataResourceSubscription(DataResourceSubscriptionBean bean)
                                    throws GridFailureException
Perform any required actions on the backend to subscribe to a role. Typically this method will do nothing as subscriptions have no meaning to the backend.

Parameters:
bean - A bean holding information about the subscription
Throws:
GridFailureException

destroyDataResourceSubscription

void destroyDataResourceSubscription(DataResourceSubscriptionBean bean)
                                     throws GridFailureException
Perform any required actions on the backend to unsubscribe to a role. Typically this method will do nothing as subscriptions have no meaning to the backend.

Parameters:
bean - A bean holding information about the subscription
Throws:
GridFailureException

createDefaultRoles

List<org.apache.axis.message.addressing.EndpointReferenceType> createDefaultRoles(MatchRule owner,
                                                                                  DataResourceBean bean,
                                                                                  DataResource service,
                                                                                  String metricURI)
                                                                                  throws GridFailureException
Create any default roles on a newly created data resource. This method will be called shortly after createDataResource(uk.ac.soton.itinnovation.grid.service.dataresource.beans.DataResourceBean) and is responsible for setting up one or more roles for users to access the data resource. It should call the DataResource.createDataResourceRole(java.lang.String, uk.ac.soton.itinnovation.grid.types.MatchRule, java.lang.String, java.util.Map, java.lang.String) method on service to create the roles.

Parameters:
owner - A rule describing the owner of the resource. Should be passed as a parameter to DataResource.createDataResourceRole(java.lang.String, uk.ac.soton.itinnovation.grid.types.MatchRule, java.lang.String, java.util.Map, java.lang.String).
bean - A bean holding information about the data resource that has just been created. The resourceID can be retreived from this bean and passed as a parameter to DataResource.createDataResourceRole(java.lang.String, uk.ac.soton.itinnovation.grid.types.MatchRule, java.lang.String, java.util.Map, java.lang.String)
service - The service interface used to do the creation of roles.
metricURI - The metric URI given to the data resource. Variations on this should be given to each of the roles. If metricURI is an empty string (""), no metrics should be assigned to the roles.
Returns:
A list of the EPRs returned by createDataResourceRole.
Throws:
GridFailureException

reloadConfiguration

void reloadConfiguration()
                         throws GridFailureException
Instruct the data resource manager to reload any configuration files it needs. This is called once upon service initialisation and may be called after the user has changed settings in a user interface.

Throws:
GridFailureException

isConfigurationLoaded

boolean isConfigurationLoaded()
Determine whether configuration files have been loaded and the service is ready to respond to requests.


writeDataResourceConfiguration

void writeDataResourceConfiguration(String resourceID,
                                    String jdbcURL)
Writes or re-writes configuration for a data resource



Copyright © 2001-2007 University of Southampton IT Innovation Centre. All Rights Reserved.