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

java.lang.Object
  extended by uk.ac.soton.itinnovation.grid.service.utils.gridservit.GridServiceLite
      extended by uk.ac.soton.itinnovation.grid.service.registry.CltMgtRegistryResourceImpl
All Implemented Interfaces:
DataResourceRoleLocal, CltMgtRegistryResource, WSResourceLifetime, AdvancedRegistry, SimpleRegistry, FederationSelector, IdentifiableResource, PolicyManagement, ResourceMetadata

public class CltMgtRegistryResourceImpl
extends GridServiceLite
implements CltMgtRegistryResource


Field Summary
protected  RegistryDataResourceRoleDAO dataRegistryRoleDAO
           
 
Fields inherited from class uk.ac.soton.itinnovation.grid.service.utils.gridservit.GridServiceLite
factory, groupUtils, management, NO_ACCOUNT_NEEDED, pbacUtils, pdp, proxyFactory, thisServiceAddress, wsdlCache
 
Fields inherited from interface uk.ac.soton.itinnovation.grid.comms.registry.CltMgtRegistryResource
CLT_MGT_REGISTRY_RESOURCE_TYPE
 
Fields inherited from interface uk.ac.soton.itinnovation.grid.types.FederationSelector
DEFAULT_FEDERATION_SELECTOR
 
Constructor Summary
CltMgtRegistryResourceImpl()
           
 
Method Summary
 org.apache.axis.message.addressing.EndpointReferenceType createSubscriptionLocal(MatchRule owner, String label)
          Create a subscription to this data resource role.
 void destroy()
           
 org.apache.axis.message.addressing.EndpointReferenceType findResourceByEPR(org.apache.axis.message.addressing.EndpointReferenceType reference)
          Find a resource by searching for its address and reference (conversation ID) taken from an EPR
 org.apache.axis.message.addressing.EndpointReferenceType[] findResourcesAtService(org.apache.axis.message.addressing.EndpointReferenceType service)
          Find all resources in the registry at a particular service
 org.apache.axis.message.addressing.EndpointReferenceType[] findResourcesByAddress(String pattern)
           
 org.apache.axis.message.addressing.EndpointReferenceType getBillingEPR(org.apache.axis.message.addressing.EndpointReferenceType[] targetTrustedResources, org.apache.axis.message.addressing.EndpointReferenceType targetService)
          Gets an EPR for a resource to which usage of another service can be billed.
 Map<String,String> getDataResourceRoleAttributesLocal()
          Get the attribute values of this data resource role.
 MatchRule getMatchRuleForResource()
          Get a match rule for the specific resource.
 org.apache.axis.message.addressing.EndpointReferenceType[] getRegisteredResources(String type)
          Gets registered resources given a resource/service type.
 ReferenceDocumentType[] getRegisteredResourcesByConcept(String concept)
          List the currently registered resources of a given concept.
 String getRegistryDomainModel()
          Get an XML/OWL representation of the registry domain model.
protected  Class<? extends GridResource> getResourceType(String resourceID)
          Return the class of this resource's bean.
 void insertRelationshipBetweenReferanceAbles(org.apache.axis.message.addressing.EndpointReferenceType fromReference, String relationshipName, org.apache.axis.message.addressing.EndpointReferenceType toReference)
          Insert a relationship between two resources.
 void modifyDataResourceRoleLocal(String label, Map<String,String> attributes)
          Modify parts of this data resource role.
 String[] query(String query, String languageNS)
          Query the registry for registered resources.
 void registerMonitorableResource(org.apache.axis.message.addressing.EndpointReferenceType resource, String monitorRole)
          Register a resource that is both monitorable and requires an access control update to allow the registry service to monitor the resource.
 void registerResource(org.apache.axis.message.addressing.EndpointReferenceType resource)
          Add 'resource' to the list of resources registered to this account.
 void registerResourceToConcept(org.apache.axis.message.addressing.EndpointReferenceType reference, Document referenceAble, String concept)
          Add 'reference-able' to a specific concept.
 void unregisterResource(org.apache.axis.message.addressing.EndpointReferenceType resource)
          Remove a resource previously added with SimpleRegistry.registerResource(org.apache.axis.message.addressing.EndpointReferenceType).
 void unregisterResourceFromConcept(org.apache.axis.message.addressing.EndpointReferenceType reference, String concept)
          Remove a resource previously added with #registerResource under a specific concept.
 void updateResource(org.apache.axis.message.addressing.EndpointReferenceType resource)
          Updates and existing registry
 
