uk.ac.soton.itinnovation.grid.service.ogsadai.impl
Class ManagedDataResource

java.lang.Object
  extended by uk.ac.soton.itinnovation.grid.service.utils.gridservit.GridServiceLite
      extended by uk.ac.soton.itinnovation.grid.service.ogsadai.impl.ManagedDataResource
All Implemented Interfaces:
DataResource, DataResourceLocal, DataResourceManagement, DataResourceRole, DataResourceRoleLocal, DataResourceSubscription, DataResourceSubscriptionLocal, WSResourceLifetime, PolicyManagement, ResourceMetadata
Direct Known Subclasses:
OgsaDaiServiceImpl

public abstract class ManagedDataResource
extends GridServiceLite
implements DataResourceManagement, DataResource, DataResourceLocal, DataResourceRole, DataResourceRoleLocal, DataResourceSubscription, DataResourceSubscriptionLocal

The superclass for all services that wish to manage data resources. This abstract class implements most methods from the DataResource* service interfaces. It uses a DataResourceManager implementation (obtained from ImplementationFactory) to perform operations on the backend.


Field Summary
protected  OgsaDaiDataResourceDAO dataResourceDAO
           
protected  DataResourceManager dataResourceManager
           
protected  OgsaDaiDataResourceRoleDAO dataResourceRoleDAO
           
protected  OgsaDaiDataResourceSubscriptionDAO dataResourceSubscriptionDAO
           
protected static org.apache.log4j.Logger log
           
protected static Metric METRIC_DATARESOURCE
           
protected static String METRIC_DATARESOURCE_URI
           
protected static Metric METRIC_ROLE
           
protected static String METRIC_ROLE_URI
           
protected static Metric METRIC_SUBSCRIBER
           
protected static String METRIC_SUBSCRIBER_URI
           
protected static Metric METRIC_SUBSCRIPTION
           
protected static String METRIC_SUBSCRIPTION_URI
           
protected static String OGSADAI_GROUP_RESOURCE_ADMINS
           
protected static String OGSADAI_GROUP_SERVICE_ADMINS
           
protected static ReportAPIHelper pullPoint
           
 
Fields inherited from class uk.ac.soton.itinnovation.grid.service.utils.gridservit.GridServiceLite
factory, management, NO_ACCOUNT_NEEDED, pdp, thisServiceAddress
 
Fields inherited from interface uk.ac.soton.itinnovation.grid.comms.dataresource.DataResourceManagement
OWNED_BY_SERVICE, OWNED_BY_USER
 
Fields inherited from interface uk.ac.soton.itinnovation.grid.comms.dataresource.DataResource
RESOURCE_TYPE
 
Fields inherited from interface uk.ac.soton.itinnovation.grid.comms.dataresource.DataResourceRole
RESOURCE_TYPE
 
Fields inherited from interface uk.ac.soton.itinnovation.grid.comms.dataresource.DataResourceSubscription
RESOURCE_TYPE
 
Constructor Summary
ManagedDataResource(String serviceName)
           
 
Method Summary
protected  void checkCreationOK(org.apache.axis.message.addressing.EndpointReferenceType epr, Conversation managingConversation, Metric metric, Metric additionalMetric)
          Initialise a new resource.
protected  void checkRoleSubscriberCountOK(DataResourceRoleBean role)
          Check that adding one to the subscriber count for the given role will not exceed any constraints.
 org.apache.axis.message.addressing.EndpointReferenceType connectDataResource(MatchRule owner, String label, Map<String,String> attributes)
          Connect an existing data resource.
protected  org.apache.axis.message.addressing.EndpointReferenceType connectDataResourceInternal(boolean local, Conversation managingConversation, MatchRule owner, String label, Map<String,String> attributes)
           
 org.apache.axis.message.addressing.EndpointReferenceType connectDataResourceLocal(MatchRule owner, String label, Map<String,String> attributes)
           
 org.apache.axis.message.addressing.EndpointReferenceType connectDataResourceRole(String parentDataResourceID, MatchRule owner, String label, Map<String,String> attributes, String metricURI)
          Connect an existing role.
 org.apache.axis.message.addressing.EndpointReferenceType connectDataResourceRoleLocal(String parentDataResourceID, MatchRule owner, String label, Map<String,String> attributes, String metricURI)
          Connect an existing role.
 org.apache.axis.message.addressing.EndpointReferenceType[] createDataResource(MatchRule owner, String label)
          Create a new data resource with default roles.
