|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.stratelia.silverpeas.peasCore.AbstractComponentSessionController
com.stratelia.webactiv.survey.control.SurveySessionController
public class SurveySessionController
This class contains business layer of survey component
Field Summary | |
---|---|
static int |
CLOSED_SURVEYS_VIEW
|
static String |
COOKIE_NAME
|
static int |
INWAIT_SURVEYS_VIEW
|
static int |
OPENED_SURVEYS_VIEW
|
Fields inherited from class com.stratelia.silverpeas.peasCore.AbstractComponentSessionController |
---|
CHARACTER_ENCODING, context |
Constructor Summary | |
---|---|
SurveySessionController(com.stratelia.silverpeas.peasCore.MainSessionController mainSessionCtrl,
com.stratelia.silverpeas.peasCore.ComponentContext componentContext)
Creates new sessionClientController |
Method Summary | |
---|---|
void |
close()
|
void |
closeSurvey(String surveyId)
|
void |
copySurvey(String surveyId)
|
com.stratelia.webactiv.util.questionContainer.model.QuestionContainerPK |
createSurvey(com.stratelia.webactiv.util.questionContainer.model.QuestionContainerDetail surveyDetail)
|
com.stratelia.webactiv.util.questionContainer.model.QuestionContainerPK |
createSurvey(com.stratelia.webactiv.util.questionContainer.model.QuestionContainerDetail surveyDetail,
String componentId)
|
void |
deleteResponse(String surveyId)
|
void |
deleteSurvey(String surveyId)
|
void |
deleteVotes(String surveyId)
|
String |
exportSurveyCSV(String surveyId)
|
List<org.silverpeas.attachment.model.SimpleDocument> |
getAllSynthesisFile(String surveyId)
|
Collection<com.stratelia.webactiv.util.questionContainer.model.QuestionContainerHeader> |
getClosedSurveys()
|
List<com.stratelia.webactiv.beans.admin.ComponentInstLight> |
getGalleries()
|
Collection<com.stratelia.webactiv.util.questionContainer.model.QuestionContainerHeader> |
getInWaitSurveys()
|
List<String> |
getListQuestionStyle()
Change this code with an enum list of question style using for |
protected com.silverpeas.util.template.SilverpeasTemplate |
getNewTemplate()
|
Collection<com.stratelia.webactiv.util.questionContainer.model.QuestionContainerHeader> |
getOpenedSurveys()
|
com.stratelia.webactiv.util.questionContainer.control.QuestionContainerBm |
getQuestionContainerBm()
|
com.stratelia.webactiv.util.questionResult.control.QuestionResultBm |
getQuestionResultBm()
|
Collection<String> |
getResultByUser(String userId)
|
Collection<com.stratelia.webactiv.util.questionResult.model.QuestionResult> |
getResultByUser(String userId,
com.silverpeas.util.ForeignPK questionPK)
|
List<com.stratelia.webactiv.util.question.model.Question> |
getSessionQuestions()
|
Map<String,List<String>> |
getSessionResponses()
|
com.stratelia.webactiv.util.questionContainer.model.QuestionContainerDetail |
getSessionSurvey()
|
String |
getSessionSurveyId()
|
String |
getSessionSurveyName()
|
com.stratelia.webactiv.util.questionContainer.model.QuestionContainerDetail |
getSessionSurveyUnderConstruction()
|
int |
getSilverObjectId(String objectId)
|
com.stratelia.webactiv.util.questionResult.model.QuestionResult |
getSuggestion(String userId,
String questionId,
String answerId)
|
Collection<com.stratelia.webactiv.util.questionResult.model.QuestionResult> |
getSuggestions(String surveyId)
|
com.stratelia.webactiv.util.questionContainer.model.QuestionContainerDetail |
getSurvey(String surveyId)
|
Collection<com.stratelia.webactiv.util.questionContainer.model.QuestionContainerHeader> |
getSurveys()
|
Collection<String> |
getUserByAnswer(String answerId)
|
Collection<String> |
getUserByQuestion(com.silverpeas.util.ForeignPK questionPK)
|
Collection<String> |
getUserByQuestion(com.silverpeas.util.ForeignPK questionPK,
boolean withName)
|
com.stratelia.webactiv.beans.admin.UserDetail |
getUserDetail(String userId)
|
Collection<String> |
getUsersByAnswer(String answerId)
|
Collection<String> |
getUsersBySurvey(String surveyId)
|
int |
getViewType()
|
boolean |
hasAlreadyParticipated()
Return if anonymous user has already participated with this ip |
void |
hasAlreadyParticipated(boolean state)
Set status of anonymous user (if he has already participated with this ip) |
void |
initAlertResultParticipants(com.stratelia.webactiv.util.questionContainer.model.QuestionContainerDetail surveyDetail)
|
void |
initAlertResultUsers(com.stratelia.webactiv.util.questionContainer.model.QuestionContainerDetail surveyDetail)
|
String |
initAlertUser(String surveyId)
|
boolean |
isAnonymousModeAuthorized()
Return if anonymous mode is authorized |
boolean |
isAnonymousModeEnabled()
Return if anonymous mode is enabled |
boolean |
isParticipationMultipleAllowedForUser()
Return if user can participate more than one time |
boolean |
isParticipationMultipleUsed()
Return if participationMultiple is used |
boolean |
isPdcUsed()
|
boolean |
isPollingStationMode()
|
String |
manageQuestionBusiness(String function,
javax.servlet.http.HttpServletRequest request)
|
void |
openSurvey(String surveyId)
|
void |
paste()
Paste surveys which are in the clipboard selection |
void |
questionsUpdateBusinessModel(javax.servlet.http.HttpServletRequest request)
prepare data inside session controller before sending them to the view layer |
void |
recordReply(String surveyId,
Map<String,List<String>> reply)
|
void |
recordReply(String surveyId,
Map<String,List<String>> reply,
String comment,
boolean isAnonymousComment)
|
void |
removeSessionQuestions()
|
void |
removeSessionResponses()
|
void |
removeSessionSurvey()
|
void |
removeSessionSurveyId()
|
void |
removeSessionSurveyName()
|
void |
removeSessionSurveyUnderConstruction()
|
void |
removeSynthesisFile(String idDocument)
|
void |
saveSynthesisFile(org.apache.commons.fileupload.FileItem fileSynthesis)
|
void |
sendNewSurveyAction(javax.servlet.http.HttpServletRequest request)
Refactoring : get code from view JSP and add it inside controller |
void |
setNewSurveyPositionsFromJSON(String positions)
Set new survey positions (axis classification) from JSON string |
void |
setParticipationMultipleAllowedForUser(boolean state)
Set user status to know if he can participate more than one time |
void |
setPollingStationMode(boolean pollingStationMode)
|
void |
setSessionQuestions(List<com.stratelia.webactiv.util.question.model.Question> questions)
|
void |
setSessionResponses(Map<String,List<String>> responses)
|
void |
setSessionSurvey(com.stratelia.webactiv.util.questionContainer.model.QuestionContainerDetail survey)
|
void |
setSessionSurveyId(String surveyId)
|
void |
setSessionSurveyName(String surveyName)
|
void |
setSessionSurveyUnderConstruction(com.stratelia.webactiv.util.questionContainer.model.QuestionContainerDetail surveyUnderConstruction)
|
void |
setViewType(int viewType)
|
void |
updateQuestions(Collection<com.stratelia.webactiv.util.question.model.Question> questions,
String surveyId)
|
void |
updateSurveyHeader(com.stratelia.webactiv.util.questionContainer.model.QuestionContainerHeader surveyHeader,
String surveyId)
|
void |
updateSynthesisFile(org.apache.commons.fileupload.FileItem newFileSynthesis,
String idDocument)
|
Methods inherited from class com.stratelia.silverpeas.peasCore.AbstractComponentSessionController |
---|
addClipboardSelection, clipboardPasteDone, getAlertUser, getClipboardCount, getClipboardErrorMessage, getClipboardExceptionError, getClipboardName, getClipboardObjects, getClipboardSelectedObjects, getClipboardSize, getComponentAccessController, getComponentId, getComponentLabel, getComponentName, getComponentParameters, getComponentParameterValue, getComponentParameterValue, getComponentRootName, getComponentUrl, getFavoriteSpace, getGenericPanel, getHighestSilverpeasUserRole, getIcon, getLanguage, getLastResults, getLook, getMultilang, getOrganisationController, getPersonalization, getRSSUrl, getSelection, getServerNameAndPort, getSettings, getSilverpeasUserRoles, getSpaceId, getSpaceLabel, getString, getSubscriptionContext, getUrlEncodedParameter, getUserAccessLevel, getUserAvailComponentIds, getUserAvailSpaceIds, getUserDetail, getUserId, getUserManageableGroupIds, getUserManageableSpaceIds, getUserRoleLevel, getUserRoles, isAppInMaintenance, isGroupManager, isPasswordChangeAllowed, isSpaceInMaintenance, removeClipboardElement, setAppModeMaintenance, setClipboardError, setClipboardSelectedElement, setComponentRootName, setFavoriteSpaceToMainSessionController, setGenericPanel, setIconFileName, setLastResults, setMultilangFileName, setResourceFileName, setSpaceModeMaintenance |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int OPENED_SURVEYS_VIEW
public static final int CLOSED_SURVEYS_VIEW
public static final int INWAIT_SURVEYS_VIEW
public static final String COOKIE_NAME
Constructor Detail |
---|
public SurveySessionController(com.stratelia.silverpeas.peasCore.MainSessionController mainSessionCtrl, com.stratelia.silverpeas.peasCore.ComponentContext componentContext)
mainSessionCtrl
- componentContext
- Method Detail |
---|
public com.stratelia.webactiv.util.questionContainer.control.QuestionContainerBm getQuestionContainerBm()
public com.stratelia.webactiv.util.questionResult.control.QuestionResultBm getQuestionResultBm()
public boolean isPdcUsed()
public boolean isParticipationMultipleAllowedForUser()
public void setParticipationMultipleAllowedForUser(boolean state)
state
- public boolean isParticipationMultipleUsed()
public boolean isAnonymousModeAuthorized()
public boolean isAnonymousModeEnabled()
public boolean hasAlreadyParticipated()
public void hasAlreadyParticipated(boolean state)
state
- public void setViewType(int viewType)
public int getViewType()
public Collection<com.stratelia.webactiv.util.questionContainer.model.QuestionContainerHeader> getSurveys() throws SurveyException
SurveyException
public Collection<com.stratelia.webactiv.util.questionContainer.model.QuestionContainerHeader> getOpenedSurveys() throws SurveyException
SurveyException
public Collection<com.stratelia.webactiv.util.questionContainer.model.QuestionContainerHeader> getClosedSurveys() throws SurveyException
SurveyException
public Collection<com.stratelia.webactiv.util.questionContainer.model.QuestionContainerHeader> getInWaitSurveys() throws SurveyException
SurveyException
public com.stratelia.webactiv.util.questionContainer.model.QuestionContainerDetail getSurvey(String surveyId) throws SurveyException
surveyId
- the survey identifier
SurveyException
public com.stratelia.webactiv.util.questionContainer.model.QuestionContainerPK createSurvey(com.stratelia.webactiv.util.questionContainer.model.QuestionContainerDetail surveyDetail) throws SurveyException
SurveyException
public com.stratelia.webactiv.util.questionContainer.model.QuestionContainerPK createSurvey(com.stratelia.webactiv.util.questionContainer.model.QuestionContainerDetail surveyDetail, String componentId) throws SurveyException
SurveyException
public void updateSurveyHeader(com.stratelia.webactiv.util.questionContainer.model.QuestionContainerHeader surveyHeader, String surveyId) throws SurveyException
SurveyException
public void updateQuestions(Collection<com.stratelia.webactiv.util.question.model.Question> questions, String surveyId) throws SurveyException
SurveyException
public void deleteSurvey(String surveyId) throws SurveyException
SurveyException
public void deleteVotes(String surveyId) throws SurveyException
SurveyException
public void deleteResponse(String surveyId) throws SurveyException
SurveyException
public Collection<String> getUserByQuestion(com.silverpeas.util.ForeignPK questionPK) throws RemoteException
RemoteException
public Collection<String> getUserByQuestion(com.silverpeas.util.ForeignPK questionPK, boolean withName) throws RemoteException
RemoteException
public Collection<com.stratelia.webactiv.util.questionResult.model.QuestionResult> getResultByUser(String userId, com.silverpeas.util.ForeignPK questionPK) throws RemoteException
RemoteException
public Collection<String> getResultByUser(String userId) throws RemoteException
RemoteException
public Collection<String> getUserByAnswer(String answerId) throws RemoteException
RemoteException
public void closeSurvey(String surveyId) throws SurveyException
SurveyException
public void openSurvey(String surveyId) throws SurveyException
SurveyException
public void recordReply(String surveyId, Map<String,List<String>> reply) throws SurveyException
SurveyException
public void recordReply(String surveyId, Map<String,List<String>> reply, String comment, boolean isAnonymousComment) throws SurveyException
SurveyException
public Collection<com.stratelia.webactiv.util.questionResult.model.QuestionResult> getSuggestions(String surveyId) throws SurveyException
SurveyException
public Collection<String> getUsersByAnswer(String answerId) throws RemoteException
RemoteException
public Collection<String> getUsersBySurvey(String surveyId) throws RemoteException, SurveyException
RemoteException
SurveyException
public com.stratelia.webactiv.beans.admin.UserDetail getUserDetail(String userId)
getUserDetail
in class com.stratelia.silverpeas.peasCore.AbstractComponentSessionController
public int getSilverObjectId(String objectId)
public com.stratelia.webactiv.util.questionContainer.model.QuestionContainerDetail getSessionSurveyUnderConstruction()
public void setSessionSurveyUnderConstruction(com.stratelia.webactiv.util.questionContainer.model.QuestionContainerDetail surveyUnderConstruction)
public void removeSessionSurveyUnderConstruction()
public com.stratelia.webactiv.util.questionContainer.model.QuestionContainerDetail getSessionSurvey()
public void setSessionSurvey(com.stratelia.webactiv.util.questionContainer.model.QuestionContainerDetail survey)
public void removeSessionSurvey()
public List<com.stratelia.webactiv.util.question.model.Question> getSessionQuestions()
public void setSessionQuestions(List<com.stratelia.webactiv.util.question.model.Question> questions)
public void removeSessionQuestions()
public Map<String,List<String>> getSessionResponses()
public void setSessionResponses(Map<String,List<String>> responses)
public void removeSessionResponses()
public String getSessionSurveyId()
public void setSessionSurveyId(String surveyId)
public void removeSessionSurveyId()
public String getSessionSurveyName()
public void setSessionSurveyName(String surveyName)
public void removeSessionSurveyName()
public void close()
close
in class com.stratelia.silverpeas.peasCore.AbstractComponentSessionController
public String initAlertUser(String surveyId) throws RemoteException, SurveyException
RemoteException
SurveyException
public boolean isPollingStationMode()
public void setPollingStationMode(boolean pollingStationMode)
public List<com.stratelia.webactiv.beans.admin.ComponentInstLight> getGalleries()
public String exportSurveyCSV(String surveyId)
public void copySurvey(String surveyId) throws com.silverpeas.util.clipboard.ClipboardException, SurveyException
com.silverpeas.util.clipboard.ClipboardException
SurveyException
public void paste() throws Exception
Exception
protected com.silverpeas.util.template.SilverpeasTemplate getNewTemplate()
public void questionsUpdateBusinessModel(javax.servlet.http.HttpServletRequest request)
request
- the current HttpServletRequestpublic List<String> getListQuestionStyle()
public String manageQuestionBusiness(String function, javax.servlet.http.HttpServletRequest request)
function
- request
-
public void sendNewSurveyAction(javax.servlet.http.HttpServletRequest request)
request
- the HttpServletRequest which contains all the request parameterpublic void setNewSurveyPositionsFromJSON(String positions)
positions:
- the JSON string positionspublic void initAlertResultParticipants(com.stratelia.webactiv.util.questionContainer.model.QuestionContainerDetail surveyDetail) throws RemoteException, SurveyException
RemoteException
SurveyException
public void initAlertResultUsers(com.stratelia.webactiv.util.questionContainer.model.QuestionContainerDetail surveyDetail) throws RemoteException
RemoteException
public void saveSynthesisFile(org.apache.commons.fileupload.FileItem fileSynthesis) throws SurveyException
SurveyException
public void updateSynthesisFile(org.apache.commons.fileupload.FileItem newFileSynthesis, String idDocument) throws SurveyException
SurveyException
public void removeSynthesisFile(String idDocument)
public List<org.silverpeas.attachment.model.SimpleDocument> getAllSynthesisFile(String surveyId)
public com.stratelia.webactiv.util.questionResult.model.QuestionResult getSuggestion(String userId, String questionId, String answerId) throws SurveyException
SurveyException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |