gov.nih.nci.caarray.services.arraydesign.ejb
Class ArrayDesignManagerEJB

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

public class ArrayDesignManagerEJB
extends AbstractSessionBean
implements javax.ejb.SessionBean

ArrayDesignManagerEJB

Author:
TranP
See Also:
Serialized Form

Field Summary
 
Fields inherited from class gov.nih.nci.caarray.services.util.AbstractSessionBean
logger_, sessionCtx_
 
Constructor Summary
ArrayDesignManagerEJB()
           
 
Method Summary
 long addArrayDesign(ArrayDesignData arrayDesignData)
          Add the specified ArrayDesign to the persistence store
 void addCompositeGroup(long arraydesignId, long compositegroupId)
           
 void addDesignProviderRole(long arrayDesignId, DesignProviderRoleData providerRoleData)
          Associates a provider with an ArrayDesign
 void addFeatureGroup(long arraydesignId, long featuregroupId)
           
 long addProtocolApplication(long arrayDesignId, ProtocolApplicationData protAppData)
           
 void addReporterGroup(long arraydesignId, long reportergroupId)
           
 void deleteArrayDesign(long arrayDesignId)
           
 void deleteProtocolApplicationFromArrayDesign(long arrayDesignId, long protAppId)
           
 void disableConstraintsAndIndexes()
          Disables array design indexes and constraints to enable fast loading of array designs.
 void ejbCreate()
           
 void ejbRemove()
          called when remove method is called.
 void enableConstraintsAndIndexes()
          Re-enables array design indexes and constraints disabled in disableConstraintsAndIndexes.
 java.lang.String generateMage(ArrayDesignDesc designDesc)
          Generates a MAGE-ML file for the array design given.
 ArrayDesignData getArrayDesign(long arrayDesignId)
           
 java.util.List getArrayDesignsToReload()
          Returns array designs that should be reloaded.
 ArrayDesignUploadedFileData getArrayDesignUploadedFileData(long arrayDesignId)
          Gets the information about the uploaded arraydesign files for the specified ArrayDesign.
 ArrayDesignView getArrayDesignView(long arrayDesignId)
           
 FileData getGALFile(long arrayDesignId)
          Gets the information about the gal files for the specified ArrayDesign.
 FileData getMAGEML(long arrayDesignId)
          Gets the information about the MAGEML for the specified ArrayDesign.
 boolean isArrayDesignProvidedByAffymetrix(long arrayDesignId)
          Checks if the specified ArrayDesign was made/provided by Affymetrix.
 void reloadArrayDesign(ArrayDesignDesc arrayDesign, int timeoutMinutes)
          Reloads design information for existing array designs.
 void removeCompositeGroupFromArrayDesign(long arrayDesignId, long compositeGroupId)
           
 void removeDesignElements(ArrayDesignDesc design, int timeoutMinutes)
          Removes the design elements associated with an array design in preparation for reloading.
 void removeDesignProviderFromArrayDesign(long arrayDesignId, long providerId)
           
 void removeFeatureGroupFromArrayDesign(long arrayDesignId, long featureGroupId)
           
 void removeReporterGroupFromArrayDesign(long arrayDesignId, long reporterGroupId)
           
 ArrayDesignDesc[] search(ArrayDesignSearchCriteria searchCriteria)
          Searches ArrayDesign's that match the specifed ArrayDesignSearchCriteria.
 void submitMAGEMLGeneration(long arrayDesignId)
          Submits a MAGEML generation message to the responsible Message Driven Bean to generate MAGEML for the specified ArrayDesign.
 void updateArrayDesign(ArrayDesignData arrayDesignData)
           
 void updateArrayDesignVisibility(ArrayDesignData arrayDesignData)
           
 
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

ArrayDesignManagerEJB

public ArrayDesignManagerEJB()
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

getArrayDesign

public ArrayDesignData getArrayDesign(long arrayDesignId)
                               throws java.lang.Exception
Throws:
java.lang.Exception

getArrayDesignUploadedFileData

public ArrayDesignUploadedFileData getArrayDesignUploadedFileData(long arrayDesignId)
                                                           throws java.lang.Exception
Gets the information about the uploaded arraydesign files for the specified ArrayDesign.

Throws:
java.lang.Exception

getArrayDesignView

public ArrayDesignView getArrayDesignView(long arrayDesignId)
                                   throws java.lang.Exception
Throws:
java.lang.Exception

addArrayDesign

public long addArrayDesign(ArrayDesignData arrayDesignData)
                    throws InsertObjectException,
                           GeneralException
Add the specified ArrayDesign to the persistence store

Returns:
- An object representing the ID of the ArrayDesign being inserted or null otherwise.
Throws:
InsertObjectException
GeneralException

updateArrayDesign

public void updateArrayDesign(ArrayDesignData arrayDesignData)
                       throws java.lang.Exception
Throws:
java.lang.Exception

deleteArrayDesign

public void deleteArrayDesign(long arrayDesignId)
                       throws java.lang.Exception
Throws:
java.lang.Exception

updateArrayDesignVisibility

public void updateArrayDesignVisibility(ArrayDesignData arrayDesignData)
                                 throws java.lang.Exception
Throws:
java.lang.Exception