protected  org.apache.axis.message.addressing.EndpointReferenceType[] createDataResourceInternal(boolean local, Conversation managingConversation, MatchRule owner, String label, String metricURI)
           
 org.apache.axis.message.addressing.EndpointReferenceType[] createDataResourceLocal(MatchRule owner, String label, String metricURI)
           
 org.apache.axis.message.addressing.EndpointReferenceType createDataResourceRole(String parentDataResourceID, MatchRule owner, String label, Map<String,String> attributes, String metricURI)
          Create a role on the data resource backend.
protected  org.apache.axis.message.addressing.EndpointReferenceType createDataResourceRoleInternal(String parentDataResourceID, boolean local, Conversation managingConversation, MatchRule owner, String label, Map<String,String> attributes, String metricURI)
           
 org.apache.axis.message.addressing.EndpointReferenceType createDataResourceRoleLocal(String parentDataResourceID, MatchRule owner, String label, Map<String,String> attributes, String metricURI)
          Create a role on the data resource backend.
 org.apache.axis.message.addressing.EndpointReferenceType createSubscription(MatchRule owner, String label)
          Create a subscription to this data resource role.
 org.apache.axis.message.addressing.EndpointReferenceType createSubscriptionLocal(MatchRule owner, String label)
          Create a subscription to this data resource role.
 org.apache.axis.message.addressing.EndpointReferenceType createSubscriptionLocal(String parentResourceID, MatchRule owner, String label)
           
 void destroy()
           
protected  void destroyDataResourceInternal(String resourceID)
           
 void destroyDataResourceLocal(String resourceID)
           
protected  void destroyDataResourceRoleInternal(String resourceID)
           
 void destroyDataResourceRoleLocal(String resourceID)
           
protected  void destroyDataResourceSubscriptionInternal(String resourceID)
           
 void destroyDataResourceSubscriptionLocal(String resourceID)
           
protected abstract  void ensurePoliciesDeployed()
           
protected  org.apache.axis.message.addressing.EndpointReferenceType generateEPR(GridResource bean)
          Generate an EPR for a bean.
protected  org.apache.axis.message.addressing.EndpointReferenceType generateEPR(GridResource bean, boolean ownedByUser)
          Wrapper around generateEPR(uk.ac.soton.itinnovation.grid.service.types.GridResource) that additionally sets the OWNED_BY_USER metadata.
protected  Metric getCustomRoleMetric(String uri)
           
 Map<String,String> getDataResourceAttributes()
          Get the attribute values of this data resource.
 Map<String,String> getDataResourceAttributesLocal()
          Get the attribute values of this data resource.
 Map<String,String> getDataResourceRoleAttributes()
          Get the attribute values of this data resource role.
 Map<String,String> getDataResourceRoleAttributesLocal()
          Get the attribute values of this data resource role.
protected  org.apache.axis.message.addressing.EndpointReferenceType getEPRForSLA(String resourceID)
           
protected  Conversation getManagingConversation()
           
protected  Conversation getManagingConversation(ManagedGridResource resource)
           
protected  Class<? extends GridResource> getResourceType(String resourceID)
          Return the class of this resource's bean.
 void modifyDataResource(String label, Map<String,String> attributes)
          Modify parts of this data resource.
 void modifyDataResourceLocal(String resourceID, String label, Map<String,String> attributes)
          Modify parts of this data resource.
 void modifyDataResourceRole(String label, Map<String,String> attributes)
          Modify parts of this data resource role.
 void modifyDataResourceRoleInternal(String resourceID, String label, Map<String,String> attributes, String metricURI)
           
 void modifyDataResourceRoleLocal(String label, Map<String,String> attributes)
          Modify parts of this data resource role.
 void modifyDataResourceSubscriptionInternal(String resourceID, String label)
           
protected  void setParent(org.apache.axis.message.addressing.EndpointReferenceType child, String parentResourceID)
          Convenience method to set the parent field of an EPR
protected  void setParentService(org.apache.axis.message.addressing.EndpointReferenceType child, String serviceAddress, String parentResourceID)
          Convenience method to set the parent field of an EPR whilst explicitly specifiying parent service
