uk.ac.soton.itinnovation.grid.service.ogsadai.plaintext
Class PlaintextDataResourceManager

java.lang.Object
  extended by uk.ac.soton.itinnovation.grid.service.ogsadai.OgsaDaiDataResourceManager
      extended by uk.ac.soton.itinnovation.grid.service.ogsadai.plaintext.PlaintextDataResourceManager
All Implemented Interfaces:
DataResourceManager

public class PlaintextDataResourceManager
extends OgsaDaiDataResourceManager


Field Summary
 
Fields inherited from class uk.ac.soton.itinnovation.grid.service.ogsadai.OgsaDaiDataResourceManager
configurationDirectory, log, ogsaDaiInstance, schemaUrl, skeletonDirectory
 
Constructor Summary
PlaintextDataResourceManager()
           
 
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.
 String getFileDirectory()
           
 void reloadConfiguration()
          Instruct the data resource manager to reload any configuration files it needs.
 void setFileDirectory(String dir)
           
 void writeDataResourceConfiguration(String resourceID, String jdbcURL)
          Writes or re-writes configuration for a data resource
 
Methods inherited from class uk.ac.soton.itinnovation.grid.service.ogsadai.OgsaDaiDataResourceManager
createOgsaDaiInstance, getGriaConfigDirectory, getOgsaDaiInstance, getSchemaURL, getServiceConfiguration, getWebInfDirectory, isConfigurationLoaded, loadPropertiesFile, readFile, readFileFromClassPath, readSkeletonFile, setConfigurationLoaded, writeFile, writeFile
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PlaintextDataResourceManager

public PlaintextDataResourceManager()
Method Detail

connectDataResource

public void connectDataResource(DataResourceBean bean)
Description copied from interface: DataResourceManager
Connect an existing resource on the backend.

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

connectDataResourceRole

public void connectDataResourceRole(DataResourceRoleBean bean)
Description copied from interface: DataResourceManager
Connect a data resource role on the backend.

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

createDataResource

public void createDataResource(DataResourceBean bean)
Description copied from interface: DataResourceManager
Create a new resource on the backend. DataResourceManager.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

createDataResourceRole

public void createDataResourceRole(DataResourceRoleBean bean)
Description copied from interface: DataResourceManager
Create a data resource role on the backend.

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

createDataResourceSubscription

public void createDataResourceSubscription(DataResourceSubscriptionBean bean)
Description copied from interface: DataResourceManager
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

createDefaultRoles

public List<org.apache.axis.message.addressing.EndpointReferenceType> createDefaultRoles(MatchRule owner,
                                                                                         DataResourceBean bean,
                                                                                         DataResource service,
                                                                                         String metricURI)
                                                                                  throws GridFailureException
Description copied from interface: DataResourceManager
Create any default roles on a newly created data resource. This method will be called shortly after DataResourceManager.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

destroyDataResource

public void destroyDataResource(DataResourceBean bean)
Description copied from interface: DataResourceManager
Destroy a data resource on the backend. Unlike DataResourceManager.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 DataResourceManager.createDataResource(uk.ac.soton.itinnovation.grid.service.dataresource.beans.DataResourceBean).

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

destroyDataResourceRole

public void destroyDataResourceRole(DataResourceRoleBean bean)
Description copied from interface: DataResourceManager
Destroy a role on the backend. Unlike DataResourceManager.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 DataResourceManager.createDataResourceRole(uk.ac.soton.itinnovation.grid.service.dataresource.beans.DataResourceRoleBean).

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

destroyDataResourceSubscription

public void destroyDataResourceSubscription(DataResourceSubscriptionBean bean)
Description copied from interface: DataResourceManager
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

disconnectDataResource

public void disconnectDataResource(DataResourceBean bean)
Description copied from interface: DataResourceManager
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 DataResourceManager.connectDataResource(uk.ac.soton.itinnovation.grid.service.dataresource.beans.DataResourceBean).

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

disconnectDataResourceRole

public void disconnectDataResourceRole(DataResourceRoleBean bean)
Description copied from interface: DataResourceManager
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 DataResourceManager.connectDataResourceRole(uk.ac.soton.itinnovation.grid.service.dataresource.beans.DataResourceRoleBean).

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

reloadConfiguration

public void reloadConfiguration()
                         throws GridFailureException
Description copied from interface: DataResourceManager
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

writeDataResourceConfiguration

public void writeDataResourceConfiguration(String resourceID,
                                           String jdbcURL)
Description copied from interface: DataResourceManager
Writes or re-writes configuration for a data resource


getFileDirectory

public String getFileDirectory()

setFileDirectory

public void setFileDirectory(String dir)


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