org.gcube.contentmanagement.contentmanager.stubs.calls
Class ManagerCall

java.lang.Object
  extended by WSCall
      extended by org.gcube.contentmanagement.contentmanager.stubs.calls.BaseCall
          extended by org.gcube.contentmanagement.contentmanager.stubs.calls.ManagerCall
Direct Known Subclasses:
ReadManagerCall, WriteManagerCall

public abstract class ManagerCall
extends BaseCall

Extends BaseCall for high-level calls to CollectionResource Managers.

Author:
Fabio Simeoni (University of Strathclyde)

Nested Class Summary
static class ManagerCall.DiscoveryException
          A GCUBEUnrecoverableException thrown when best-effort strategies fails for lack of query results.
 
Constructor Summary
ManagerCall(GCUBEScope scope, GCUBESecurityManager... securityManager)
          Creates an instance to use in a given scope and, optionally, with a given a security manager.
ManagerCall(java.lang.String collectionID, GCUBEScope scope, GCUBESecurityManager... securityManager)
          Creates an instance to use for a certain collection, in a given scope and, optionally, with a given a security manager.
 
Method Summary
 java.lang.String getCollectionID()
          Returns the identifier of the collection bound by the manager
 void resetQuery()
          Resets the default query used by the call.
 void setCollectionID(java.lang.String id)
          Sets the identifier of the collection bound to the manager to use in the query for the best-effort strategy.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ManagerCall

public ManagerCall(GCUBEScope scope,
                   GCUBESecurityManager... securityManager)
            throws java.lang.Exception
Creates an instance to use in a given scope and, optionally, with a given a security manager.

Parameters:
scope - the scope.
securityManager - (optional) the security manager.
Throws:
ManagerCall.DiscoveryException - if the instance could not be created.
java.lang.Exception

ManagerCall

public ManagerCall(java.lang.String collectionID,
                   GCUBEScope scope,
                   GCUBESecurityManager... securityManager)
            throws java.lang.Exception
Creates an instance to use for a certain collection, in a given scope and, optionally, with a given a security manager.

Parameters:
collectionID - the collection identifier.
scope - the scope.
securityManager - (optional) the security manager.
Throws:
ManagerCall.DiscoveryException - if the instance could not be created.
java.lang.Exception
Method Detail

setCollectionID

public void setCollectionID(java.lang.String id)
                     throws java.lang.IllegalStateException
Sets the identifier of the collection bound to the manager to use in the query for the best-effort strategy.

Parameters:
id - the identifier.
Throws:
java.lang.IllegalStateException

resetQuery

public void resetQuery()
                throws java.lang.Exception
Resets the default query used by the call.

Overrides:
resetQuery in class BaseCall
Throws:
java.lang.Exception - if the query could not be reset.

getCollectionID

public java.lang.String getCollectionID()
Returns the identifier of the collection bound by the manager

Returns:
the collectionID