org.gcube.dir.master.stubs
Class MasterCall

java.lang.Object
  extended by 
      extended by org.gcube.dir.master.stubs.MasterCall

public class MasterCall
extends

Specialises GCUBEStagingServiceHandler to interactions with the DIR Master service.

Author:
Fabio Simeoni (University of Strathclyde)

Nested Class Summary
static class MasterCall.ServiceClient
          Extends GCUBEServiceClientImpl to serve as a cache of endpoints to the RIs of the Master service.
 
Constructor Summary
MasterCall(GCUBEScope scope, GCUBESecurityManager... securityManager)
          Creates an instance from a GCUBEScope and a GCUBESecurityManager.
MasterCall(GCUBEScopeManager scopeManager, GCUBESecurityManager... securityManager)
          Creates an instance from a GCUBEScopeManager and a GCUBESecurityManager.
 
Method Summary
 java.util.List<RPDocument> findWSResources()
          
 java.lang.String[] getCollectionIDs()
          Returns the identifiers of the collections managed by the Master WR-Resource.
 WSResourceQuery getWSQuery()
          Returns the query used to discover WS Resource of the Master service.
 java.lang.String merge(IFusionParameters params)
          Merges query results retrieved from the collections managed by the Master in accordance with fusion parameters.
 ICollectionRanking select(ISelectionParameters params)
          Selects over the collections managed by the Master in accordance with selection parameters.
 void setEPR(org.apache.axis.message.addressing.EndpointReferenceType epr)
          Sets a specific endpoint as the target of the call.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MasterCall

public MasterCall(GCUBEScopeManager scopeManager,
                  GCUBESecurityManager... securityManager)
           throws java.lang.Exception
Creates an instance from a GCUBEScopeManager and a GCUBESecurityManager.

Parameters:
scopeManager - the scope manager.
securityManager - the security manager.
Throws:
java.lang.Exception - if the handler could not be created.

MasterCall

public MasterCall(GCUBEScope scope,
                  GCUBESecurityManager... securityManager)
           throws java.lang.Exception
Creates an instance from a GCUBEScope and a GCUBESecurityManager.

Parameters:
scope - the scope.
securityManager - the security manager
Throws:
java.lang.Exception - if the handler could not be created.
Method Detail

getWSQuery

public WSResourceQuery getWSQuery()
Returns the query used to discover WS Resource of the Master service.

Returns:
the query.

findWSResources

public java.util.List<RPDocument> findWSResources()
                                           throws java.lang.Exception

Throws:
java.lang.Exception

getCollectionIDs

public java.lang.String[] getCollectionIDs()
                                    throws GCUBEException,
                                           java.lang.Exception,
                                           java.lang.IllegalArgumentException
Returns the identifiers of the collections managed by the Master WR-Resource.

Returns:
the identifiers.
Throws:
java.lang.Exception - if the call failed due to a local error.
GCUBEException - if call failed due to remote error.
java.lang.IllegalArgumentException

select

public ICollectionRanking select(ISelectionParameters params)
                          throws GCUBEException,
                                 java.lang.Exception
Selects over the collections managed by the Master in accordance with selection parameters.

Parameters:
params - the parameters.
Returns:
a collection ranking.
Throws:
java.lang.Exception - if the call failed due to a local error.
GCUBEException - if call failed due to remote error.

merge

public java.lang.String merge(IFusionParameters params)
                       throws GCUBEException,
                              java.lang.Exception
Merges query results retrieved from the collections managed by the Master in accordance with fusion parameters.

Parameters:
params - the parameters.
Returns:
a locator to the merged results .
Throws:
java.lang.Exception - if the call failed due to a local error.
GCUBEException - if call failed due to remote error.

setEPR

public void setEPR(org.apache.axis.message.addressing.EndpointReferenceType epr)
Sets a specific endpoint as the target of the call.

Parameters:
epr - the endpoint.