org.gersteinlab.tyna.webservice
Class TYNASoapBindingImpl

java.lang.Object
  extended by org.gersteinlab.tyna.webservice.TYNASoapBindingImpl
All Implemented Interfaces:
java.rmi.Remote, TYNA

public class TYNASoapBindingImpl
extends java.lang.Object
implements TYNA

        This class defines the actual implementation of the tYNA web service.
        

Version:
1.0 (May 27, 2006) Change History: 1.0 - Initial version
Author:
Kevin Yuk-Lap Yip

Constructor Summary
TYNASoapBindingImpl()
           
 
Method Summary
 java.lang.String downloadNetwork(java.lang.String username, java.lang.String password, int networkId, int networkFormatId)
          Download a network from the tYNA database.
protected  javax.servlet.ServletContext getServletContext()
          Get the servlet context for the operations.
protected  javax.servlet.http.HttpSession getSession(java.lang.String username, java.lang.String password)
          Get the servlet session for the operations, and login if username is not null.
 NetworkFormat[] listNetworkFormats()
          List the network formats supported by tYNA.
 Network[] listNetworks(java.lang.String username, java.lang.String password, java.lang.String listType)
          List the metadata of the networks in the tYNA database.
 NetworkType[] listNetworkTypes()
          List the network types supported by tYNA.
 void uploadNetwork(java.lang.String username, java.lang.String password, java.lang.String networkData, Network networkMetadata)
          Upload a network into the tYNA database.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TYNASoapBindingImpl

public TYNASoapBindingImpl()
Method Detail

listNetworks

public Network[] listNetworks(java.lang.String username,
                              java.lang.String password,
                              java.lang.String listType)
                       throws java.rmi.RemoteException
Description copied from interface: TYNA
List the metadata of the networks in the tYNA database.

Specified by:
listNetworks in interface TYNA
Parameters:
username - The login name of ther user, null if not required
password - The password of the user, null if not required
listType - List type: "private" for private ones (must be owned) only "owned" for owned ones (public or private) only "" for owned or public
Returns:
An array of Network objects that describe the metadata of the networks
Throws:
java.rmi.RemoteException - If any problem occurs during the listing process

listNetworkFormats

public NetworkFormat[] listNetworkFormats()
                                   throws java.rmi.RemoteException
Description copied from interface: TYNA
List the network formats supported by tYNA.

Specified by:
listNetworkFormats in interface TYNA
Returns:
An array of NetworkFormat objects that describe the network formats
Throws:
java.rmi.RemoteException - If any problem occurs during the listing process

listNetworkTypes

public NetworkType[] listNetworkTypes()
                               throws java.rmi.RemoteException
Description copied from interface: TYNA
List the network types supported by tYNA.

Specified by:
listNetworkTypes in interface TYNA
Returns:
An array of NetworkType objects that describe the network types
Throws:
java.rmi.RemoteException - If any problem occurs during the listing process

uploadNetwork

public void uploadNetwork(java.lang.String username,
                          java.lang.String password,
                          java.lang.String networkData,
                          Network networkMetadata)
                   throws java.rmi.RemoteException
Description copied from interface: TYNA
Upload a network into the tYNA database.

Specified by:
uploadNetwork in interface TYNA
Parameters:
username - The login name of the user, null if not required
password - The password of the user, null if not required
networkData - The network serialized as a string
networkMetadata - The metadata of the network
Throws:
java.rmi.RemoteException - If any problem occurs during the upload process

downloadNetwork

public java.lang.String downloadNetwork(java.lang.String username,
                                        java.lang.String password,
                                        int networkId,
                                        int networkFormatId)
                                 throws java.rmi.RemoteException
Description copied from interface: TYNA
Download a network from the tYNA database.

Specified by:
downloadNetwork in interface TYNA
Parameters:
username - The login name of ther user, null if not required
password - The password of the user, null if not required
networkId - The ID of the network
networkFormatId - The ID of the serialization format
Returns:
The serialized network
Throws:
java.rmi.RemoteException - If any problem occurs during the download process

getSession

protected javax.servlet.http.HttpSession getSession(java.lang.String username,
                                                    java.lang.String password)
                                             throws SecurityException
Get the servlet session for the operations, and login if username is not null.

Parameters:
username - The login name of the user
password - The password of the user
Returns:
The session
Throws:
SecurityException - If the login is not successful

getServletContext

protected javax.servlet.ServletContext getServletContext()
Get the servlet context for the operations.

Returns:
The servlet context