com.egurkha.subscribermanagement
Class EgUserController

java.lang.Object
  |
  +--com.egurkha.subscribermanagement.EgUserController

public class EgUserController
extends Object


Constructor Summary
EgUserController()
           
 
Method Summary
 int addUserDetails(EgurkhaUser eu)
           This method is used to add details of the user into the eGurkha system.It takes in user object as parameter.
 int connect(String str_mgr_url, String str_uname, String str_upass)
           This method is used to establish a connection with the eGurkha ASPlite manager component which is responsible for the user manipulation in the eGurkha system.
 void disconnect()
          This method is used to reset the manager url and the connection with the ASPlite manager component.
 int invalidateUser(EgurkhaUser eu)
           This method is used to invalidate an user in the eGurkha system.
 int modifyUserDetails(EgurkhaUser eu)
           This method is used to modify details of the user in the eGurkha system.It takes in user object as parameter.
 int modifyUserSubscription(EgurkhaUser eu)
           This method is used to modify subscription validity period of the user in the eGurkha system.It takes in user object as parameter.
 int removeUser(EgurkhaUser eu)
           This method is used to remove user from the eGurkha system.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EgUserController

public EgUserController()
Method Detail

connect

public int connect(String str_mgr_url,
                   String str_uname,
                   String str_upass)

This method is used to establish a connection with the eGurkha ASPlite manager component which is responsible for the user manipulation in the eGurkha system.

It takes in the manager ip or hostname(The possible formats are http://192.168.10.7:7077 or http://www.hostname.com:portno, 192.168.10.7:7077 or www.hostname.com:portno),administrator user-name and administrator user-password as parameters.

It returns an int value which reports success or possible reasons for failure.
The possible results are
0 - Success
1 - Connection could not be established with the eGurkha ASPlite database.
2 - User not present in the system.
3 - User could not connect ASPlite manager component.
The possible reasons are
i) User password invalid.
ii)User does not have admin previleges.
6 - Connection could not be established with the ASPlite manager.

addUserDetails

public int addUserDetails(EgurkhaUser eu)

This method is used to add details of the user into the eGurkha system.It takes in user object as parameter.

The possible results are
0 - Success
1 - Connection could not be established with the eGurkha ASPlite database.
4 - User already present in the system.
5 - user-valid-till is less than system time.
6 - Connection could not be established with the ASPlite manager.
7 - user_id, user_pass and user_valid_till cannot take null values.
8 - The following fields cannot be null if the user wishes to get egurkha alarms through mail.They are user_mailid, user_alarm_type, user_alarm_pref and user_alarm_mode.
11 - Invalid input value. Please check whether proper input values have been provided for the following fields - user_mailid, user_alarm_type, user_alarm_pref and user_alarm_mode. Please refer to the API documentation for the possible values for the above mentioned fields.
12 - Invalid operation. Permission Denied.

modifyUserDetails

public int modifyUserDetails(EgurkhaUser eu)

This method is used to modify details of the user in the eGurkha system.It takes in user object as parameter.

The possible values are
0 - Success
1 - Connection could not be established with the eGurkha ASPlite database.
2 - The current user is either an eGurkha Administrative user or does not exist in the eGurkha system.
5 - user-valid-till is less than system time.
6 - Connection could not be established with the ASPlite manager.
9 - The following fields user_mailid,user_alarm_type,user_alarm_pref and user_alarm_mode cannot be modified if any one of the above fields is null.
11 - Invalid input value. Please check whether proper input values have been provided for the following fields - user_mailid, user_alarm_type, user_alarm_pref and user_alarm_mode. Please refer to the API documentation for the possible values for the above mentioned fields.
12 - Invalid operation. Permission Denied.

modifyUserSubscription

public int modifyUserSubscription(EgurkhaUser eu)

This method is used to modify subscription validity period of the user in the eGurkha system.It takes in user object as parameter.

The possible results are
0 - Success
1 - Connection could not be established with the eGurkha ASPlite database.
2 - The current user is either an eGurkha Administrative user or does not exist in the eGurkha system.
5 - user-valid-till is less than system time.
6 - Connection could not be established with the ASPlite manager.
12 - Invalid operation. Permission Denied.

removeUser

public int removeUser(EgurkhaUser eu)

This method is used to remove user from the eGurkha system. It takes in user object as parameter.

The possible results are
0 - Success
1 - Connection could not be established with the eGurkha ASPlite database.
2 - The current user is either an eGurkha Administrative user or does not exist in the eGurkha system.
6 - Connection could not be established with the ASPlite manager.
12 - Invalid operation. Permission Denied.

invalidateUser

public int invalidateUser(EgurkhaUser eu)

This method is used to invalidate an user in the eGurkha system. It restricts the user from using the eGurkha system.

The possible results are
0 - Success
1 - Connection could not be established with the eGurkha ASPlite database.
2 - The current user is either an eGurkha Administrative user or does not exist in the eGurkha system.
6 - Connection could not be established with the ASPlite manager.
12 - Invalid operation. Permission Denied.

disconnect

public void disconnect()
This method is used to reset the manager url and the connection with the ASPlite manager component.