uk.ac.soton.itinnovation.grid.service.registry
Class CltMgtRegistryServiceImpl

java.lang.Object
  extended by uk.ac.soton.itinnovation.grid.service.utils.gridservit.GridServiceLite
      extended by uk.ac.soton.itinnovation.grid.service.registry.CltMgtRegistryServiceImpl
All Implemented Interfaces:
DataResourceLocal, DataResourceManagement, CltMgtRegistryService, WebAdmin, WSRFService, GridService, PolicyManagement, ResourceMetadata

public class CltMgtRegistryServiceImpl
extends GridServiceLite
implements CltMgtRegistryService


Field Summary
protected  RegistryDataResourceRoleDAO dataRegistryRoleDAO
           
 
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.registry.CltMgtRegistryService
CLT_MGT_REGISTRY_SERVICE_TYPE
 
Fields inherited from interface uk.ac.soton.itinnovation.grid.comms.dataresource.DataResourceManagement
OWNED_BY_SERVICE, OWNED_BY_USER
 
Constructor Summary
CltMgtRegistryServiceImpl()
           
 
Method Summary
 org.apache.axis.message.addressing.EndpointReferenceType connectDataResource(MatchRule owner, String label, Map<String,String> attributes)
          Connect an existing data resource.
 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.
 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 createRegistry(String label, MatchRule owner)
           
 void ensurePoliciesDeployed()
          Ensure that any required PBAC policies are deployed.
protected  org.apache.axis.message.addressing.EndpointReferenceType generateEPR(GridResource bean)
          Generate an EPR from a resource's bean.
 Document getAtomFeed(String atomFeed, String serviceBase)
          Return notices from the service as an Atom feed.
 String[] getDataResourceAttributeNames()
          Get a list of attribute names that are valid for data resources.
 Map<String,String> getDataResourceAttributesLocal()
          Get the attribute values of this data resource.
 String[] getDataResourceRoleAttributeNames()
          Get a list of attribute names that are valid for data resource roles.
 org.apache.axis.message.addressing.EndpointReferenceType[] getResources()
          List the resources managed by this service for which the caller has some role.
 void modifyDataResourceLocal(String resourceId, String label, Map<String,String> attributes)
          Modify parts of this data resource.
 void reloadConfiguration()
          Reload the configuration.
 
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, getResourceType, 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.wsrf.WSRFService
GetResourceProperty
 
Methods inherited from interface uk.ac.soton.itinnovation.grid.types.GridService
getServiceProviderID, getServiceProviderIssuer
 

Field Detail

dataRegistryRoleDAO

protected RegistryDataResourceRoleDAO dataRegistryRoleDAO
Constructor Detail

CltMgtRegistryServiceImpl

public CltMgtRegistryServiceImpl()
Method Detail

reloadConfiguration

public void reloadConfiguration()
                         throws GridFailureException
Reload the configuration. Used by the admin tool.

Throws:
Exception - if the configuration is not yet valid
GridFailureException

ensurePoliciesDeployed

public void ensurePoliciesDeployed()
                            throws GridFailureException
Description copied from interface: WebAdmin
Ensure that any required PBAC policies are deployed.

Specified by:
ensurePoliciesDeployed in interface WebAdmin
Throws:
GridFailureException

getAtomFeed

public Document getAtomFeed(String atomFeed,
                            String serviceBase)
                     throws GridFailureException
Return notices from the service as an Atom feed.

Specified by:
getAtomFeed in interface WebAdmin
Parameters:
atomFeed - the URL of the feed
serviceBase - the service administration URL (for creating hyperlinks)
Throws:
GridFailureException
See Also:
AtomUtils

getResources

public org.apache.axis.message.addressing.EndpointReferenceType[] getResources()
                                                                        throws RemoteException
Description copied from interface: GridService
List the resources managed by this service for which the caller has some role.

Specified by:
getResources in interface GridService
Throws:
RemoteException

generateEPR

protected org.apache.axis.message.addressing.EndpointReferenceType generateEPR(GridResource bean)
Description copied from class: GridServiceLite
Generate an EPR from a resource's bean. Note: the bean's hibernate session is open when this method is invoked, and can be retreived using SingletonSessionFactory.getFactory()'s getCurrentSession method. Override this in sub-classes to provide extra information.

Overrides:
generateEPR in class GridServiceLite

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

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

getDataResourceAttributeNames

public String[] getDataResourceAttributeNames()
Description copied from interface: DataResourceManagement
Get a list of attribute names that are valid for data resources. This method is useful for user interfaces that wish to provide users with a means to connect or edit data resources.

Specified by:
getDataResourceAttributeNames in interface DataResourceManagement

getDataResourceRoleAttributeNames

public String[] getDataResourceRoleAttributeNames()
Description copied from interface: DataResourceManagement
Get a list of attribute names that are valid for data resource roles. This method is useful for user interfaces that wish to provide users with a means to connect, create, or edit data resource roles.

Specified by:
getDataResourceRoleAttributeNames in interface DataResourceManagement

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

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

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

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().

createRegistry

public org.apache.axis.message.addressing.EndpointReferenceType createRegistry(String label,
                                                                               MatchRule owner)
                                                                        throws RemoteException
Specified by:
createRegistry in interface CltMgtRegistryService
Throws:
RemoteException


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