org.ifeth.sehr.client.api
Class SEHRUserData

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

public class SEHRUserData
extends java.lang.Object

The purpose of this object is to act as a wrapper between an external client which connects remotely to a SEHR host and and to use the UserData model for managing users.

Author:
hansjhaase

Constructor Summary
SEHRUserData()
          Parameterless constructor
SEHRUserData(SEHRRemote session)
          Constructor using an already initialized session based on another SEHRRemote object
SEHRUserData(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 listAddressCategories()
          Return a list of the defined address categories
 java.util.Vector listUsers()
          Return a list of users and their last login
 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

SEHRUserData

public SEHRUserData()
Parameterless constructor


SEHRUserData

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


SEHRUserData

public SEHRUserData(SEHRRemote session)
Constructor using an already initialized session based on another 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

listUsers

public java.util.Vector listUsers()
Return a list of users and their last login


listAddressCategories

public java.util.TreeMap listAddressCategories()
Return a list of the defined address 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