com.ibm.epic.ams.AMS
Class AMSBean

java.lang.Object
  |
  +--com.ibm.epic.ams.AMS.AMSBean

public class AMSBean
extends java.lang.Object
implements javax.ejb.SessionBean

Field Summary
static java.lang.String copyrightNotice
          Copyright statement
 com.ibm.epic.LogTrace.EpicLog exceptionLog
           
 com.ibm.epic.trace.client.EpicTraceClient traceClient
           
 
Constructor Summary
AMSBean()
           
 
Method Summary
 void addSolutionsForUser(java.lang.String uid, java.util.Hashtable solData)
          This method adds solutions and roles to the specified user.
 void addUser(java.util.Hashtable userData)
          Adds a user specified in the given Hashtable to LDAP.
 void addUserRoles(java.lang.String uid, java.util.Hashtable roleData)
          This method adds the given roles for the given solution to the specified user.
 void changeUserPassword(java.lang.String uid, java.lang.String oldPwd, java.lang.String newPwd)
          Changes the user's password to the specified new password.
 java.lang.String clientAuthenticate(java.lang.String userID)
          Performs client authentication for given userID Creation date: (2/10/01 11:15:20 AM)
 java.lang.String clientAuthenticate(java.lang.String userID, java.lang.String passwd)
          Performs client authentication with given userID and password Creation date: (2/10/01 11:17:04 AM)
 boolean clientLogout(java.lang.String userId)
          Logout the userId Creation date: (2/10/01 11:19:55 AM)
 void deleteUser(java.lang.String uid)
          This method deletes the specified user from LDAP and PD.
 void ejbActivate()
          ejbActivate method comment
 void ejbCreate()
          ejbCreate method comment
 void ejbPassivate()
          ejbPassivate method comment
 void ejbRemove()
          ejbRemove method comment
 java.util.Hashtable getActivities()
          This method returns all activities and roles in a hashtable, where the key is the Activity name and the value is the role Creation date: (2/22/01 3:47:25 PM)
 java.lang.String getActivityRole(java.lang.String activity)
          This method returns the role specified in LDAP for the given activity.
 java.util.Hashtable getAssignments(java.lang.String solution, java.lang.String awarelet)
          This method returns a hashtable of the assignments for the given solution and awarelet.
 java.util.Hashtable getAwarelets(java.lang.String solution)
          This method returns a hashtable with the awarelet and its attributes for the given solution.
 java.util.Hashtable getProcessDefinitions(java.lang.String solution)
          Returns a hashtable with the ProcessDefinitions and its attributes for the given solution.
 java.lang.String[] getRoles(java.lang.String userId, java.lang.String solution)
          Get the roles for a given solution and check authorization for the user Creation date: (2/10/01 11:23:48 AM)
 javax.ejb.SessionContext getSessionContext()
          getSessionContext method comment
 com.ibm.epic.ams.SolutionInfo[] getSolutions()
          Returns an array of all SolutionInfos defined in LDAP Creation date: (2/10/01 11:26:28 AM)
 java.util.Vector getUsers(java.lang.String solution, java.lang.String role)
          This method returns a Vector of all userIDs that are assigned to the given solution and role.
 void removeSolutionFromUser(java.lang.String uid, java.lang.String solution)
          This method removes the given solution from the specified user.
 void removeUserRoles(java.lang.String uid, java.util.Hashtable roleData)
          This method removes the given roles for the given solution from the specified user.
 void replaceUserRoles(java.lang.String uid, java.util.Hashtable roleData)
          This method replaces the roles for the specified user and solution in LDAP and PD.
 void setPassword(java.lang.String uid, java.lang.String newPwd)
          Changes the user's password to the specified new password.
 void setSessionContext(javax.ejb.SessionContext ctx)
          setSessionContext method comment
 java.lang.String ssoPassThru(java.lang.String ltpaCookie)
          Gets the UserID from the input ltpa cookie and authenticates the user Creation date: (11/15/00 4:30:54 PM)
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

copyrightNotice

public static final java.lang.String copyrightNotice
Copyright statement

traceClient

public com.ibm.epic.trace.client.EpicTraceClient traceClient

exceptionLog

public com.ibm.epic.LogTrace.EpicLog exceptionLog
Constructor Detail

AMSBean

public AMSBean()
Method Detail

addSolutionsForUser

public void addSolutionsForUser(java.lang.String uid,
                                java.util.Hashtable solData)
                         throws com.ibm.epic.ams.EpicAMSException