Methods inherited from class uk.ac.soton.itinnovation.grid.service.utils.gridservit.GridServiceLite
addHibernatedObject, addPolicyRule, addTrustedAccountService, deleteHibernatedObject, generateEPR, getAvailableSignals, getConversationFromContext, getCurrentUser, getEPR, getEPR, getManagingConversation, getPolicyRules, getPrivateKey, getResourceFromEPR, GetResourceProperty, getResources, getResources, getResourcesFromEPRs, getSelectedRegistries, getServiceDatabaseKey, getServiceFromEPR, getServiceMatchPattern, getServiceProviderCertificate, getServiceProviderID, getServiceProviderIssuer, getTrustedAccountServices, getValidRoles, loadLocalRegistry, removePolicyRule, removeTrustedAccountService, RequestSecurityToken_Issuance, RequestSecurityToken_Validation, RequestSecurityToken, setLabel, setLabel, signal, toMatchRules, 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.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.IdentifiableResource
getServiceMatchPattern
 

Field Detail

dataRegistryRoleDAO

protected RegistryDataResourceRoleDAO dataRegistryRoleDAO
Constructor Detail

CltMgtRegistryResourceImpl

public CltMgtRegistryResourceImpl()
Method Detail

getResourceType

protected Class<? extends GridResource> getResourceType(String resourceID)
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

destroy

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

registerResource

public void registerResource(org.apache.axis.message.addressing.EndpointReferenceType resource)
                      throws RemoteException
Description copied from interface: SimpleRegistry
Add 'resource' to the list of resources registered to this account.

Specified by:
registerResource in interface SimpleRegistry
Parameters:
resource - the resource to be added
Throws:
RemoteException

registerMonitorableResource

public void registerMonitorableResource(org.apache.axis.message.addressing.EndpointReferenceType resource,
                                        String monitorRole)
                                 throws RemoteException
Description copied from interface: CltMgtRegistryResource
Register a resource that is both monitorable and requires an access control update to allow the registry service to monitor the resource.

The implementation of this method adds an access control rule to the resource identified by resourceEpr such that the registry service is given the monitorRole role on the resource. This is done before registering the resource, so that the registry service has the authority to query the resource for registration data updates.

The registry service contacts monitorable resources to keep registrations up-to-date. For example, if an SLA is registered, the Registry Service will monitor the resource to keep usage report data in the registry up-to-date.

If the resource is either not monitorable or does not require an access control update for it to be monitored by the registry service, it is easier to instead use SimpleRegistry.registerResource().

Specified by:
registerMonitorableResource in interface CltMgtRegistryResource
Parameters:
resource - the monitorable resource to register.
monitorRole - the PBAC process role that the registry service must hold on resourceEpr so it can monitor it.
Throws:
RemoteException
See Also:
SimpleRegistry.registerResource(EndpointReferenceType)

unregisterResource

public void unregisterResource(org.apache.axis.message.addressing.EndpointReferenceType resource)
                        throws RemoteException
Description copied from interface: SimpleRegistry
Remove a resource previously added with SimpleRegistry.registerResource(org.apache.axis.message.addressing.EndpointReferenceType).

Specified by:
unregisterResource in interface SimpleRegistry
Throws:
RemoteException

query

public String[] query(String query,
                      String languageNS)
               throws RemoteException
Description copied from interface: AdvancedRegistry
Query the registry for registered resources.

Specified by:
query in interface AdvancedRegistry
Parameters:
query - query string
languageNS - namespace of the language in that the query is encoded
Throws:
RemoteException

getRegisteredResourcesByConcept

public ReferenceDocumentType[] getRegisteredResourcesByConcept(String concept)
                                                        throws RemoteException
Description copied from interface: AdvancedRegistry
List the currently registered resources of a given concept.

Specified by:
getRegisteredResourcesByConcept in interface AdvancedRegistry
Parameters:
concept - the concept of resources to return, or null to return all types. Returns resources added by #registerResource.
Throws:
RemoteException

insertRelationshipBetweenReferanceAbles

public void insertRelationshipBetweenReferanceAbles(org.apache.axis.message.addressing.EndpointReferenceType fromReference,
                                                    String relationshipName,
                                                    org.apache.axis.message.addressing.EndpointReferenceType toReference)
                                             throws RemoteException
Description copied from interface: AdvancedRegistry
Insert a relationship between two resources.

