org.gcube.contentmanagement.viewmanager.stubs.calls
Class ViewCall

java.lang.Object
  extended by WSCall
      extended by org.gcube.contentmanagement.viewmanager.stubs.calls.ViewCall

public class ViewCall
extends WSCall

A call to the ViewResource Manager.

A ViewCall call may target known service instances or else do its best to find and talk with those which have the required plugin. It may be used repeatedly and it will remember the service instance it last used successfully.

Author:
Fabio Simeoni (University of Strathclyde)

Constructor Summary
ViewCall(GCUBEScope scope, GCUBESecurityManager... securityManager)
          Creates an instance to use in a given scope and, optionally, with a given a security manager.
ViewCall(java.lang.String name, GCUBEScope scope, GCUBESecurityManager... securityManager)
          Creates an instance to use with a given plugin in a given scope and, optionally, with a given a security manager.
 
Method Summary
 View create(View view, boolean... broadcast)
          Creates a view WS-Resource.
 void destroy(org.apache.axis.message.addressing.EndpointReferenceType epr)
          Destroys a view.
 void resetQuery()
          Resets the default query used by the call.
 void setEndpoint(java.lang.String hostname, java.lang.String port)
          Convenience method to set the target endpoint from host name and port.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ViewCall

public ViewCall(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:
name - the name of the plugin.
scope - the scope.
securityManager - (optional) the security manager.
Throws:
java.lang.Exception - if the instance could not be created.

ViewCall

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

Parameters:
name - the name of the plugin.
scope - the scope.
securityManager - (optional) the security manager.
Throws:
java.lang.Exception - if the instance could not be created.
Method Detail

setEndpoint

public void setEndpoint(java.lang.String hostname,
                        java.lang.String port)
                 throws java.lang.Exception
Convenience method to set the target endpoint from host name and port.

Parameters:
hostname - the host name.
port - the port.
Throws:
java.lang.Exception - if a reference to the endpoint could not be built from its hostname and port.

resetQuery

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

Throws:
java.lang.Exception - if the query could not be reset.

create

public View create(View view,
                   boolean... broadcast)
            throws java.lang.Exception,
                   GCUBEException
Creates a view WS-Resource.

Parameters:
parameters - the view definition.
Returns:
a reference to the view.
Throws:
java.lang.Exception - if the view could not be created for a local error.
GCUBEException - if the view could not be created for a remote error.

destroy

public void destroy(org.apache.axis.message.addressing.EndpointReferenceType epr)
             throws GCUBEUnrecoverableException
Destroys a view.

Parameters:
epr - the reference to the view's endpoint
Throws:
GCUBEUnrecovarableException - if the operation could not be completed for a remote fault. The fault can be found as the cause of the exception.
GCUBEUnrecoverableException