protected  org.apache.axis.message.addressing.EndpointReferenceType subscribeInternal(String parentResourceID, boolean local, Conversation managingConversation, MatchRule owner, String label)
           
 
Methods inherited from class uk.ac.soton.itinnovation.grid.service.utils.gridservit.GridServiceLite
addHibernatedObject, addPolicyRule, addTrustedAccountService, deleteHibernatedObject, getAvailableSignals, getConversationFromContext, getCurrentUser, getEPR, getEPR, getManagingConversation, getPolicyRules, getPrivateKey, getResourceFromEPR, GetResourceProperty, getResources, getResources, getResourcesFromEPRs, getServiceFromEPR, getServiceProviderCertificate, getServiceProviderID, getServiceProviderIssuer, getTrustedAccountServices, getValidRoles, removePolicyRule, removeTrustedAccountService, RequestSecurityToken_Issuance, RequestSecurityToken_Validation, RequestSecurityToken, setLabel, setLabel, signal, validateOwner
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface uk.ac.soton.itinnovation.grid.comms.dataresource.DataResourceManagement
getDataResourceAttributeNames, getDataResourceRoleAttributeNames
 
Methods inherited from interface uk.ac.soton.itinnovation.grid.types.ResourceMetadata
getEPR, setLabel
 
Methods inherited from interface uk.ac.soton.itinnovation.grid.types.PolicyManagement
addPolicyRule, getPolicyRules, getValidRoles, removePolicyRule
 
Methods inherited from interface uk.ac.soton.itinnovation.grid.types.ResourceMetadata
getEPR, setLabel
 
Methods inherited from interface uk.ac.soton.itinnovation.grid.types.PolicyManagement
addPolicyRule, getPolicyRules, getValidRoles, removePolicyRule
 
Methods inherited from interface uk.ac.soton.itinnovation.grid.types.ResourceMetadata
getEPR, setLabel
 
Methods inherited from interface uk.ac.soton.itinnovation.grid.types.PolicyManagement
addPolicyRule, getPolicyRules, getValidRoles, removePolicyRule
 

Field Detail

dataResourceManager

protected DataResourceManager dataResourceManager

dataResourceDAO

protected OgsaDaiDataResourceDAO dataResourceDAO

dataResourceRoleDAO

protected OgsaDaiDataResourceRoleDAO dataResourceRoleDAO

dataResourceSubscriptionDAO

protected OgsaDaiDataResourceSubscriptionDAO dataResourceSubscriptionDAO

pullPoint

protected static ReportAPIHelper pullPoint

log

protected static org.apache.log4j.Logger log

METRIC_DATARESOURCE_URI

protected static final String METRIC_DATARESOURCE_URI
See Also:
Constant Field Values

METRIC_ROLE_URI

protected static final String METRIC_ROLE_URI
See Also:
Constant Field Values

METRIC_SUBSCRIPTION_URI

protected static final String METRIC_SUBSCRIPTION_URI
See Also:
Constant Field Values

METRIC_SUBSCRIBER_URI

protected static final String METRIC_SUBSCRIBER_URI
See Also:
Constant Field Values

METRIC_DATARESOURCE

protected static final Metric METRIC_DATARESOURCE

METRIC_ROLE

protected static final Metric METRIC_ROLE

METRIC_SUBSCRIPTION

protected static final Metric METRIC_SUBSCRIPTION

METRIC_SUBSCRIBER

protected static final Metric METRIC_SUBSCRIBER

OGSADAI_GROUP_SERVICE_ADMINS

protected static final String OGSADAI_GROUP_SERVICE_ADMINS
See Also:
Constant Field Values

OGSADAI_GROUP_RESOURCE_ADMINS

protected static final String OGSADAI_GROUP_RESOURCE_ADMINS
See Also:
Constant Field Values
Constructor Detail

ManagedDataResource

public ManagedDataResource(String serviceName)
Method Detail

getEPRForSLA

protected org.apache.axis.message.addressing.EndpointReferenceType getEPRForSLA(String resourceID)

ensurePoliciesDeployed

protected abstract void ensurePoliciesDeployed()
                                        throws GridFailureException
Throws:
GridFailureException

setParent

protected void setParent(org.apache.axis.message.addressing.EndpointReferenceType child,
                         String parentResourceID)
Convenience method to set the parent field of an EPR

Parameters:
child -
parentResourceID -

setParentService

protected void setParentService(org.apache.axis.message.addressing.EndpointReferenceType child,
                                String serviceAddress,
                                String parentResourceID)