Specified by:
insertRelationshipBetweenReferanceAbles in interface AdvancedRegistry
Parameters:
fromReference - reference of the source reference-able of the relationship
relationshipName - name of the relationship
toReference - reference of the sink reference-able of the relationship
Throws:
RemoteException

registerResourceToConcept

public void registerResourceToConcept(org.apache.axis.message.addressing.EndpointReferenceType reference,
                                      Document referenceAble,
                                      String concept)
                               throws RemoteException
Description copied from interface: AdvancedRegistry
Add 'reference-able' to a specific concept.

Specified by:
registerResourceToConcept in interface AdvancedRegistry
Parameters:
reference - the reference of the data to be added
referenceAble - the (meta)data to be added
concept - the concept the reference-able belongs to
Throws:
RemoteException

unregisterResourceFromConcept

public void unregisterResourceFromConcept(org.apache.axis.message.addressing.EndpointReferenceType reference,
                                          String concept)
                                   throws RemoteException
Description copied from interface: AdvancedRegistry
Remove a resource previously added with #registerResource under a specific concept. This includes removing the reference as well as the reference-able.

Specified by:
unregisterResourceFromConcept in interface AdvancedRegistry
concept - the concept the resource belongs to
Throws:
RemoteException

getBillingEPR

public org.apache.axis.message.addressing.EndpointReferenceType getBillingEPR(org.apache.axis.message.addressing.EndpointReferenceType[] targetTrustedResources,
                                                                              org.apache.axis.message.addressing.EndpointReferenceType targetService)
                                                                       throws RemoteException
Description copied from interface: FederationSelector
Gets an EPR for a resource to which usage of another service can be billed.

Specified by:
getBillingEPR in interface FederationSelector
Parameters:
targetTrustedResources - - the trusted resources of the service
targetService - - the target service (which will pass the tokens on to its account service)
Returns:
an EPR for the chosen resource, including any security tokens needed to access it, or null if no EPR is required
Throws:
RemoteException - if there is a problem getting a billing token

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

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

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

getMatchRuleForResource

public MatchRule getMatchRuleForResource()
                                  throws RemoteException
Description copied from interface: CltMgtRegistryResource
Get a match rule for the specific resource.

Specified by:
getMatchRuleForResource in interface CltMgtRegistryResource
Throws:
RemoteException

getRegistryDomainModel

public String getRegistryDomainModel()
                              throws RemoteException
Description copied from interface: CltMgtRegistryResource
Get an XML/OWL representation of the registry domain model.

Specified by:
getRegistryDomainModel in interface CltMgtRegistryResource
Throws:
RemoteException

findResourcesByAddress

public org.apache.axis.message.addressing.EndpointReferenceType[] findResourcesByAddress(String pattern)
                                                                                  throws RemoteException
Throws:
RemoteException

findResourcesAtService

public org.apache.axis.message.addressing.EndpointReferenceType[] findResourcesAtService(org.apache.axis.message.addressing.EndpointReferenceType service)
                                                                                  throws RemoteException
Description copied from interface: SimpleRegistry
Find all resources in the registry at a particular service

Specified by:
findResourcesAtService in interface SimpleRegistry
Parameters:
service - The EPR of the service
Returns:
All resources at the service
Throws:
RemoteException

findResourceByEPR

public org.apache.axis.message.addressing.EndpointReferenceType findResourceByEPR(org.apache.axis.message.addressing.EndpointReferenceType reference)
                                                                           throws RemoteException
Description copied from interface: SimpleRegistry
Find a resource by searching for its address and reference (conversation ID) taken from an EPR

Specified by:
findResourceByEPR in interface SimpleRegistry
Parameters:
reference - the EPR to look for
Returns:
The resource matching the EPR or null (although the return value has the same type it may have additional meta-data)
Throws:
RemoteException

updateResource

public void updateResource(org.apache.axis.message.addressing.EndpointReferenceType resource)
                    throws RemoteException
Description copied from interface: SimpleRegistry
Updates and existing registry

Specified by:
updateResource in interface SimpleRegistry
Parameters:
resource - The endpoint to be updated
Throws:
RemoteException

getRegisteredResources

public org.apache.axis.message.addressing.EndpointReferenceType[] getRegisteredResources(String type)
                                                                                  throws RemoteException
Gets registered resources given a resource/service type.

Specified by:
getRegisteredResources in interface SimpleRegistry
Parameters:
type - e.g. http://www.it-innovation.soton.ac.uk/grid/resource/data or null
Returns:
An array of EPRs matching the type or all EPRs if type is null
Throws:
RemoteException


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