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 void
classifyQuestionReply(long questionId, String positions)
Classify the question reply FAQ on the PdC only if the positions parameter is filledvoid
closeQuestion(long questionId)
void
closeQuestions(Collection<Long> questionIds)
void
createCategory(Category category)
void
deleteCategory(String categoryId)
void
deleteQuestions(Collection<Long> questionsIds)
void
deleteR(Collection<Long> replyIds)
org.silverpeas.core.importexport.report.ExportReport
export(org.silverpeas.core.util.MultiSilverpeasBundle resource)
String
genericWriters()
Collection<org.silverpeas.core.node.model.NodeDetail>
getAllCategories()
Category
getCategory(String categoryId)
Question
getCurrentQuestion()
String
getCurrentQuestionContentId()
Collection<org.silverpeas.core.admin.user.model.UserDetail>
getCurrentQuestionWriters()
Reply
getCurrentReply()
org.silverpeas.core.admin.user.model.SilverpeasRole
getHighestSilverpeasUserRole()
Question
getNewQuestion()
Reply
getNewReply()
Question
getQuestion(long questionId)
Collection<Question>
getQuestions()
Collection<Question>
getQuestionsByCategory(String categoryId)
Collection<Reply>
getRepliesForQuestion(long id)
Reply
getReply(long replyId)
org.silverpeas.core.pdc.pdc.model.SearchContext
getSilverContentIdPosition()
String
getUserProfil()
org.silverpeas.core.admin.user.model.SilverpeasRole
getUserRole()
boolean
isPDCUsed()
boolean
isPrivateRepliesEnabled()
boolean
isUserExpert()
void
openQuestion(long questionId)
long
saveNewFAQ(Collection<org.silverpeas.core.io.upload.UploadedFile> uploadedFiles)
Persist new FAQ inside database and add positionslong
saveNewQuestion()
void
saveNewReply(Collection<org.silverpeas.core.io.upload.UploadedFile> uploadedFiles)
void
setCurrentQuestion(Question question)
void
setCurrentReply(Reply reply)
void
setNewQuestionContent(String title, String content, String categoryId)
void
setNewReplyContent(String title, String content, int publicReply, int privateReply)
void
setUserProfil()
void
setUserProfil(String profil)
void
updateCategory(Category category)
void
updateCurrentQuestion(String title, String content, String categoryId)
void
updateCurrentReply(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:
getHighestSilverpeasUserRole
in interfaceorg.silverpeas.core.web.mvc.controller.ComponentSessionController
- Overrides:
getHighestSilverpeasUserRole
in 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:
QuestionReplyException
ParseException
-
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
-
-