|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectuk.ac.soton.itinnovation.grid.service.ogsadai.OgsaDaiDataResourceManager
uk.ac.soton.itinnovation.grid.service.ogsadai.rdbms.RDBMSDataResourceManager
public class RDBMSDataResourceManager
| Field Summary | |
|---|---|
protected static org.apache.log4j.Logger |
log
|
static String |
PROP_BACKEND_HELPER_CLASS
|
static String |
PROP_JDBC_URL_ROOT
|
static String |
PROP_SYSTEM_DATABASE
|
static String |
PROP_SYSTEM_PASSWORD
|
static String |
PROP_SYSTEM_USERNAME
|
static String |
PROP_USERNAME_PREFIX
|
| Fields inherited from class uk.ac.soton.itinnovation.grid.service.ogsadai.OgsaDaiDataResourceManager |
|---|
configurationDirectory, ogsaDaiInstance, schemaUrl, skeletonDirectory |
| Constructor Summary | |
|---|---|
RDBMSDataResourceManager()
|
|
| 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. |
Properties |
getProperties()
|
void |
reloadConfiguration()
Instruct the data resource manager to reload any configuration files it needs. |
void |
saveConfiguration(String url,
String systemUser,
String systemPass,
String systemDb,
String userPrefix,
String backendHelperClass)
|
static String |
subFromTemplate(String file,
String key,
String value)
|
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 |
| Field Detail |
|---|
public static final String PROP_BACKEND_HELPER_CLASS
public static final String PROP_JDBC_URL_ROOT
public static final String PROP_SYSTEM_USERNAME
public static final String PROP_SYSTEM_PASSWORD
public static final String PROP_SYSTEM_DATABASE
public static final String PROP_USERNAME_PREFIX
protected static org.apache.log4j.Logger log
| Constructor Detail |
|---|
public RDBMSDataResourceManager()
| Method Detail |
|---|
public void connectDataResource(DataResourceBean bean)
throws GridFailureException
DataResourceManager
bean - A bean holding information about the resource to be connected
GridFailureExceptionpublic void createDataResource(DataResourceBean bean)
DataResourceManagerDataResourceManager.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.
bean - A bean holding information about the resource to be created
public void destroyDataResource(DataResourceBean bean)
throws GridFailureException
DataResourceManagerDataResourceManager.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).
bean - A bean holding information about the resource to be destroyed
GridFailureExceptionpublic void disconnectDataResource(DataResourceBean bean)
DataResourceManagerDataResourceManager.connectDataResource(uk.ac.soton.itinnovation.grid.service.dataresource.beans.DataResourceBean).
bean - A bean holding information about the resource to be disconnectedpublic void connectDataResourceRole(DataResourceRoleBean bean)
DataResourceManager
bean - A bean holding information about the role to be connectedpublic void createDataResourceRole(DataResourceRoleBean bean)
DataResourceManager
bean - A bean holding information about the role to be created
public List<org.apache.axis.message.addressing.EndpointReferenceType> createDefaultRoles(MatchRule owner,
DataResourceBean bean,
DataResource service,
String metricURI)
throws GridFailureException
DataResourceManagerDataResourceManager.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.
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.
GridFailureException
public void destroyDataResourceRole(DataResourceRoleBean bean)
throws GridFailureException
DataResourceManagerDataResourceManager.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).
bean - A bean holding information about the role to be destroyed
GridFailureExceptionpublic void disconnectDataResourceRole(DataResourceRoleBean bean)
DataResourceManagerDataResourceManager.connectDataResourceRole(uk.ac.soton.itinnovation.grid.service.dataresource.beans.DataResourceRoleBean).
bean - A bean holding information about the role to be disconnected
public void writeDataResourceConfiguration(String resourceID,
String jdbcURL)
DataResourceManager
public void reloadConfiguration()
throws GridFailureException
DataResourceManager
GridFailureException
public static String subFromTemplate(String file,
String key,
String value)
public void saveConfiguration(String url,
String systemUser,
String systemPass,
String systemDb,
String userPrefix,
String backendHelperClass)
throws GridFailureException
GridFailureExceptionpublic void createDataResourceSubscription(DataResourceSubscriptionBean bean)
DataResourceManager
bean - A bean holding information about the subscriptionpublic void destroyDataResourceSubscription(DataResourceSubscriptionBean bean)
DataResourceManager
bean - A bean holding information about the subscriptionpublic Properties getProperties()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||