|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectuk.ac.soton.itinnovation.grid.service.utils.gridservit.GridServiceLite
uk.ac.soton.itinnovation.grid.service.ogsadai.impl.ManagedDataResource
public abstract class ManagedDataResource
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)
|
|
| 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 |
|---|
protected DataResourceManager dataResourceManager
protected OgsaDaiDataResourceDAO dataResourceDAO
protected OgsaDaiDataResourceRoleDAO dataResourceRoleDAO
protected OgsaDaiDataResourceSubscriptionDAO dataResourceSubscriptionDAO
protected static ReportAPIHelper pullPoint
protected static org.apache.log4j.Logger log
protected static final String METRIC_DATARESOURCE_URI
protected static final String METRIC_ROLE_URI
protected static final String METRIC_SUBSCRIPTION_URI
protected static final String METRIC_SUBSCRIBER_URI
protected static final Metric METRIC_DATARESOURCE
protected static final Metric METRIC_ROLE
protected static final Metric METRIC_SUBSCRIPTION
protected static final Metric METRIC_SUBSCRIBER
protected static final String OGSADAI_GROUP_SERVICE_ADMINS
protected static final String OGSADAI_GROUP_RESOURCE_ADMINS
| Constructor Detail |
|---|
public ManagedDataResource(String serviceName)
| Method Detail |
|---|
protected org.apache.axis.message.addressing.EndpointReferenceType getEPRForSLA(String resourceID)
protected abstract void ensurePoliciesDeployed()
throws GridFailureException
GridFailureException
protected void setParent(org.apache.axis.message.addressing.EndpointReferenceType child,
String parentResourceID)
child - parentResourceID -
protected void setParentService(org.apache.axis.message.addressing.EndpointReferenceType child,
String serviceAddress,
String parentResourceID)
child - serviceAddress - parentResourceID - protected org.apache.axis.message.addressing.EndpointReferenceType generateEPR(GridResource bean)
DataResourceBean,
DataResourceRoleBean and DataResourceSubscriptionBean. It sets the
OWNED_BY_SERVICE metadata appropriately.
generateEPR in class GridServiceLite
protected org.apache.axis.message.addressing.EndpointReferenceType generateEPR(GridResource bean,
boolean ownedByUser)
generateEPR(uk.ac.soton.itinnovation.grid.service.types.GridResource) that additionally sets the
OWNED_BY_USER metadata.
bean - ownedByUser -
protected void checkCreationOK(org.apache.axis.message.addressing.EndpointReferenceType epr,
Conversation managingConversation,
Metric metric,
Metric additionalMetric)
throws RemoteException
epr - the new resource, already persisted with hibernate
GridFailureException - if the resource should be destroyed
RemoteException
protected Class<? extends GridResource> getResourceType(String resourceID)
throws GridFailureException
GridServiceLite
getResourceType in class GridServiceLiteGridFailureException
protected void checkRoleSubscriberCountOK(DataResourceRoleBean role)
throws RemoteException
RemoteException
protected Conversation getManagingConversation()
throws RemoteException
RemoteExceptionprotected Conversation getManagingConversation(ManagedGridResource resource)
protected Metric getCustomRoleMetric(String uri)
public org.apache.axis.message.addressing.EndpointReferenceType connectDataResourceLocal(MatchRule owner,
String label,
Map<String,String> attributes)
throws RemoteException
RemoteException
protected org.apache.axis.message.addressing.EndpointReferenceType connectDataResourceInternal(boolean local,
Conversation managingConversation,
MatchRule owner,
String label,
Map<String,String> attributes)
throws RemoteException
RemoteException
public org.apache.axis.message.addressing.EndpointReferenceType[] createDataResource(MatchRule owner,
String label)
throws RemoteException
DataResourceManagementDataResourceManagement.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.
createDataResource in interface DataResourceManagementowner - A rule for the 'owner' PBAC role.label - A label describing the data resource that is to be created.
RemoteException
public org.apache.axis.message.addressing.EndpointReferenceType[] createDataResourceLocal(MatchRule owner,
String label,
String metricURI)
throws RemoteException
RemoteException
protected org.apache.axis.message.addressing.EndpointReferenceType[] createDataResourceInternal(boolean local,
Conversation managingConversation,
MatchRule owner,
String label,
String metricURI)
throws RemoteException
RemoteException
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
RemoteException
protected org.apache.axis.message.addressing.EndpointReferenceType subscribeInternal(String parentResourceID,
boolean local,
Conversation managingConversation,
MatchRule owner,
String label)
throws RemoteException
RemoteException
public void destroy()
throws ResourceUnknownFault,
ResourceNotDestroyedFault
destroy in interface WSResourceLifetimeResourceUnknownFault
ResourceNotDestroyedFault
public void destroyDataResourceSubscriptionLocal(String resourceID)
throws GridFailureException
GridFailureException
protected void destroyDataResourceSubscriptionInternal(String resourceID)
throws GridFailureException
GridFailureException
public void destroyDataResourceRoleLocal(String resourceID)
throws GridFailureException
GridFailureException
protected void destroyDataResourceRoleInternal(String resourceID)
throws GridFailureException
GridFailureException
public void destroyDataResourceLocal(String resourceID)
throws GridFailureException
GridFailureException
protected void destroyDataResourceInternal(String resourceID)
throws GridFailureException
GridFailureException
public org.apache.axis.message.addressing.EndpointReferenceType createSubscriptionLocal(MatchRule owner,
String label)
throws RemoteException
DataResourceRoleLocal
createSubscriptionLocal in interface DataResourceRoleLocalowner - A rule for the 'owner' PBAC role.label - A label describing the subscription that is to be created.
RemoteException
public org.apache.axis.message.addressing.EndpointReferenceType createSubscriptionLocal(String parentResourceID,
MatchRule owner,
String label)
throws RemoteException
RemoteException
public org.apache.axis.message.addressing.EndpointReferenceType createSubscription(MatchRule owner,
String label)
throws RemoteException
DataResourceRole
createSubscription in interface DataResourceRoleowner - A rule for the 'owner' PBAC role.label - A label describing the subscription that is to be created.
RemoteException
public void modifyDataResourceRoleLocal(String label,
Map<String,String> attributes)
DataResourceRoleLocal
modifyDataResourceRoleLocal in interface DataResourceRoleLocallabel - 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().
public void modifyDataResourceRole(String label,
Map<String,String> attributes)
DataResourceRole
modifyDataResourceRole in interface DataResourceRolelabel - 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().
public final void modifyDataResourceRoleInternal(String resourceID,
String label,
Map<String,String> attributes,
String metricURI)
public final void modifyDataResourceSubscriptionInternal(String resourceID,
String label)
public org.apache.axis.message.addressing.EndpointReferenceType connectDataResourceRoleLocal(String parentDataResourceID,
MatchRule owner,
String label,
Map<String,String> attributes,
String metricURI)
throws RemoteException
DataResourceLocalDataResourceLocal.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.
connectDataResourceRoleLocal in interface DataResourceLocalparentDataResourceID - 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.
RemoteException
public org.apache.axis.message.addressing.EndpointReferenceType connectDataResourceRole(String parentDataResourceID,
MatchRule owner,
String label,
Map<String,String> attributes,
String metricURI)
throws RemoteException
DataResourceDataResource.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.
connectDataResourceRole in interface DataResourceparentDataResourceID - 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.
RemoteException
public org.apache.axis.message.addressing.EndpointReferenceType createDataResourceRoleLocal(String parentDataResourceID,
MatchRule owner,
String label,
Map<String,String> attributes,
String metricURI)
throws RemoteException
DataResourceLocal#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.
createDataResourceRoleLocal in interface DataResourceLocalparentDataResourceID - 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.
RemoteException
public org.apache.axis.message.addressing.EndpointReferenceType createDataResourceRole(String parentDataResourceID,
MatchRule owner,
String label,
Map<String,String> attributes,
String metricURI)
throws RemoteException
DataResourceDataResource.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.
createDataResourceRole in interface DataResourceparentDataResourceID - 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.
RemoteExceptionpublic Map<String,String> getDataResourceRoleAttributesLocal()
DataResourceRoleLocalDataResourceManagement.getDataResourceRoleAttributeNames().
getDataResourceRoleAttributesLocal in interface DataResourceRoleLocalpublic Map<String,String> getDataResourceRoleAttributes()
DataResourceRoleDataResourceManagement.getDataResourceRoleAttributeNames().
getDataResourceRoleAttributes in interface DataResourceRole
public void modifyDataResourceLocal(String resourceID,
String label,
Map<String,String> attributes)
DataResourceLocal
modifyDataResourceLocal in interface DataResourceLocallabel - 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().
public void modifyDataResource(String label,
Map<String,String> attributes)
DataResource
modifyDataResource in interface DataResourcelabel - 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().public Map<String,String> getDataResourceAttributesLocal()
DataResourceLocalDataResourceManagement.getDataResourceAttributeNames().
getDataResourceAttributesLocal in interface DataResourceLocalpublic Map<String,String> getDataResourceAttributes()
DataResourceDataResourceManagement.getDataResourceAttributeNames().
getDataResourceAttributes in interface DataResource
public org.apache.axis.message.addressing.EndpointReferenceType connectDataResource(MatchRule owner,
String label,
Map<String,String> attributes)
throws RemoteException
DataResourceManagementDataResourceManagement.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.
connectDataResource in interface DataResourceManagementowner - 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().
RemoteException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||