Convenience method to set the parent field of an EPR whilst explicitly specifiying parent service

Parameters:
child -
serviceAddress -
parentResourceID -

generateEPR

protected org.apache.axis.message.addressing.EndpointReferenceType generateEPR(GridResource bean)
Generate an EPR for a bean. This method can handle DataResourceBean, DataResourceRoleBean and DataResourceSubscriptionBean. It sets the OWNED_BY_SERVICE metadata appropriately.

Overrides:
generateEPR in class GridServiceLite

generateEPR

protected org.apache.axis.message.addressing.EndpointReferenceType generateEPR(GridResource bean,
                                                                               boolean ownedByUser)
Wrapper around generateEPR(uk.ac.soton.itinnovation.grid.service.types.GridResource) that additionally sets the OWNED_BY_USER metadata.

Parameters:
bean -
ownedByUser -

checkCreationOK

protected void checkCreationOK(org.apache.axis.message.addressing.EndpointReferenceType epr,
                               Conversation managingConversation,
                               Metric metric,
                               Metric additionalMetric)
                        throws RemoteException
Initialise a new resource. If this method throws an exception, then new resource will be destroyed.

Parameters:
epr - the new resource, already persisted with hibernate
Throws:
GridFailureException - if the resource should be destroyed
RemoteException

getResourceType

protected Class<? extends GridResource> getResourceType(String resourceID)
                                                 throws GridFailureException
Description copied from class: GridServiceLite
Return the class of this resource's bean. Override this in subclasses if your service is contextualised. Often, resourceID can be ignored as each service only manages one type of bean anyway.

Overrides:
getResourceType in class GridServiceLite
Throws:
GridFailureException

checkRoleSubscriberCountOK

protected void checkRoleSubscriberCountOK(DataResourceRoleBean role)
                                   throws RemoteException
Check that adding one to the subscriber count for the given role will not exceed any constraints.

Throws:
RemoteException

getManagingConversation

protected Conversation getManagingConversation()
                                        throws RemoteException
Throws:
RemoteException

getManagingConversation

protected Conversation getManagingConversation(ManagedGridResource resource)

getCustomRoleMetric

protected Metric getCustomRoleMetric(String uri)

connectDataResourceLocal

public org.apache.axis.message.addressing.EndpointReferenceType connectDataResourceLocal(MatchRule owner,
                                                                                         String label,
                                                                                         Map<String,String> attributes)
                                                                                  throws RemoteException
Throws:
RemoteException

connectDataResourceInternal

protected org.apache.axis.message.addressing.EndpointReferenceType connectDataResourceInternal(boolean local,
                                                                                               Conversation managingConversation,
                                                                                               MatchRule owner,
                                                                                               String label,
                                                                                               Map<String,String> attributes)
                                                                                        throws RemoteException
Throws:
RemoteException

createDataResource

public org.apache.axis.message.addressing.EndpointReferenceType[] createDataResource(MatchRule owner,
                                                                                     String label)
                                                                              throws RemoteException
Description copied from interface: DataResourceManagement
Create a new data resource with default roles. Unlike DataResourceManagement.connectDataResource(uk.ac.soton.itinnovation.grid.types.MatchRule, java.lang.String, java.util.Map), this method actually creates a new resource on the backend. It may also create some default roles that can be used to access the new resource.

Specified by:
createDataResource in interface DataResourceManagement
Parameters:
owner - A rule for the 'owner' PBAC role.
label - A label describing the data resource that is to be created.
Returns:
An array of EPRs describing the data resource and all roles that were created.
Throws:
RemoteException

createDataResourceLocal

public org.apache.axis.message.addressing.EndpointReferenceType[] createDataResourceLocal(MatchRule owner,
                                                                                          String label,
                                                                                          String metricURI)
                                                                                   throws RemoteException
Throws:
RemoteException

createDataResourceInternal

protected org.apache.axis.message.addressing.EndpointReferenceType[] createDataResourceInternal(boolean local,
                                                                                                Conversation managingConversation,
                                                                                                MatchRule owner,
                                                                                                String label,
                                                                                                String metricURI)
                                                                                         throws RemoteException
Throws:
RemoteException

createDataResourceRoleInternal

