Class QuestionReplySessionController
- java.lang.Object
-
- org.silverpeas.core.web.mvc.controller.AbstractComponentSessionController
-
- org.silverpeas.components.questionreply.control.QuestionReplySessionController
-
- All Implemented Interfaces:
Serializable,org.silverpeas.core.web.mvc.controller.ComponentSessionController,org.silverpeas.core.web.session.SessionCloseable
public class QuestionReplySessionController extends org.silverpeas.core.web.mvc.controller.AbstractComponentSessionController- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description QuestionReplySessionController(org.silverpeas.core.web.mvc.controller.MainSessionController mainSessionCtrl, org.silverpeas.core.web.mvc.controller.ComponentContext context, String multilangBaseName, String iconBaseName)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclassifyQuestionReply(long questionId, String positions)Classify the question reply FAQ on the PdC only if the positions parameter is filledvoidcloseQuestion(long questionId)voidcloseQuestions(Collection<Long> questionIds)voidcreateCategory(Category category)voiddeleteCategory(String categoryId)voiddeleteQuestions(Collection<Long> questionsIds)voiddeleteR(Collection<Long> replyIds)org.silverpeas.core.importexport.report.ExportReportexport(org.silverpeas.core.util.MultiSilverpeasBundle resource)StringgenericWriters()Collection<org.silverpeas.core.node.model.NodeDetail>getAllCategories()CategorygetCategory(String categoryId)QuestiongetCurrentQuestion()StringgetCurrentQuestionContentId()Collection<org.silverpeas.core.admin.user.model.UserDetail>getCurrentQuestionWriters()ReplygetCurrentReply()org.silverpeas.core.admin.user.model.SilverpeasRolegetHighestSilverpeasUserRole()QuestiongetNewQuestion()ReplygetNewReply()QuestiongetQuestion(long questionId)Collection<Question>getQuestions()Collection<Question>getQuestionsByCategory(String categoryId)Collection<Reply>getRepliesForQuestion(long id)ReplygetReply(long replyId)org.silverpeas.core.pdc.pdc.model.SearchContextgetSilverContentIdPosition()StringgetUserProfil()org.silverpeas.core.admin.user.model.SilverpeasRolegetUserRole()booleanisPDCUsed()booleanisPrivateRepliesEnabled()booleanisUserExpert()voidopenQuestion(long questionId)longsaveNewFAQ(Collection<org.silverpeas.core.io.upload.UploadedFile> uploadedFiles)Persist new FAQ inside database and add positionslongsaveNewQuestion()voidsaveNewReply(Collection<org.silverpeas.core.io.upload.UploadedFile> uploadedFiles)voidsetCurrentQuestion(Question question)voidsetCurrentReply(Reply reply)voidsetNewQuestionContent(String title, String content, String categoryId)voidsetNewReplyContent(String title, String content, int publicReply, int privateReply)voidsetUserProfil()voidsetUserProfil(String profil)voidupdateCategory(Category category)voidupdateCurrentQuestion(String title, String content, String categoryId)voidupdateCurrentReply(String title, String content)-
Methods inherited from class org.silverpeas.core.web.mvc.controller.AbstractComponentSessionController
addClipboardSelection, clipboardPasteDone, close, getClipboardErrorMessage, getClipboardExceptionError, getClipboardObjects, getClipboardSelectedObjects, getClipboardSize, getComponentAccessController, getComponentId, getComponentLabel, getComponentName, getComponentParameterValue, getComponentParameterValue, getComponentRootName, getComponentUrl, getIcon, getLanguage, getLook, getMultilang, getOrganisationController, getPersonalization, getRSSUrl, getSelection, getSettings, getSilverpeasUserRoles, getSpaceId, getSpaceLabel, getString, getSubscriptionContext, getUrlEncodedParameter, getUserAccessLevel, getUserAvailComponentIds, getUserDetail, getUserDetail, getUserId, getUserManageableGroupIds, getUserManageableSpaceIds, getUserRoles, getZoneId, isAppInMaintenance, isGroupManager, isPasswordChangeAllowed, isSpaceInMaintenance, removeClipboardElement, setAppModeMaintenance, setClipboardSelectedElement, setComponentRootName, setSpaceModeMaintenance
-
-
-
-
Method Detail
-
getQuestions
public Collection<Question> getQuestions() throws QuestionReplyException
- Throws:
QuestionReplyException
-
getQuestionsByCategory
public Collection<Question> getQuestionsByCategory(String categoryId) throws QuestionReplyException
- Throws:
QuestionReplyException
-
getQuestion
public Question getQuestion(long questionId) throws QuestionReplyException
- Throws:
QuestionReplyException
-
getRepliesForQuestion
public Collection<Reply> getRepliesForQuestion(long id) throws QuestionReplyException
- Throws:
QuestionReplyException
-
getCurrentQuestion
public Question getCurrentQuestion()
-
setCurrentQuestion
public void setCurrentQuestion(Question question)
-
getReply
public Reply getReply(long replyId) throws QuestionReplyException
- Throws:
QuestionReplyException
-
getCurrentReply
public Reply getCurrentReply()
-
setCurrentReply
public void setCurrentReply(Reply reply)
-
getNewQuestion
public Question getNewQuestion()
-
setNewQuestionContent
public void setNewQuestionContent(String title, String content, String categoryId)
-
saveNewQuestion
public long saveNewQuestion() throws QuestionReplyException- Throws:
QuestionReplyException
-
getNewReply
public Reply getNewReply()
-
setNewReplyContent
public void setNewReplyContent(String title, String content, int publicReply, int privateReply)
-
saveNewFAQ
public long saveNewFAQ(Collection<org.silverpeas.core.io.upload.UploadedFile> uploadedFiles) throws QuestionReplyException
Persist new FAQ inside database and add positions- Returns:
- question identifier
- Throws:
QuestionReplyException
-
saveNewReply
public void saveNewReply(Collection<org.silverpeas.core.io.upload.UploadedFile> uploadedFiles) throws QuestionReplyException
- Throws:
QuestionReplyException
-
updateCurrentQuestion
public void updateCurrentQuestion(String title, String content, String categoryId) throws QuestionReplyException
- Throws:
QuestionReplyException
-
updateCurrentReply
public void updateCurrentReply(String title, String content) throws QuestionReplyException
- Throws:
QuestionReplyException
-
deleteQuestions
public void deleteQuestions(Collection<Long> questionsIds) throws QuestionReplyException
- Throws:
QuestionReplyException
-
deleteR
public void deleteR(Collection<Long> replyIds) throws QuestionReplyException
- Throws:
QuestionReplyException
-
closeQuestions
public void closeQuestions(Collection<Long> questionIds) throws QuestionReplyException
- Throws:
QuestionReplyException
-
closeQuestion
public void closeQuestion(long questionId) throws QuestionReplyException- Throws:
QuestionReplyException
-
openQuestion
public void openQuestion(long questionId) throws QuestionReplyException- Throws:
QuestionReplyException
-
setUserProfil
public final void setUserProfil()
-
setUserProfil
public void setUserProfil(String profil)
-
getUserProfil
public String getUserProfil()
-
getUserRole
public org.silverpeas.core.admin.user.model.SilverpeasRole getUserRole()
-
getHighestSilverpeasUserRole
public org.silverpeas.core.admin.user.model.SilverpeasRole getHighestSilverpeasUserRole()
- Specified by:
getHighestSilverpeasUserRolein interfaceorg.silverpeas.core.web.mvc.controller.ComponentSessionController- Overrides:
getHighestSilverpeasUserRolein classorg.silverpeas.core.web.mvc.controller.AbstractComponentSessionController
-
isUserExpert
public boolean isUserExpert()
-
getSilverContentIdPosition
public org.silverpeas.core.pdc.pdc.model.SearchContext getSilverContentIdPosition() throws QuestionReplyException- Throws:
QuestionReplyException
-
genericWriters
public String genericWriters() throws QuestionReplyException
- Throws:
QuestionReplyException
-
getCurrentQuestionWriters
public Collection<org.silverpeas.core.admin.user.model.UserDetail> getCurrentQuestionWriters() throws QuestionReplyException
- Throws:
QuestionReplyException
-
getCurrentQuestionContentId
public String getCurrentQuestionContentId()
-
isPrivateRepliesEnabled
public boolean isPrivateRepliesEnabled()
-
isPDCUsed
public boolean isPDCUsed()
-
getAllCategories
public Collection<org.silverpeas.core.node.model.NodeDetail> getAllCategories() throws QuestionReplyException
- Throws:
QuestionReplyException
-
createCategory
public void createCategory(Category category) throws QuestionReplyException
- Throws:
QuestionReplyException
-
getCategory
public Category getCategory(String categoryId) throws QuestionReplyException
- Throws:
QuestionReplyException
-
updateCategory
public void updateCategory(Category category) throws QuestionReplyException
- Throws:
QuestionReplyException
-
deleteCategory
public void deleteCategory(String categoryId) throws QuestionReplyException
- Throws:
QuestionReplyException
-
export
public org.silverpeas.core.importexport.report.ExportReport export(org.silverpeas.core.util.MultiSilverpeasBundle resource) throws QuestionReplyException, ParseException- Throws:
QuestionReplyExceptionParseException
-
classifyQuestionReply
public void classifyQuestionReply(long questionId, String positions)Classify the question reply FAQ on the PdC only if the positions parameter is filled- Parameters:
questionId- the question identifierpositions- the json string positions
-
-