org.openfjord.business.workflow
Class SurveyManagerBean

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

public class SurveyManagerBean
extends java.lang.Object
implements javax.ejb.SessionBean, SurveyManager

Title: openFJORD

Description: open Flexible Java Online Research Designer

Copyright: Copyright (c) by Ingo Düppe 2003

Company: University of Muenster

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

Constructor Summary
SurveyManagerBean()
           
 
Method Summary
 Survey createSurvey(Survey survey)
          creates a new survey
 void deleteSurvey(java.lang.String surveyId)
          deletes the specified survey by it primary key
 void deleteSurvey(Survey survey)
          deletes the survey specified by the passed value object
 void ejbActivate()
           
 void ejbCreate()
           
 void ejbPassivate()
           
 void ejbRemove()
           
 Survey getSurvey(java.lang.String surveyId)
          get survey data with all relationships
 java.util.Collection getSurveys()
          lookups all surveys of the current user.
 void setSessionContext(javax.ejb.SessionContext sessionContext)
           
 Survey updateSurvey(Survey survey)
          updates the survey entity bean with the passed survey value object
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SurveyManagerBean

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

getSurveys

public java.util.Collection getSurveys()
lookups all surveys of the current user.

Specified by:
getSurveys in interface SurveyManager
Returns:
a collection of survey object without relationship to other objects
To do:
implement the user management, may a filter for the state of the survey

getSurvey

public Survey getSurvey(java.lang.String surveyId)
                 throws SurveyManagerException
get survey data with all relationships

Specified by:
getSurvey in interface SurveyManager
Parameters:
surveyId - primary key of the survey
Returns:
survey
Throws:
SurveyManagerException

createSurvey

public Survey createSurvey(Survey survey)
creates a new survey

Specified by:
createSurvey in interface SurveyManager
Parameters:
survey - optional reference to a survey template
Returns:
the created survey
To do:
correct exception handling, implement related object handling, like owner, footer, header and root paragraph

updateSurvey

public Survey updateSurvey(Survey survey)
                    throws SurveyManagerException
updates the survey entity bean with the passed survey value object

Specified by:
updateSurvey in interface SurveyManager
Parameters:
survey - object containing the data to be stored
Returns:
the new state of the survey
Throws:
SurveyManagerException

deleteSurvey

public void deleteSurvey(Survey survey)
                  throws SurveyManagerException
deletes the survey specified by the passed value object

Specified by:
deleteSurvey in interface SurveyManager
Parameters:
survey - value object of the survey
Throws:
SurveyManagerException

deleteSurvey

public void deleteSurvey(java.lang.String surveyId)
                  throws SurveyManagerException
deletes the specified survey by it primary key

Specified by:
deleteSurvey in interface SurveyManager
Parameters:
surveyId - primary key of the survey
Throws:
SurveyManagerException


openFJORD Copyright © 2003 University of Muenster.