protected org.apache.axis.message.addressing.EndpointReferenceType createDataResourceRoleInternal(String parentDataResourceID,
                                                                                                  boolean local,
                                                                                                  Conversation managingConversation,
                                                                                                  MatchRule owner,
                                                                                                  String label,
                                                                                                  Map<String,String> attributes,
                                                                                                  String metricURI)
                                                                                           throws RemoteException
Throws:
RemoteException

subscribeInternal

protected org.apache.axis.message.addressing.EndpointReferenceType subscribeInternal(String parentResourceID,
                                                                                     boolean local,
                                                                                     Conversation managingConversation,
                                                                                     MatchRule owner,
                                                                                     String label)
                                                                              throws RemoteException
Throws:
RemoteException

destroy

public void destroy()
             throws ResourceUnknownFault,
                    ResourceNotDestroyedFault
Specified by:
destroy in interface WSResourceLifetime
Throws:
ResourceUnknownFault
ResourceNotDestroyedFault

destroyDataResourceSubscriptionLocal

public void destroyDataResourceSubscriptionLocal(String resourceID)
                                          throws GridFailureException
Throws:
GridFailureException

destroyDataResourceSubscriptionInternal

protected void destroyDataResourceSubscriptionInternal(String resourceID)
                                                throws GridFailureException
Throws:
GridFailureException

destroyDataResourceRoleLocal

public void destroyDataResourceRoleLocal(String resourceID)
                                  throws GridFailureException
Throws:
GridFailureException

destroyDataResourceRoleInternal

protected void destroyDataResourceRoleInternal(String resourceID)
                                        throws GridFailureException
Throws:
GridFailureException

destroyDataResourceLocal

public void destroyDataResourceLocal(String resourceID)
                              throws GridFailureException
Throws:
GridFailureException

destroyDataResourceInternal

protected void destroyDataResourceInternal(String resourceID)
                                    throws GridFailureException
Throws:
GridFailureException

createSubscriptionLocal

public org.apache.axis.message.addressing.EndpointReferenceType createSubscriptionLocal(MatchRule owner,
                                                                                        String label)
                                                                                 throws RemoteException
Description copied from interface: DataResourceRoleLocal
Create a subscription to this data resource role.

Specified by:
createSubscriptionLocal in interface DataResourceRoleLocal
Parameters:
owner - A rule for the 'owner' PBAC role.
label - A label describing the subscription that is to be created.
Returns:
An EPR describing the subscription.
Throws:
RemoteException

createSubscriptionLocal

public org.apache.axis.message.addressing.EndpointReferenceType createSubscriptionLocal(String parentResourceID,
                                                                                        MatchRule owner,
                                                                                        String label)
                                                                                 throws RemoteException
Throws:
RemoteException

createSubscription

public org.apache.axis.message.addressing.EndpointReferenceType createSubscription(MatchRule owner,
                                                                                   String label)
                                                                            throws RemoteException
Description copied from interface: DataResourceRole
Create a subscription to this data resource role.

Specified by:
createSubscription in interface DataResourceRole
Parameters:
owner - A rule for the 'owner' PBAC role.
label - A label describing the subscription that is to be created.
Returns:
An EPR describing the subscription.
Throws:
RemoteException

modifyDataResourceRoleLocal

public void modifyDataResourceRoleLocal(String label,
                                        Map<String,String> attributes)
Description copied from interface: DataResourceRoleLocal
Modify parts of this data resource role.

Specified by:
modifyDataResourceRoleLocal in interface DataResourceRoleLocal
Parameters:
label - The new label. If null, the label will not be changed.
attributes - A new key-value map of attributes. Any attributes not specified in this map will not be modified or removed. Keys should be of the set DataResourceManagement.getDataResourceRoleAttributeNames().

modifyDataResourceRole

public void modifyDataResourceRole(String label,
                                   Map<String,String> attributes)
Description copied from interface: DataResourceRole
Modify parts of this data resource role.

Specified by:
modifyDataResourceRole in interface DataResourceRole
Parameters:
label - The new label. If null, the label will not be changed.
attributes - A new key-value map of attributes. Any attributes not specified in this map will not be modified or removed. Keys should be of the set DataResourceManagement.getDataResourceRoleAttributeNames().

modifyDataResourceRoleInternal

public final void modifyDataResourceRoleInternal(String resourceID,
                                                 String label,
                                                 Map<String,String> attributes,
                                                 String metricURI)

modifyDataResourceSubscriptionInternal

public final void modifyDataResourceSubscriptionInternal(String resourceID,
                                                         String label)