search

public ArrayDesignDesc[] search(ArrayDesignSearchCriteria searchCriteria)
                         throws java.lang.Exception
Searches ArrayDesign's that match the specifed ArrayDesignSearchCriteria.

Returns:
- An array of matched ArrayDesign objects or null otherwise.
Throws:
java.lang.Exception

addCompositeGroup

public void addCompositeGroup(long arraydesignId,
                              long compositegroupId)
                       throws java.lang.Exception
Throws:
java.lang.Exception

removeCompositeGroupFromArrayDesign

public void removeCompositeGroupFromArrayDesign(long arrayDesignId,
                                                long compositeGroupId)
                                         throws java.lang.Exception
Throws:
java.lang.Exception

addFeatureGroup

public void addFeatureGroup(long arraydesignId,
                            long featuregroupId)
                     throws java.lang.Exception
Throws:
java.lang.Exception

removeFeatureGroupFromArrayDesign

public void removeFeatureGroupFromArrayDesign(long arrayDesignId,
                                              long featureGroupId)
                                       throws java.lang.Exception
Throws:
java.lang.Exception

addReporterGroup

public void addReporterGroup(long arraydesignId,
                             long reportergroupId)
                      throws java.lang.Exception
Throws:
java.lang.Exception

removeReporterGroupFromArrayDesign

public void removeReporterGroupFromArrayDesign(long arrayDesignId,
                                               long reporterGroupId)
                                        throws java.lang.Exception
Throws:
java.lang.Exception

addDesignProviderRole

public void addDesignProviderRole(long arrayDesignId,
                                  DesignProviderRoleData providerRoleData)
                           throws java.lang.Exception
Associates a provider with an ArrayDesign

Throws:
java.lang.Exception

removeDesignProviderFromArrayDesign

public void removeDesignProviderFromArrayDesign(long arrayDesignId,
                                                long providerId)
                                         throws java.lang.Exception
Throws:
java.lang.Exception

addProtocolApplication

public long addProtocolApplication(long arrayDesignId,
                                   ProtocolApplicationData protAppData)
                            throws java.lang.Exception
Throws:
java.lang.Exception

deleteProtocolApplicationFromArrayDesign

public void deleteProtocolApplicationFromArrayDesign(long arrayDesignId,
                                                     long protAppId)
                                              throws java.lang.Exception
Throws:
java.lang.Exception

submitMAGEMLGeneration

public void submitMAGEMLGeneration(long arrayDesignId)
                            throws java.lang.Exception
Submits a MAGEML generation message to the responsible Message Driven Bean to generate MAGEML for the specified ArrayDesign.

Throws:
java.lang.Exception

isArrayDesignProvidedByAffymetrix

public boolean isArrayDesignProvidedByAffymetrix(long arrayDesignId)
                                          throws java.lang.Exception
Checks if the specified ArrayDesign was made/provided by Affymetrix.

Parameters:
arrayDesignId - - The ID of the ArrayDesign being checked
Returns:
True if it's made by Affymetrix and false otherwise
Throws:
AccessDeniedException
ObjectNotExistException
GeneralException
java.lang.Exception

getMAGEML

public FileData getMAGEML(long arrayDesignId)
                   throws java.lang.Exception
Gets the information about the MAGEML for the specified ArrayDesign. The information includes the URL where the file is located at and the file's creation date.

Parameters:
arrayDesignId - - The ArrayDesign for which the MAGEML is available.
Returns:
- An FileData object containing information about the MAGEML for this ArrayDesign.
Throws:
java.lang.Exception

getGALFile

public FileData getGALFile(long arrayDesignId)
                    throws java.lang.Exception
Gets the information about the gal files for the specified ArrayDesign.

Throws:
java.lang.Exception

getArrayDesignsToReload

public java.util.List getArrayDesignsToReload()
                                       throws ArrayDesignDataSourceException
Returns array designs that should be reloaded.

Throws:
ArrayDesignDataSourceException

reloadArrayDesign

public void reloadArrayDesign(ArrayDesignDesc arrayDesign,
                              int timeoutMinutes)
                       throws java.lang.Exception
Reloads design information for existing array designs.

Throws:
TransactionException
ArrayDesignDataSourceException
java.lang.Exception

generateMage

public java.lang.String generateMage(ArrayDesignDesc designDesc)
                              throws java.lang.Exception
Generates a MAGE-ML file for the array design given.

Throws:
java.lang.Exception

disableConstraintsAndIndexes

public void disableConstraintsAndIndexes()
                                  throws java.lang.Exception
Disables array design indexes and constraints to enable fast loading of array designs.

Throws:
ArrayDesignDataSourceException
java.lang.Exception

enableConstraintsAndIndexes

public void enableConstraintsAndIndexes()
                                 throws java.lang.Exception
Re-enables array design indexes and constraints disabled in disableConstraintsAndIndexes.

Throws:
ArrayDesignDataSourceException
java.lang.Exception

removeDesignElements

public void removeDesignElements(ArrayDesignDesc design,
                                 int timeoutMinutes)
                          throws java.lang.Exception
Removes the design elements associated with an array design in preparation for reloading.

Throws:
ArrayDesignDataSourceException
java.lang.Exception