org.openfjord.business.workflow
Class SurveyAssemblerBean

java.lang.Object
  |
  +--org.openfjord.business.workflow.SurveyAssemblerBean
All Implemented Interfaces:
javax.ejb.EnterpriseBean, java.io.Serializable, javax.ejb.SessionBean

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

This class will copy a survey structure composed of survey elements from a value object structur to a entity bean structure.

Title: openFJORD

Description: open Flexible Java Online Research Designer

Company: University of Muenster

Version:
1.0
Author:
Ingo Düppe
See Also:
Serialized Form

Field Summary
static java.lang.String SURVEY_ELEMENT_JNDI
           
 
Constructor Summary
SurveyAssemblerBean()
           
 
Method Summary
 void ejbActivate()
           
 void ejbCreate()
           
 void ejbPassivate()
           
 void ejbRemove()
           
 Survey getSurvey(SurveyLocal surveyEJB)
          Create a value object with relationship structure of the stored survey.
 void setSessionContext(javax.ejb.SessionContext sessionContext)
           
 void updateSurvey(SurveyLocal surveyEJB, Survey surveyVO)
          This method will trace the survey value object and try to store the data structure into entity beans.
 void updateSurveyElementContainer(SurveyElementLocal containerEJB, SurveyElementContainer containerVO)
          The structure is copied from the value object to the entity bean(s).
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SURVEY_ELEMENT_JNDI

public static final java.lang.String SURVEY_ELEMENT_JNDI
See Also:
Constant Field Values
Constructor Detail

SurveyAssemblerBean

public SurveyAssemblerBean()
Method Detail

ejbCreate

public void ejbCreate()
               throws javax.ejb.CreateException
javax.ejb.CreateException

ejbRemove

public void ejbRemove()
Specified by:
ejbRemove in interface javax.ejb.SessionBean

ejbActivate

public void ejbActivate()
Specified by:
ejbActivate in interface javax.ejb.SessionBean

ejbPassivate

public void ejbPassivate()
Specified by:
ejbPassivate in interface javax.ejb.SessionBean

setSessionContext

public void setSessionContext(javax.ejb.SessionContext sessionContext)
Specified by:
setSessionContext in interface javax.ejb.SessionBean

getSurvey

public Survey getSurvey(SurveyLocal surveyEJB)
Create a value object with relationship structure of the stored survey.

Parameters:
surveyEJB - - reference to the stored survey bean
Returns:
Survey structure containing header, footer and the first level of root paragraph

updateSurvey

public void updateSurvey(SurveyLocal surveyEJB,
                         Survey surveyVO)
This method will trace the survey value object and try to store the data structure into entity beans. It will update existing elements or create new elements. It will not delete any existing elements.

To do:
surveyowner is not support right now, it is not clear how user login will be handled.

updateSurveyElementContainer

public void updateSurveyElementContainer(SurveyElementLocal containerEJB,
                                         SurveyElementContainer containerVO)
The structure is copied from the value object to the entity bean(s). Existing elements will be updated and missing will be created. Existing elements which doesn't exist within the value object struture will not be deleted.

Parameters:
containerEJB - reference to the original survey element, must be a SurveyHeader, Footer or Paragraph
containerVO - value object containing the new data
See Also:
SurveyElementBean


openFJORD Copyright © 2003 University of Muenster.