connectDataResourceRoleLocal

public org.apache.axis.message.addressing.EndpointReferenceType connectDataResourceRoleLocal(String parentDataResourceID,
                                                                                             MatchRule owner,
                                                                                             String label,
                                                                                             Map<String,String> attributes,
                                                                                             String metricURI)
                                                                                      throws RemoteException
Description copied from interface: DataResourceLocal
Connect an existing role. Unlike DataResourceLocal.createDataResourceRoleLocal(java.lang.String, uk.ac.soton.itinnovation.grid.types.MatchRule, java.lang.String, java.util.Map, java.lang.String), this method does not create the role on the backend and the credentials specified in attributes should describe a valid existing role. metricURI should typically be ignored when this method is called by SOAP users, as it only makes sense for the service administrator to specify metrics.

Specified by:
connectDataResourceRoleLocal in interface DataResourceLocal
Parameters:
parentDataResourceID - The resourceID of the DataResource that this role applies to. If null, the resourceID is fetched from the context of the SOAP operation.
owner - A rule for the 'owner' PBAC role.
label - A label describing the role that is to be created.
attributes - A key-value map of attributes describing the credentials for this role. Keys should be from the set DataResourceManagement.getDataResourceRoleAttributeNames().
metricURI - The URI of a custom metric for this role. Typically ignored when provided over SOAP.
Returns:
An EPR describing the role
Throws:
RemoteException

connectDataResourceRole

public org.apache.axis.message.addressing.EndpointReferenceType connectDataResourceRole(String parentDataResourceID,
                                                                                        MatchRule owner,
                                                                                        String label,
                                                                                        Map<String,String> attributes,
                                                                                        String metricURI)
                                                                                 throws RemoteException
Description copied from interface: DataResource
Connect an existing role. Unlike DataResource.createDataResourceRole(java.lang.String, uk.ac.soton.itinnovation.grid.types.MatchRule, java.lang.String, java.util.Map, java.lang.String), this method does not create the role on the backend and the credentials specified in attributes should describe a valid existing role. metricURI should typically be ignored when this method is called by SOAP users, as it only makes sense for the service administrator to specify metrics.

Specified by:
connectDataResourceRole in interface DataResource
Parameters:
parentDataResourceID - The resourceID of the DataResource that this role applies to. If null, the resourceID is fetched from the context of the SOAP operation.
owner - A rule for the 'owner' PBAC role.
label - A label describing the role that is to be created.
attributes - A key-value map of attributes describing the credentials for this role. Keys should be from the set DataResourceManagement.getDataResourceRoleAttributeNames().
metricURI - The URI of a custom metric for this role. Typically ignored when provided over SOAP.
Returns:
An EPR describing the role
Throws:
RemoteException

createDataResourceRoleLocal

public org.apache.axis.message.addressing.EndpointReferenceType createDataResourceRoleLocal(String parentDataResourceID,
                                                                                            MatchRule owner,
                                                                                            String label,
                                                                                            Map<String,String> attributes,
                                                                                            String metricURI)
                                                                                     throws RemoteException
Description copied from interface: DataResourceLocal
Create a role on the data resource backend. Unlike #connectDataResourceRole, this method actually creates the role on the backend before returning a resource representing it. Normally this method will be hidden from SOAP users, and only called by DataResourceManager#createDefaultRoles. metricURI should typically be ignored if this method were to be called by SOAP users, as it only makes sense for the service administrator to specify metrics.

Specified by:
createDataResourceRoleLocal in interface DataResourceLocal
Parameters:
parentDataResourceID - The resourceID of the DataResource that this role applies to. If null, the resourceID is fetched from the context of the SOAP operation.
owner - A rule for the 'owner' PBAC role.
label - A label describing the role that is to be created.
attributes - A key-value map of attributes describing the credentials for this role. Keys should be from the set DataResourceManagement.getDataResourceRoleAttributeNames().
metricURI - The URI of a custom metric for this role. Typically ignored when provided over SOAP.
Returns:
An EPR describing the role
Throws:
RemoteException

createDataResourceRole

public org.apache.axis.message.addressing.EndpointReferenceType createDataResourceRole(String parentDataResourceID,
                                                                                       MatchRule owner,
                                                                                       String label,
                                                                                       Map<String,String> attributes,
                                                                                       String metricURI)
                                                                                throws RemoteException