This method adds solutions and roles to the specified user. The solData hashtable has the SolutionName as the key and a Vector of Roles for the values. If there is only one role for the solution, the value could be of type String. Creation date: (2/12/01 12:01:27 PM)
Parameters:
uid - String - User ID of user that will have solutions added.
solData - java.util.Hashtable - Solution(s) to be added to user. The SolutionName is the key and a Vector of Roles is the values of the Hashtable. If there is only one role for the solution, the value could be of type String instead of Vector.
Throws:
com.ibm.epic.ams.EpicAMSException - If any error occurs while adding the solution(s) to the user

addUser

public void addUser(java.util.Hashtable userData)
             throws com.ibm.epic.ams.EpicAMSException
Adds a user specified in the given Hashtable to LDAP. The hashtable contains the key uid for the userID value along with attributes associated to this user. If the dn attribute is specified in the hashtable, the user will be created with that dn in LDAP. Otherwise, the user's dn will be constructed from the values specified in the epicUserRegistryDN and epicPersonNamingAttribute in the AMS epicAppExtensions in LDAP. Creation date: (2/12/01 12:00:22 PM)
Parameters:
userData - java.util.Hashtable - The attribute names are the keys in the hashtable. The attribute values are the values in the hashtable. The hashtable must include the uid attribute key with the userID value to specify the user being added.
Throws:
com.ibm.epic.ams.EpicAMSException - If adding the user fails.

addUserRoles

public void addUserRoles(java.lang.String uid,
                         java.util.Hashtable roleData)
                  throws com.ibm.epic.ams.EpicAMSException
This method adds the given roles for the given solution to the specified user. Creation date: (2/12/01 12:05:06 PM)
Parameters:
uid - java.lang.String: The User ID having the roles added.
roleData - java.util.Hashtable: Key is the solution name. If only one role is being added for the solution, then the value is the role name of type String. If more than one role for the solution is being added, then the value is a Vector of roles.
Throws:
com.ibm.epic.ams.EpicAMSException - If adding roles to the user fails.

clientAuthenticate

public java.lang.String clientAuthenticate(java.lang.String userID)
                                    throws java.rmi.RemoteException,
                                           com.ibm.epic.ams.EpicAMSException
Performs client authentication for given userID Creation date: (2/10/01 11:15:20 AM)
Parameters:
userID - java.lang.String - User ID of user trying to get authenticated
Returns:
java.lang.String - If user is authenticated, returns TimeStamp of when user was authenticated. If user is not authenticated, returns "Nothing"
Throws:
java.rmi.RemoteException - The exception description.
com.ibm.epic.ams.EpicAMSException - If any exceptions occur during authentication.

clientAuthenticate

public java.lang.String clientAuthenticate(java.lang.String userID,
                                           java.lang.String passwd)
                                    throws java.rmi.RemoteException,
                                           com.ibm.epic.ams.EpicAMSException
Performs client authentication with given userID and password Creation date: (2/10/01 11:17:04 AM)
Parameters:
userID - java.lang.String - User ID of user trying to get authenticated
passwd - java.lang.String - Password of user trying to get authenticated
Returns:
java.lang.String - If user is authenticated, returns TimeStamp of when user was authenticated. If user is not authenticated, returns "Nothing"
Throws:
java.rmi.RemoteException - The exception description.
com.ibm.epic.ams.EpicAMSException - If any exceptions occur during authentication.

clientLogout

public boolean clientLogout(java.lang.String userId)
                     throws com.ibm.epic.ams.EpicAMSException
Logout the userId Creation date: (2/10/01 11:19:55 AM)
Parameters:
userId - java.lang.String - User ID of user to be logged out.
Returns:
boolean - Returns true if user is successfully logged out.
Throws:
com.ibm.epic.ams.EpicAMSException - If any exceptions occur during logout.

deleteUser

public void deleteUser(java.lang.String uid)
                throws com.ibm.epic.ams.EpicAMSException
This method deletes the specified user from LDAP and PD. If there are any solutions assigned to this user, the solutions will be removed before deleting the user. Creation date: (2/10/01 12:48:42 PM)
Parameters:
uid - java.lang.String - User ID of user to delete
Throws:
com.ibm.epic.ams.EpicAMSException - If deleting the user fails.

ejbActivate

public void ejbActivate()
                 throws java.rmi.RemoteException
ejbActivate method comment
Specified by:
ejbActivate in interface javax.ejb.SessionBean
Throws:
java.rmi.RemoteException - The exception description.

ejbCreate

public void ejbCreate()
               throws javax.ejb.CreateException,
                      java.rmi.RemoteException
ejbCreate method comment
Throws:
javax.ejb.CreateException - The exception description.
java.rmi.RemoteException - The exception description.

ejbPassivate

public void ejbPassivate()
                  throws java.rmi.RemoteException
ejbPassivate method comment
Specified by:
ejbPassivate in interface javax.ejb.SessionBean
Throws:
java.rmi.RemoteException - The exception description.

