gov.nih.nci.caarray.services.useradmin.ejb
Class AdminManagerEJB

java.lang.Object
  extended by gov.nih.nci.caarray.services.util.AbstractSessionBean
      extended by gov.nih.nci.caarray.services.useradmin.ejb.AdminManagerEJB
All Implemented Interfaces:
java.io.Serializable, javax.ejb.EnterpriseBean, javax.ejb.SessionBean

public class AdminManagerEJB
extends AbstractSessionBean
implements javax.ejb.SessionBean

This class contains the implemention of the AdminManagerEJB.

Author:
tranp
See Also:
Serialized Form

Field Summary
 
Fields inherited from class gov.nih.nci.caarray.services.util.AbstractSessionBean
logger_, sessionCtx_
 
Constructor Summary
AdminManagerEJB()
           
 
Method Summary
 long addGroup(GroupData groupData)
          Adds a new caArray Group to the persistence store with the specified data.
 long addUser(UserData userData)
          Adds a new caArray user to the persistence store with the specified data.
 void ejbCreate()
           
 void ejbRemove()
          called when remove method is called.
 GroupData getGroup(long id)
          Gets a GroupData object that matches the given Id.
 UserData getUser(long id)
          Gets a UserData object that matches the given Id.
 java.util.Vector getUserGroupInfo(long userId)
          Gets a Vector that has a list of all the Groups with appropriate information.
 void manageUserGroups(long userId, java.lang.String[] groupAssignments)
          Updates the User's Group assignments.
 GroupData[] searchGroups(GroupSearchCriteria criteria)
          Gets a list of groups matching the criteria and returns a GroupData object for each.
 UserData[] searchUsers(UserSearchCriteria criteria)
          Gets a list of users matching the criteria and returns a UserData object for each.
 void updateGroup(GroupData groupData)
          Updates an existing caArray Group in the persistence store with the specified data.
 void updateUser(UserData userData)
          Updates an existing caArray user in the persistence store with the specified data.
 
Methods inherited from class gov.nih.nci.caarray.services.util.AbstractSessionBean
disableAndRememberPreviousValueForCollectionDescriptorCascadeRetrieve, disableAndRememberPreviousValueForObjectDescriptorCascadeRetrieve, ejbActivate, ejbPassivate, getUserTransaction, resetCollectionDescriptorCascadeToPreviousValue, resetObjectDescriptorCascadeToPreviousValue, setSessionContext
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface javax.ejb.SessionBean
ejbActivate, ejbPassivate, setSessionContext
 

Constructor Detail

AdminManagerEJB

public AdminManagerEJB()
Method Detail

ejbCreate

public void ejbCreate()
               throws java.rmi.RemoteException,
                      javax.ejb.CreateException
Overrides:
ejbCreate in class AbstractSessionBean
Throws:
javax.ejb.CreateException
java.rmi.RemoteException

ejbRemove

public void ejbRemove()
               throws javax.ejb.EJBException,
                      java.rmi.RemoteException
called when remove method is called.

Specified by:
ejbRemove in interface javax.ejb.SessionBean
Overrides:
ejbRemove in class AbstractSessionBean
Throws:
javax.ejb.EJBException
java.rmi.RemoteException

searchUsers

public UserData[] searchUsers(UserSearchCriteria criteria)
                       throws java.lang.Exception
Gets a list of users matching the criteria and returns a UserData object for each.

Throws:
java.lang.Exception

getUser

public UserData getUser(long id)
                 throws java.lang.Exception
Gets a UserData object that matches the given Id.

Throws:
java.lang.Exception

addUser

public long addUser(UserData userData)
             throws java.lang.Exception
Adds a new caArray user to the persistence store with the specified data.

Parameters:
userData - - The data for the new caArray User.
Throws:
java.lang.Exception

updateUser

public void updateUser(UserData userData)
                throws java.lang.Exception
Updates an existing caArray user in the persistence store with the specified data.

Parameters:
userData - - The data for the existing caArray User.
Throws:
java.lang.Exception

searchGroups

public GroupData[] searchGroups(GroupSearchCriteria criteria)
                         throws java.lang.Exception
Gets a list of groups matching the criteria and returns a GroupData object for each.

Throws:
java.lang.Exception

getGroup

public GroupData getGroup(long id)
                   throws java.lang.Exception
Gets a GroupData object that matches the given Id.

Throws:
java.lang.Exception

addGroup

public long addGroup(GroupData groupData)
              throws java.lang.Exception
Adds a new caArray Group to the persistence store with the specified data.

Parameters:
groupData - - The data for the new caArray Group.
Throws:
java.lang.Exception

updateGroup

public void updateGroup(GroupData groupData)
                 throws java.lang.Exception
Updates an existing caArray Group in the persistence store with the specified data.

Parameters:
groupData - - The data for the existing caArray Group.
Throws:
java.lang.Exception

getUserGroupInfo

public java.util.Vector getUserGroupInfo(long userId)
                                  throws java.lang.Exception
Gets a Vector that has a list of all the Groups with appropriate information.

Throws:
java.lang.Exception

manageUserGroups

public void manageUserGroups(long userId,
                             java.lang.String[] groupAssignments)
                      throws java.lang.Exception
Updates the User's Group assignments.

Throws:
java.lang.Exception