Description copied from interface: DataResource
Create a role on the data resource backend. Unlike DataResource.connectDataResourceRole(java.lang.String, uk.ac.soton.itinnovation.grid.types.MatchRule, java.lang.String, java.util.Map, java.lang.String), this method actually creates the role on the backend before returning a resource representing it. Normally this method will be hidden from SOAP users, and only called by 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). metricURI should typically be ignored if this method were to be called by SOAP users, as it only makes sense for the service administrator to specify metrics.

Specified by:
createDataResourceRole in interface DataResource
Parameters:
parentDataResourceID - The resourceID of the DataResource that this role applies to. If null, the resourceID is fetched from the context of the SOAP operation.
owner - A rule for the 'owner' PBAC role.
label - A label describing the role that is to be created.
attributes - A key-value map of attributes describing the credentials for this role. Keys should be from the set DataResourceManagement.getDataResourceRoleAttributeNames().
metricURI - The URI of a custom metric for this role. Typically ignored when provided over SOAP.
Returns:
An EPR describing the role
Throws:
RemoteException

getDataResourceRoleAttributesLocal

public Map<String,String> getDataResourceRoleAttributesLocal()
Description copied from interface: DataResourceRoleLocal
Get the attribute values of this data resource role. The return type is a key-value map of attributes. Keys will be from the set DataResourceManagement.getDataResourceRoleAttributeNames().

Specified by:
getDataResourceRoleAttributesLocal in interface DataResourceRoleLocal

getDataResourceRoleAttributes

public Map<String,String> getDataResourceRoleAttributes()
Description copied from interface: DataResourceRole
Get the attribute values of this data resource role. The return type is a key-value map of attributes. Keys will be from the set DataResourceManagement.getDataResourceRoleAttributeNames().

Specified by:
getDataResourceRoleAttributes in interface DataResourceRole

modifyDataResourceLocal

public void modifyDataResourceLocal(String resourceID,
                                    String label,
                                    Map<String,String> attributes)
Description copied from interface: DataResourceLocal
Modify parts of this data resource.

Specified by:
modifyDataResourceLocal in interface DataResourceLocal
label - The new label. If null, the label will not be changed.
attributes - A new key-value map of attributes. Any attributes not specified in this map will not be modified or removed. Keys should be of the set DataResourceManagement.getDataResourceAttributeNames().

modifyDataResource

public void modifyDataResource(String label,
                               Map<String,String> attributes)
Description copied from interface: DataResource
Modify parts of this data resource.

Specified by:
modifyDataResource in interface DataResource
Parameters:
label - The new label. If null, the label will not be changed.
attributes - A new key-value map of attributes. Any attributes not specified in this map will not be modified or removed. Keys should be of the set DataResourceManagement.getDataResourceAttributeNames().

getDataResourceAttributesLocal

public Map<String,String> getDataResourceAttributesLocal()
Description copied from interface: DataResourceLocal
Get the attribute values of this data resource. The return type is a key-value map of attributes. Keys will be from the set DataResourceManagement.getDataResourceAttributeNames().

Specified by:
getDataResourceAttributesLocal in interface DataResourceLocal

getDataResourceAttributes

public Map<String,String> getDataResourceAttributes()
Description copied from interface: DataResource
Get the attribute values of this data resource. The return type is a key-value map of attributes. Keys will be from the set DataResourceManagement.getDataResourceAttributeNames().

Specified by:
getDataResourceAttributes in interface DataResource

connectDataResource

public org.apache.axis.message.addressing.EndpointReferenceType connectDataResource(MatchRule owner,
                                                                                    String label,
                                                                                    Map<String,String> attributes)
                                                                             throws RemoteException
Description copied from interface: DataResourceManagement
Connect an existing data resource. Unlike DataResourceManagement.createDataResource(uk.ac.soton.itinnovation.grid.types.MatchRule, java.lang.String), this method does not create a new resource, and therefore the connection information provided in attributes must describe a valid existing resource. This method creates no roles for accessing the resource.

Specified by:
connectDataResource in interface DataResourceManagement
Parameters:
owner - A rule for the 'owner' PBAC role.
label - A label describing the data resource that is to be created.
attributes - A key-value map of attributes describing how to connect to the data resource. Keys should be from the set DataResourceManagement.getDataResourceAttributeNames().
Returns:
An EPR describing the data resource.
Throws:
RemoteException


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