sample.impl
Class SampleServiceImpl

java.lang.Object
  extended by uk.ac.soton.itinnovation.grid.service.utils.gridservit.GridServiceLite
      extended by sample.impl.SampleServiceImpl
All Implemented Interfaces:
SampleService, ManagedGridService, ReportAPI, WebAdmin, GridService, PolicyManagement, ResourceMetadata

public class SampleServiceImpl
extends GridServiceLite
implements SampleService

The implementation of SampleService. The mapping from the interface to this class is in the implementationfactory.properties file.


Field Summary
 
Fields inherited from class uk.ac.soton.itinnovation.grid.service.utils.gridservit.GridServiceLite
factory, management, NO_ACCOUNT_NEEDED, pdp, thisServiceAddress
 
Fields inherited from interface sample.SampleService
SAMPLE_SERVICE_RESOURCE_TYPE
 
Fields inherited from interface uk.ac.soton.itinnovation.grid.comms.management.ManagedGridService
FREE_SERVICE
 
Constructor Summary
SampleServiceImpl()
           
 
Method Summary
 org.apache.axis.message.addressing.EndpointReferenceType createSampleResource(String label, MatchPattern owner)
          Create a new resource.
 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.
 NotificationMessage[] getMessages()
          Returns all usage messages
 NotificationMessage[] getMessagesN(int MaximumNumber)
          Returns usage messages
 org.apache.axis.message.addressing.EndpointReferenceType[] getResources()
          List the resources managed by this service for which the caller has some role.
 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.management.ManagedGridService
addTrustedAccountService, getTrustedAccountServices, removeTrustedAccountService
 
Methods inherited from interface uk.ac.soton.itinnovation.grid.types.GridService
getServiceProviderID, getServiceProviderIssuer
 

Constructor Detail

SampleServiceImpl

public SampleServiceImpl()
Method Detail

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

reloadConfiguration

public void reloadConfiguration()
                         throws Exception
Reload the configuration. Can be used by the admin tool to reload the configuration without restarting tomcat.

Throws:
Exception - if the configuration is not yet valid

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

createSampleResource

public org.apache.axis.message.addressing.EndpointReferenceType createSampleResource(String label,
                                                                                     MatchPattern owner)
                                                                              throws RemoteException
Description copied from interface: SampleService
Create a new resource. Calling this may require an account or an SLA to be specified in the SOAP header (or may require nothing at all), depending on how the service has been configured.

On success, the EPR of the new resource is returned. Anyone who matches the 'owner' rule can access the resource as its owner. Typically, this rule just matches the identity of the person creating the resource.

Specified by:
createSampleResource in interface SampleService
Parameters:
label - A label for the new resource
owner - A pattern to allow access by the new resource's owner
Returns:
the EPR of the new resource
Throws:
RemoteException

getResources

public org.apache.axis.message.addressing.EndpointReferenceType[] getResources()
                                                                        throws GridFailureException
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:
GridFailureException

getAtomFeed

public Document getAtomFeed(String atomFeed,
                            String serviceBase)
Return notices from the service as an Atom feed. These notices are displayed on the main admin page and can also be polled by the administrator using a news aggregator. The feed should be used to alert the admin to configuration problems and any other important issues that come up.

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

getMessagesN

public NotificationMessage[] getMessagesN(int MaximumNumber)
Description copied from interface: ReportAPI
Returns usage messages

Specified by:
getMessagesN in interface ReportAPI
Parameters:
MaximumNumber - of messages. If more available returns the first.
Returns:
an array containing usage messages.

getMessages

public NotificationMessage[] getMessages()
Description copied from interface: ReportAPI
Returns all usage messages

Specified by:
getMessages in interface ReportAPI
Returns:
an array containing all usage messages.


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