org.ifeth.sehr.client.api
Class SEHRServices

java.lang.Object
  extended byorg.ifeth.sehr.client.api.SEHRServices

public class SEHRServices
extends java.lang.Object

The purpose of this object is to get some basic information about services on the SEHR host, check if a given user is allowed to use a given service and retrieve a list of user specific services.

Due to security and server configuration aspects there is currently no adding or deleting of net services by external clients allowed. This object is not a component for building an GUI based administration tool for registering and managing SEHR centers and services.

Author:
hansjhaase

Constructor Summary
SEHRServices()
          Parameterless constructor
SEHRServices(SEHRRemote session)
          Constructor using an already initialized session based on a SEHRRemote object
SEHRServices(java.lang.String ip, int port)
          Constructor with parameters to bind a SEHR server
 
Method Summary
 boolean connect()
          Connect this service object to SEHR host Note: This objects requires the SEHRREmote object which mangages the connections from a clien tto host.
 boolean disconnect(int conidx)
          Disconnects the service layer
 int getConnectionIdx()
          Get layer index this connection is running on
 boolean isSEHRConnection()
          Get status of SEHR availbility
 java.util.TreeMap listNetServiceCategories()
          Return a list of net related service categories
 java.util.Vector listNetServices()
          Return a list of net related services
 java.util.Vector listUsrServices(int usrid)
          Return a list of user related services Requirement(s): DB connection to IntraSEC using connect()
static void main(java.lang.String[] args)
          For testing purposes this class should be executed within the workspace Eclipse.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SEHRServices

public SEHRServices()
Parameterless constructor


SEHRServices

public SEHRServices(java.lang.String ip,
                    int port)
Constructor with parameters to bind a SEHR server


SEHRServices

public SEHRServices(SEHRRemote session)
Constructor using an already initialized session based on a SEHRRemote object

Method Detail

connect

public boolean connect()
Connect this service object to SEHR host

Note: This objects requires the SEHRREmote object which mangages the connections from a clien tto host. If the SEHRRemote object is not connected it will be done here.
This object sets a permanent connection due to prepared statements!


disconnect

public boolean disconnect(int conidx)
Disconnects the service layer

Parameters:
conidx -
Returns:

listUsrServices

public java.util.Vector listUsrServices(int usrid)
Return a list of user related services

Requirement(s): DB connection to IntraSEC using connect()

Parameters:
usrid -
Returns:
vector_list List of UsrServicesBySPList SQL database objects
See Also:
UsrServicesBySPList

listNetServices

public java.util.Vector listNetServices()
Return a list of net related services

Returns:
vector_list List of NetServices SQL database objects
See Also:
NetServices

listNetServiceCategories

public java.util.TreeMap listNetServiceCategories()
Return a list of net related service categories

Returns:
vector_list List of categories

getConnectionIdx

public int getConnectionIdx()
Get layer index this connection is running on


isSEHRConnection

public boolean isSEHRConnection()
Get status of SEHR availbility


main

public static void main(java.lang.String[] args)
For testing purposes this class should be executed within the workspace Eclipse.

Instruction:
1)
To test the module get a valid IP/Port pair of a running SEHR server and modify parameters below
2)
Run this module