ejbRemove

public void ejbRemove()
               throws java.rmi.RemoteException
ejbRemove method comment
Specified by:
ejbRemove in interface javax.ejb.SessionBean
Throws:
java.rmi.RemoteException - The exception description.

getSessionContext

public javax.ejb.SessionContext getSessionContext()
getSessionContext method comment
Returns:
javax.ejb.SessionContext

removeSolutionFromUser

public void removeSolutionFromUser(java.lang.String uid,
                                   java.lang.String solution)
                            throws com.ibm.epic.ams.EpicAMSException
This method removes the given solution from the specified user. If the delete is not successful, an exception is thrown and a rollback is attempted. Creation date: (2/12/01 12:20:05 PM)
Parameters:
uid - java.lang.String - User ID of user to have solutions removed
solution - java.lang.String - Solution name
Throws:
com.ibm.epic.ams.EpicAMSException - If an error occurs while removing the solution from the user.

removeUserRoles

public void removeUserRoles(java.lang.String uid,
                            java.util.Hashtable roleData)
                     throws com.ibm.epic.ams.EpicAMSException
This method removes the given roles for the given solution from the specified user. Creation date: (2/12/01 12:17:27 PM)
Parameters:
uid - java.lang.String: The User ID the roles will be removed from.
roleData - java.util.Hashtable: Key is the solution name. If only one role is being removed for the solution, then the value is the role name of type String. If more than one role for the solution is being removed, then the value is a Vector of roles.
Throws:
com.ibm.epic.ams.EpicAMSException - If an error occurs while removing the roles from the user.

replaceUserRoles

public void replaceUserRoles(java.lang.String uid,
                             java.util.Hashtable roleData)
                      throws com.ibm.epic.ams.EpicAMSException
This method replaces the roles for the specified user and solution in LDAP and PD. The roleData Hashtable has the solutionName as the key and the roles as the value. If there is only one role for the solution the value in the hashtable is of type String. Otherwise, if there are multiple roles for the solution, the value in the hashtable is a Vector of roles. Creation date: (2/12/01 12:02:47 PM)
Parameters:
uid - java.lang.String - User ID of user to have roles replaced
roleData - java.util.Hashtable - Has the solutionName as the key and the roles as the value. If there is only one role for the solution the value in the hashtable is of type String. Otherwise, if there are multiple roles for the solution, the value in the hashtable is a Vector of roles.
Throws:
com.ibm.epic.ams.EpicAMSException - If an error occurs while replacing the roles.

setSessionContext

public void setSessionContext(javax.ejb.SessionContext ctx)
                       throws java.rmi.RemoteException
setSessionContext method comment
Specified by:
setSessionContext in interface javax.ejb.SessionBean
Parameters:
ctx - javax.ejb.SessionContext
Throws:
java.rmi.RemoteException - The exception description.

getRoles

public java.lang.String[] getRoles(java.lang.String userId,
                                   java.lang.String solution)
                            throws java.rmi.RemoteException,
                                   com.ibm.epic.ams.EpicAMSException
Get the roles for a given solution and check authorization for the user Creation date: (2/10/01 11:23:48 AM)
Parameters:
userID - java.lang.String - userID of user
solution - java.lang.String - Solution name
Returns:
java.lang.String[] - An array of authorized roles for the user
Throws:
java.rmi.RemoteException - The exception description.
com.ibm.epic.ams.EpicAMSException - If an error occurs while getting the roles.

getSolutions

public com.ibm.epic.ams.SolutionInfo[] getSolutions()
                                             throws java.rmi.RemoteException
Returns an array of all SolutionInfos defined in LDAP Creation date: (2/10/01 11:26:28 AM)
Returns:
com.ibm.epic.ams.SolutionInfo[] - an array with all solutions defined in LDAP
Throws:
java.rmi.RemoteException - The exception description.

getActivities

public java.util.Hashtable getActivities()
                                  throws com.ibm.epic.ams.EpicAMSException
This method returns all activities and roles in a hashtable, where the key is the Activity name and the value is the role Creation date: (2/22/01 3:47:25 PM)
Returns:
java.util.Hashtable - Key of hashtable is the Activity name and the value is the role of type String.
Throws:
com.ibm.epic.ams.EpicAMSException - If any error occurs while getting the activities.

getActivityRole

public java.lang.String getActivityRole(java.lang.String activity)
                                 throws com.ibm.epic.ams.EpicAMSException
This method returns the role specified in LDAP for the given activity. Creation date: (2/22/01 4:52:44 PM)
Parameters:
activity - java.lang.String: Activity name
Returns:
java.lang.String: Role value of specified activity
Throws:
com.ibm.epic.ams.EpicAMSException - If getting the role fails.

