|
||||||||||
| 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
public abstract class GridServiceLite
GridServiceLite is an abstract base class for web services. It provides a collection of useful helper methods for writing grid services.
| Field Summary | |
|---|---|
protected org.hibernate.SessionFactory |
factory
A hibernate session factory. |
protected GroupUtils |
groupUtils
|
protected TrustedManagementServices |
management
For services which may requires an account or SLA to be used, this object can be used to access the configuration relating to this. |
static String |
NO_ACCOUNT_NEEDED
Deprecated. |
protected PBACUtils |
pbacUtils
|
protected PDP |
pdp
PBAC 2 PDP implementation. |
static HelperProxyFactory |
proxyFactory
|
protected URL |
thisServiceAddress
The endpoint of this SOAP service. |
static WSDLCache |
wsdlCache
|
| Constructor Summary | |
|---|---|
GridServiceLite(String serviceName)
Constructor. |
|
| Method Summary | |
|---|---|
protected void |
addHibernatedObject(Object object)
Persist an object with hibernate. |
void |
addPolicyRule(PolicyRule rule)
Add an access control rule to this resource's dynamic access control policy. |
void |
addTrustedAccountService(org.apache.axis.message.addressing.EndpointReferenceType account)
|
protected void |
deleteHibernatedObject(Object object)
Delete an object persisted with hibernate. |
protected org.apache.axis.message.addressing.EndpointReferenceType |
generateEPR(GridResource bean)
Generate an EPR from a resource's bean. |
String[] |
getAvailableSignals()
|
protected String |
getConversationFromContext()
Returns the resource ID given in the SOAP header. |
protected SubjectDescription |
getCurrentUser()
Create a SubjectDescription from the Axis context's certificate (set by wss4j). |
org.apache.axis.message.addressing.EndpointReferenceType |
getEPR()
Get the EPR for this resource. |
org.apache.axis.message.addressing.EndpointReferenceType |
getEPR(String conversationID)
This can be used locally if you already have the resource ID. |
StorableInStateRepository |
getManagingConversation(GridResource resource)
Get a client proxy to a management resource. |
PolicyRule[] |
getPolicyRules()
Get the access control rules in this resource's dynamic access control policy. |
protected Key |
getPrivateKey()
Get the service's private key. |
protected String |
getResourceFromEPR(org.apache.axis.message.addressing.EndpointReferenceType EPR)
Extract the resource ID from an EPR. |
Document |
GetResourceProperty(QName qname)
|
protected org.apache.axis.message.addressing.EndpointReferenceType[] |
getResources(String pbacType,
Class type)
|
protected org.apache.axis.message.addressing.EndpointReferenceType[] |
getResources(String pbacType,
Class type,
String state)
Shared code for each service's getResources(). |
protected List<String> |
getResourcesFromEPRs(List<org.apache.axis.message.addressing.EndpointReferenceType> EPRs)
Extract the resource IDs from a list of EPR. |
protected Class<? extends GridResource> |
getResourceType(String resourceID)
Return the class of this resource's bean. |
static List<SimpleRegistry> |
getSelectedRegistries()
Return the search path of the invocation engine. |
Class |
getServiceDatabaseKey()
subclasses should overide this method to use a common key for to the hibernate database for number of interfaces on your service- ie in OGSA-DAI - OgsaDaiServiceI2 and OgsaDaiService |
protected URL |
getServiceFromEPR(org.apache.axis.message.addressing.EndpointReferenceType EPR)
Extract the service endpoint from an EPR. |
MatchPattern |
getServiceMatchPattern()
|
X509Certificate |
getServiceProviderCertificate()
Deprecated. |
SubjectDescription |
getServiceProviderID()
External function that returns the service provider ID, in the form of an Issuer key and Subject DN. |
SubjectDescription |
getServiceProviderIssuer()
External function that returns the identity of the isser of the service's certificate. |
org.apache.axis.message.addressing.EndpointReferenceType[] |
getTrustedAccountServices()
|
String[] |
getValidRoles()
List the roles the caller is permitted to see. |
static void |
loadLocalRegistry()
Reload local registry configuration and update this.engine. |
void |
removePolicyRule(PolicyRule rule)
Remove an access control rule from this resource's dynamic access control policy. |
void |
removeTrustedAccountService(org.apache.axis.message.addressing.EndpointReferenceType account)
|
protected Document |
RequestSecurityToken_Issuance(Element request)
Issue a security token. |
protected Document |
RequestSecurityToken_Validation(Element request)
Validate security tokens. |
Document |
RequestSecurityToken(Element request)
Process a WS-Trust token request. |
void |
setLabel(String label)
Change the resource's label. |
protected void |
setLabel(String label,
String conversationID)
|
String |
signal(String signalName)
|
protected MatchRule[] |
toMatchRules(PolicyRule[] rules)
For deprecrated methods. |
protected void |
validateOwner(MatchRule owner,
SubjectDescription currentUser,
String ownerRole)
Deprecated. use PBACUtils.validateOwner(uk.ac.soton.itinnovation.grid.types.MatchRule, uk.ac.soton.itinnovation.grid.types.SubjectDescription, java.lang.String) |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected org.hibernate.SessionFactory factory
@Deprecated public static final String NO_ACCOUNT_NEEDED
protected URL thisServiceAddress
protected PDP pdp
protected PBACUtils pbacUtils
protected GroupUtils groupUtils
public static final WSDLCache wsdlCache
public static final HelperProxyFactory proxyFactory
protected final TrustedManagementServices management
| Constructor Detail |
|---|
public GridServiceLite(String serviceName)
serviceName - the name of the service (the bit after the "/services/" part of the endpoint)| Method Detail |
|---|
public Class getServiceDatabaseKey()
public static List<SimpleRegistry> getSelectedRegistries()
public static void loadLocalRegistry()
public MatchPattern getServiceMatchPattern()
throws RemoteException
RemoteException
@AccessControl(disableCheck=true)
public String signal(String signalName)
throws RemoteException
RemoteException
public String[] getAvailableSignals()
throws RemoteException
RemoteException
public SubjectDescription getServiceProviderID()
throws RemoteException
RemoteException
public SubjectDescription getServiceProviderIssuer()
throws RemoteException
RemoteException
@Deprecated
public X509Certificate getServiceProviderCertificate()
throws RemoteException
RemoteException
protected Key getPrivateKey()
throws RemoteException
RemoteException
protected String getConversationFromContext()
throws ContextUnavailableException
ContextUnavailableException - if no context header was presentprotected SubjectDescription getCurrentUser()
protected String getResourceFromEPR(org.apache.axis.message.addressing.EndpointReferenceType EPR)
throws GridFailureException
GridFailureException - if the EPR does not contain a resource ID.
protected List<String> getResourcesFromEPRs(List<org.apache.axis.message.addressing.EndpointReferenceType> EPRs)
throws GridFailureException
GridFailureException - if any EPR does not contain a resource ID.
protected URL getServiceFromEPR(org.apache.axis.message.addressing.EndpointReferenceType EPR)
throws GridFailureException
GridFailureException - if the endpoint is missing or malformed
@Deprecated
protected void validateOwner(MatchRule owner,
SubjectDescription currentUser,
String ownerRole)
throws RemoteException
PBACUtils.validateOwner(uk.ac.soton.itinnovation.grid.types.MatchRule, uk.ac.soton.itinnovation.grid.types.SubjectDescription, java.lang.String)
GridFailureException - if these requirements are not met
RemoteException
protected void setLabel(String label,
String conversationID)
throws RemoteException
RemoteException
public void setLabel(String label)
throws RemoteException
ResourceMetadata
setLabel in interface ResourceMetadatalabel - the new label
RemoteException
protected Class<? extends GridResource> getResourceType(String resourceID)
throws RemoteException
RemoteException
public org.apache.axis.message.addressing.EndpointReferenceType getEPR()
throws RemoteException
ResourceMetadata
getEPR in interface ResourceMetadataRemoteExceptionthe label set with {@link setLabel},
a unique type URI,
the state of the resource,
the resource which manages this one (e.g. an SLA manages a job),
the resource which contains this one (e.g. a job service is the parent of a job)
public org.apache.axis.message.addressing.EndpointReferenceType getEPR(String conversationID)
throws RemoteException
RemoteExceptiongetEPR()protected org.apache.axis.message.addressing.EndpointReferenceType generateEPR(GridResource bean)
SingletonSessionFactory.getFactory()'s getCurrentSession
method.
Override this in sub-classes to provide extra information.
protected org.apache.axis.message.addressing.EndpointReferenceType[] getResources(String pbacType,
Class type)
throws GridFailureException
GridFailureException
protected org.apache.axis.message.addressing.EndpointReferenceType[] getResources(String pbacType,
Class type,
String state)
throws GridFailureException
GridFailureException
public Document GetResourceProperty(QName qname)
throws RemoteException
RemoteExceptionprotected void addHibernatedObject(Object object)
protected void deleteHibernatedObject(Object object)
public String[] getValidRoles()
throws RemoteException
PolicyManagementPolicyManagement.getPolicyRules().
getValidRoles in interface PolicyManagementRemoteExceptionPDP.getValidProcessRoles(java.lang.String)
@AccessControl(disableCheck=true)
public void addPolicyRule(PolicyRule rule)
throws RemoteException
PolicyManagement
addPolicyRule in interface PolicyManagementRemoteExceptionuk.ac.soton.itinnovation.grid.pbac2.pdp.PDP#addAccessControlRule
@AccessControl(disableCheck=true)
public void removePolicyRule(PolicyRule rule)
throws RemoteException
PolicyManagement
removePolicyRule in interface PolicyManagementRemoteExceptionuk.ac.soton.itinnovation.grid.pbac2.pdp.PDP#removeAccessControlRule
@AccessControl(disableCheck=true)
public PolicyRule[] getPolicyRules()
throws RemoteException
PolicyManagementPolicyManagement.getValidRoles().
getPolicyRules in interface PolicyManagementRemoteExceptionuk.ac.soton.itinnovation.grid.pbac2.pdp.PDP#getAccessControlRulesprotected MatchRule[] toMatchRules(PolicyRule[] rules)
@AccessControl(disableCheck=true)
public final Document RequestSecurityToken(Element request)
throws RemoteException
RemoteExceptionRequestSecurityToken_Issuance(org.w3c.dom.Element),
RequestSecurityToken_Validation(org.w3c.dom.Element)
protected Document RequestSecurityToken_Issuance(Element request)
throws RemoteException
RequestSecurityToken(org.w3c.dom.Element) for issuance requests.
RemoteException
protected Document RequestSecurityToken_Validation(Element request)
throws RemoteException
RequestSecurityToken(org.w3c.dom.Element) for validation requests.
RemoteExceptionpublic org.apache.axis.message.addressing.EndpointReferenceType[] getTrustedAccountServices()
public void addTrustedAccountService(org.apache.axis.message.addressing.EndpointReferenceType account)
throws RemoteException
RemoteExceptionpublic void removeTrustedAccountService(org.apache.axis.message.addressing.EndpointReferenceType account)
public StorableInStateRepository getManagingConversation(GridResource resource)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||