gov.nih.nci.caarray.services.vocab.ejb
Class VocabManagerEJB

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

public class VocabManagerEJB
extends AbstractSessionBean
implements javax.ejb.SessionBean

VocabManagerEJB

Author:
DickersC, TranP
See Also:
Serialized Form

Field Summary
 
Fields inherited from class gov.nih.nci.caarray.services.util.AbstractSessionBean
logger_, sessionCtx_
 
Constructor Summary
VocabManagerEJB()
           
 
Method Summary
 void addOrUpdateActionProtocolTypeMap(ActionProtocolTypeMapData mapData)
           
 long addVocabulary(VocabData vocabData)
           
 long addVocabulary(VocabData vocabData, long parentVocabId)
           
 int countVocabularies(VocabSearchCriteria searchCriteria)
          Counts the number of vocabularies that have the specified category.
 void deleteVocabulary(long vocabId)
           
 void ejbCreate()
           
 void ejbRemove()
          called when remove method is called.
 ActionProtocolTypeMapData[] getActionProtocolTypeMap()
          Retrieves all available ActionProtocolTypeMapData's.
 VocabDesc[] getChildVocabularies(long parentVocabId)
           
 DatabaseData[] getDatabases()
           
 DatabaseData[] getDatabases(java.lang.String vocabCategory)
          Retrieves a list of public databases that are applicable for the specified controlled vocabulary's category.
 VocabData[] getProtocolTypes(long actionId)
          Retrieves an array of controlled vocabularies representing protocol types given the ID of a controlled vocabulary representing a treatment action.
 VocabData getVocabulary(long vocabId)
           
 VocabDesc[] search(VocabSearchCriteria searchCriteria)
           
 void updateVocabulary(VocabData vocabData)
           
 
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

VocabManagerEJB

public VocabManagerEJB()
Method Detail

ejbCreate

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

ejbRemove

public void ejbRemove()
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

getVocabulary

public VocabData getVocabulary(long vocabId)
                        throws java.lang.Exception
Throws:
java.lang.Exception

getChildVocabularies

public VocabDesc[] getChildVocabularies(long parentVocabId)
                                 throws java.lang.Exception
Throws:
java.lang.Exception

search

public VocabDesc[] search(VocabSearchCriteria searchCriteria)
                   throws java.lang.Exception
Parameters:
SearchCriteria - - Search criteria object to search for vocabulary
userVocab - - True if search for user defined Vocabulary, false for public data.
Throws:
java.lang.Exception

addVocabulary

public long addVocabulary(VocabData vocabData)
                   throws java.lang.Exception
Throws:
java.lang.Exception

addVocabulary

public long addVocabulary(VocabData vocabData,
                          long parentVocabId)
                   throws java.lang.Exception
Throws:
java.lang.Exception

deleteVocabulary

public void deleteVocabulary(long vocabId)
                      throws java.lang.Exception
Throws:
java.lang.Exception

updateVocabulary

public void updateVocabulary(VocabData vocabData)
                      throws AccessDeniedException,
                             GeneralException
Throws:
AccessDeniedException
GeneralException

addOrUpdateActionProtocolTypeMap

public void addOrUpdateActionProtocolTypeMap(ActionProtocolTypeMapData mapData)
                                      throws java.lang.Exception
Throws:
java.lang.Exception

getProtocolTypes

public VocabData[] getProtocolTypes(long actionId)
                             throws java.lang.Exception
Retrieves an array of controlled vocabularies representing protocol types given the ID of a controlled vocabulary representing a treatment action.

Parameters:
actionId - - The ID of a controlled vocabulary representing a treatment action.
Throws:
java.lang.Exception

getActionProtocolTypeMap

public ActionProtocolTypeMapData[] getActionProtocolTypeMap()
                                                     throws java.lang.Exception
Retrieves all available ActionProtocolTypeMapData's.

Throws:
java.lang.Exception

getDatabases

public DatabaseData[] getDatabases()
                            throws java.lang.Exception
Throws:
java.lang.Exception

getDatabases

public DatabaseData[] getDatabases(java.lang.String vocabCategory)
                            throws java.lang.Exception
Retrieves a list of public databases that are applicable for the specified controlled vocabulary's category.

Parameters:
vocabCategory - - The category of controlled vocabularies to which the retrieved databases are applicable. If null, all the databases are retrieved.
Throws:
java.lang.Exception

countVocabularies

public int countVocabularies(VocabSearchCriteria searchCriteria)
                      throws GeneralException
Counts the number of vocabularies that have the specified category.

Throws:
GeneralException