getAssignments

public java.util.Hashtable getAssignments(java.lang.String solution,
                                          java.lang.String awarelet)
                                   throws com.ibm.epic.ams.EpicAMSException
This method returns a hashtable of the assignments for the given solution and awarelet. Creation date: (2/23/01 2:01:43 PM)
Parameters:
solution - java.lang.String - Solution name
awarelet - java.lang.String - Awarelet name
Returns:
java.util.Hashtable - The hashtable has the assignment name as the key and a vector of AwareletMasks as the value.
Throws:
com.ibm.epic.ams.EpicAMSException - If any error occurs while getting the assignments.

getAwarelets

public java.util.Hashtable getAwarelets(java.lang.String solution)
                                 throws com.ibm.epic.ams.EpicAMSException
This method returns a hashtable with the awarelet and its attributes for the given solution. The hashtable has the awarelet name as the key and the value is a Hashtable of the awarelet attributes. The attribute hashtable will have the attribute name - value(s) pair. If the attribute is multi-value, the value will be a vector. Creation date: (2/23/01 11:11:52 AM)
Parameters:
solution - java.lang.String: Solution name
Returns:
java.util.Hashtable: Has the awarelet name as the key and the value is a Hashtable of the awarelet attributes. The attribute hashtable will have the attribute name-value(s) pair. If the attribute is multi-value, the value will be a vector.
Throws:
com.ibm.epic.ams.EpicAMSException - If any error occurs while getting the awarelets.

changeUserPassword

public void changeUserPassword(java.lang.String uid,
                               java.lang.String oldPwd,
                               java.lang.String newPwd)
                        throws com.ibm.epic.ams.EpicAMSException
Changes the user's password to the specified new password. If the old password does not match the user's current password an EpicAMSException is thrown. Creation date: (3/8/01 1:34:37 PM)
Parameters:
uid - java.lang.String - User ID of user who's password will be changed
oldPwd - java.lang.String - User's current password
newPwd - java.lang.String - User's new password
Throws:
com.ibm.epic.ams.EpicAMSException - Throws an AMS5027 if the old password does not match the current password. Throws AMS5028 if any other exceptions are received in this method.

getProcessDefinitions

public java.util.Hashtable getProcessDefinitions(java.lang.String solution)
                                          throws com.ibm.epic.ams.EpicAMSException
Returns a hashtable with the ProcessDefinitions and its attributes for the given solution. The hashtable has the processDefinition name as the key and the value is a hashtable of the processDefinition attributes. The attribute hashtable will have the attribute name-value(s) pair. If the attribute is multi-value, the value will be a vector. Creation date: (2/23/01 11:11:52 AM)
Parameters:
solution - java.lang.String: Solution name
Returns:
java.util.Hashtable: Has the ProcessDefinition name as the key and the value is a hashtable of the processDefinition attributes. The attribute hashtable will have the attribute name-value(s) pair. If the attribute is multi-value, the value will be a vector.
Throws:
com.ibm.epic.ams.EpicAMSException - If any error occurs while getting the process definition.

ssoPassThru

public java.lang.String ssoPassThru(java.lang.String ltpaCookie)
                             throws java.rmi.RemoteException,
                                    com.ibm.epic.ams.EpicAMSException
Gets the UserID from the input ltpa cookie and authenticates the user Creation date: (11/15/00 4:30:54 PM)
Parameters:
ltpaCookie - javax.servlet.http.Cookie
Returns:
java.lang.String

getUsers

public java.util.Vector getUsers(java.lang.String solution,
                                 java.lang.String role)
                          throws com.ibm.epic.ams.EpicAMSException
This method returns a Vector of all userIDs that are assigned to the given solution and role. If the role is null, all userIDs assigned to the given solution are returned. Note: This method is to be used by an administrative role only. Therefore, it needs to be secured in WAS as so. Creation date: (3/15/01 5:44:58 PM)
Parameters:
solution - java.lang.String - solution name
role - java.lang.String - role name. If null, all users assigned to the solution are returned
Returns:
java.util.Vector - list of user IDs
Throws:
com.ibm.epic.ams.EpicAMSException - The exception description.

setPassword

public void setPassword(java.lang.String uid,
                        java.lang.String newPwd)
                 throws com.ibm.epic.ams.EpicAMSException
Changes the user's password to the specified new password. Note: This method is to be used by an administrative role only. Therefore, it needs to be secured in WAS as so. Creation date: (3/8/01 1:34:37 PM)
Parameters:
uid - java.lang.String - User ID of user who's password will be changed
newPwd - java.lang.String - User's new password
Throws:
com.ibm.epic.ams.EpicAMSException - Throws AMS5028 if exceptions are received in this method.