org.exoplatform.faq.service
Interface FAQService

All Superinterfaces:
FAQServiceLegacy
All Known Implementing Classes:
FAQServiceImpl

public interface FAQService
extends FAQServiceLegacy

Created by The eXo Platform SARL.

FAQService is interface provide functions for processing database with category and question include: add, edit, remove and search categories or questions.

Since:
Mar 04, 2008
Author:
Hung Nguyen Quang hung.nguyen@exoplatform.com

Method Summary
 void addInitialDataPlugin(InitialDataPlugin plugin)
          Plugin to initialize default FAQ data
 void addInitRssPlugin(org.exoplatform.container.component.ComponentPlugin plugin)
           
 void addLanguage(javax.jcr.Node questionNode, QuestionLanguage language)
          Add language for question node, this function only use for Question node, and language node is added not default.
 void addLanguage(java.lang.String questionPath, QuestionLanguage language)
           
 void addPlugin(org.exoplatform.container.component.ComponentPlugin plugin)
          Adds the plugin.
 void addRolePlugin(org.exoplatform.container.component.ComponentPlugin plugin)
          Adds the plugin.
 void addWatchCategory(java.lang.String id, Watch watch)
          This function is used to allow user can watch a category.
 void addWatchQuestion(java.lang.String questionId, Watch watch, boolean isNew)
           
 void changeStatusCategoryView(java.util.List<java.lang.String> listCateIds)
           
 void deleteAnswer(java.lang.String questionId, java.lang.String answerId)
           
 void deleteAnswerQuestionLang(java.lang.String questionPath, java.lang.String answerId, java.lang.String language)
           
 void deleteCategoryWatch(java.lang.String categoryId, java.lang.String user)
          This method will delete watch in one category
 void deleteComment(java.lang.String questionId, java.lang.String commentId)
           
 void deleteCommentQuestionLang(java.lang.String questionPath, java.lang.String commentId, java.lang.String language)
           
 long existingCategories()
           
 java.io.InputStream exportData(java.lang.String categoryId, boolean createZipFile)
           
 java.util.List<java.lang.String> getActiveBBCode()
           
 java.util.List<BBCode> getAllBBCode()
           
 java.util.List<Category> getAllCategories()
          This method should lookup all the category and convert to category object and return list of category object
 java.util.List<java.lang.String> getAllFAQAdmin()
          Get all user is admin.
 QuestionPageList getAllQuestions()
          Get all questions
 QuestionPageList getAllQuestionsByCatetory(java.lang.String categoryId, FAQSetting faqSetting)
          Get all questions of the category.
 Answer getAnswerById(java.lang.String questionId, java.lang.String answerid)
           
 Answer getAnswerById(java.lang.String questionPath, java.lang.String answerid, java.lang.String language)
           
 BBCode getBBcode(java.lang.String id)
           
 Category getCategoryById(java.lang.String categoryId)
          This method should lookup category via identify and convert to Category object and return
 long[] getCategoryInfo(java.lang.String categoryId, FAQSetting setting)
          Get some informations of category: Lookup category node by category's id and count sub-categories and questions are contained in this category.
 CategoryInfo getCategoryInfo(java.lang.String categoryPath, java.util.List<java.lang.String> categoryIdScoped)
           
 java.lang.String getCategoryNameOf(java.lang.String categoryPath)
           
 javax.jcr.Node getCategoryNodeById(java.lang.String categoryId)
           
 java.util.List<java.lang.String> getCategoryPath(java.lang.String categoryId)
          This method return path of category identify
 java.lang.String getCategoryPathOf(java.lang.String id)
           
 java.lang.String getCategoryPathOfQuestion(java.lang.String categoryId)
          Get path of question.
 Comment getCommentById(java.lang.String questionId, java.lang.String commentId)
           
 Comment getCommentById(java.lang.String questionPath, java.lang.String commentId, java.lang.String language)
           
 java.util.List<java.lang.String> getListCateIdByModerator(java.lang.String user)
          Get all categories of user.
 QuestionPageList getListMailInWatch(java.lang.String categoryId)
           
 QuestionPageList getListQuestionsWatch(FAQSetting faqSetting, java.lang.String currentUser)
           
 long getMaxindexCategory(java.lang.String parentId)
           
 NotifyInfo getMessageInfo(java.lang.String name)
           
 java.lang.String[] getModeratorsOf(java.lang.String path)
           
 JCRPageList getPageListAnswer(java.lang.String questionId, java.lang.Boolean isSortByVote)
           
 JCRPageList getPageListComment(java.lang.String questionId)
           
 java.lang.String getParentCategoriesName(java.lang.String path)
           
 QuestionPageList getPendingQuestionsByCategory(java.lang.String categoryId, FAQSetting faqSetting)
           
 Question getQuestionById(java.lang.String questionId)
          Lookup the question node via identify, convert to question object and return
 java.util.List<java.lang.String> getQuestionContents(java.util.List<java.lang.String> paths)
           
 QuestionLanguage getQuestionLanguageByLanguage(java.lang.String questionPath, java.lang.String language)
           
 java.util.List<QuestionLanguage> getQuestionLanguages(java.lang.String questionId)
          Get all language nodes of question node which have id is specified, with each language node get properties of them and set into QuestionLanguage object.
 javax.jcr.Node getQuestionNodeById(java.lang.String path)
           
 QuestionPageList getQuestionsByCatetory(java.lang.String categoryId, FAQSetting faqSetting)
          Get questions are activagted and approved in the category.
 QuestionPageList getQuestionsByListCatetory(java.util.List<java.lang.String> listCategoryId, boolean isNotYetAnswer)
          Get questions in list categories.
 javax.jcr.NodeIterator getQuestionsIterator()
           
 QuestionPageList getQuestionsNotYetAnswer(java.lang.String categoryId, boolean isApproved)
          Get all questisons not yet answered, the first get all questions which have property response is null (have not yet answer) then convert to list of question object
 java.util.List<Question> getQuickQuestionsByListCatetory(java.util.List<java.lang.String> listCategoryId, boolean isNotYetAnswer)
           
 java.util.List<ObjectSearchResult> getSearchResults(FAQEventQuery eventQuery)
          This method should lookup all the categories node so find category have user in moderators and convert to category object and return list of category object
 java.util.List<Category> getSubCategories(java.lang.String categoryId, FAQSetting faqSetting, boolean isGetAll, java.util.List<java.lang.String> userView)
          This method should lookup all sub-categories of a category and convert to category object and return list of category object
 byte[] getTemplate()
           
 FileAttachment getUserAvatar(java.lang.String userName)
           
 void getUserSetting(java.lang.String userName, FAQSetting faqSetting)
          Get setting of user to view data (categories and questions).
 java.util.List<Watch> getWatchByCategory(java.lang.String categoryId)
           
 QuestionPageList getWatchedCategoryByUser(java.lang.String userId)
           
 boolean hasWatch(java.lang.String categoryPath)
           
 boolean importData(java.lang.String categoryId, java.io.InputStream inputStream, boolean isZip)
           
 boolean isAdminRole(java.lang.String userName)
          Check permission of user
 boolean isCategoryExist(java.lang.String name, java.lang.String path)
           
 boolean isCategoryModerator(java.lang.String categoryPath, java.lang.String user)
           
 boolean isExisting(java.lang.String path)
           
 boolean isModerateAnswer(java.lang.String id)
           
 boolean isModerateQuestion(java.lang.String id)
           
 boolean isUserWatched(java.lang.String userId, java.lang.String cateId)
           
 boolean isViewAuthorInfo(java.lang.String id)
           
 java.util.List<Cate> listingCategoryTree()
           
 void moveCategory(java.lang.String categoryId, java.lang.String destCategoryId)
           
 void moveQuestions(java.util.List<java.lang.String> questions, java.lang.String destCategoryId, java.lang.String questionLink, FAQSetting faqSetting)
          Move all of questions to category which have id is specified
 void removeBBCode(java.lang.String bbcodeId)
           
 void removeCategory(java.lang.String categoryId)
          This method should check exists of category and remove it
 void removeLanguage(java.lang.String questionPath, java.util.List<java.lang.String> listLanguage)
           
 void removeQuestion(java.lang.String questionId)
          Delete question by question's id.
 void saveAnswer(java.lang.String questionId, Answer[] answers)
           
 void saveAnswer(java.lang.String questionId, Answer answer, boolean isNew)
           
 void saveAnswer(java.lang.String questionPath, Answer answer, java.lang.String languge)
           
 void saveAnswer(java.lang.String questionPath, QuestionLanguage questionLanguage)
           
 void saveBBCode(java.util.List<BBCode> bbcodes)
           
 void saveCategory(java.lang.String parentId, Category cat, boolean isAddNew)
          This method should check exists category or NOT to create new or update exists category
 void saveComment(java.lang.String questionId, Comment comment, boolean isNew)
           
 void saveComment(java.lang.String questionPath, Comment comment, java.lang.String languge)
           
 void saveFAQSetting(FAQSetting faqSetting, java.lang.String userName)
          This method to update FAQ setting.
 javax.jcr.Node saveQuestion(Question question, boolean isAddNew, FAQSetting faqSetting)
          Save question after create new question or edit infor of quesiton which is existed.
 void saveTemplate(java.lang.String str)
           
 void saveTopicIdDiscussQuestion(java.lang.String questionId, java.lang.String pathDiscuss)
           
 void saveUserAvatar(java.lang.String userId, FileAttachment fileAttachment)
           
 void sendMessage(org.exoplatform.services.mail.Message message)
          This method will send message to address but you want send
 void setDefaultAvatar(java.lang.String userName)
           
 void swapCategories(java.lang.String cateId1, java.lang.String cateId2)
           
 void unVoteQuestion(java.lang.String questionPath, java.lang.String userName)
           
 void unWatchCategory(java.lang.String categoryId, java.lang.String userCurrent)
          This method will un watch in one category
 void unWatchQuestion(java.lang.String questionID, java.lang.String userCurrent)
          This method will un watch in one question
 void updateQuestionRelatives(java.lang.String questionPath, java.lang.String[] relatives)
           
 void voteAnswer(java.lang.String answerPath, java.lang.String userName, boolean isUp)
           
 void voteQuestion(java.lang.String questionPath, java.lang.String userName, int number)
           
 
Methods inherited from interface org.exoplatform.faq.service.FAQServiceLegacy
addWatch, addWatchQuestion, changeStatusCategoryView, deleteAnswer, deleteComment, deleteMailInWatch, getAllCategories, getAllQuestions, getAllQuestionsByCatetory, getAnswerById, getCategoryById, getCategoryInfo, getCategoryNodeById, getCategoryPath, getCategoryPathOfQuestion, getCommentById, getListCategoriesWatch, getListCateIdByModerator, getListQuestionsWatch, getMaxindexCategory, getPageListAnswer, getPageListComment, getPendingQuestionsByCategory, getQuestionById, getQuestionLanguages, getQuestionsByCatetory, getQuestionsByListCatetory, getQuestionsIterator, getQuestionsNotYetAnswer, getSubCategories, getUserAvatar, getUserSetting, getWatchByUser, importData, isAdminRole, moveCategory, moveQuestions, removeCategory, removeQuestion, saveAnswer, saveAnswer, saveCategory, saveComment, saveFAQSetting, saveQuestion, saveTopicIdDiscussQuestion, saveUserAvatar, setDefaultAvatar, swapCategories, UnWatch, UnWatchQuestion
 

Method Detail

addPlugin

void addPlugin(org.exoplatform.container.component.ComponentPlugin plugin)
               throws java.lang.Exception
Adds the plugin.

Parameters:
plugin - the plugin
Throws:
java.lang.Exception - the exception

addInitialDataPlugin

void addInitialDataPlugin(InitialDataPlugin plugin)
                          throws java.lang.Exception
Plugin to initialize default FAQ data

Parameters:
plugin -
Throws:
java.lang.Exception

addInitRssPlugin

void addInitRssPlugin(org.exoplatform.container.component.ComponentPlugin plugin)
                      throws java.lang.Exception
Throws:
java.lang.Exception

saveCategory

void saveCategory(java.lang.String parentId,
                  Category cat,
                  boolean isAddNew)
                  throws java.lang.Exception
This method should check exists category or NOT to create new or update exists category

This function is used to add new or edit category in list. User will input information of fields need in form add category, so user save then category will persistent in data

Parameters:
parentId - is address id of the category parent where user want add sub category when paretId = null so this category is parent category else sub category
cat - is properties that user input to interface will save on data
isAddNew - is true when add new category else update category
sProvider - is session provider
Throws:
java.lang.Exception - the exception
See Also:
category

changeStatusCategoryView

void changeStatusCategoryView(java.util.List<java.lang.String> listCateIds)
                              throws java.lang.Exception
Throws:
java.lang.Exception

removeCategory

void removeCategory(java.lang.String categoryId)
                    throws java.lang.Exception
This method should check exists of category and remove it

Parameters:
categoryId - is address id of the category need remove
sProvider - is session provider
Throws:
java.lang.Exception - the exception

getCategoryById

Category getCategoryById(java.lang.String categoryId)
                         throws java.lang.Exception
This method should lookup category via identify and convert to Category object and return

Parameters:
categoryId - is address id of the category so you want get
sProvider - is session provider
Returns:
category is id = categoryId
Throws:
java.lang.Exception - the exception
See Also:
category

getAllCategories

java.util.List<Category> getAllCategories()
                                          throws java.lang.Exception
This method should lookup all the category and convert to category object and return list of category object

Parameters:
sProvider - is session provider
Returns:
Category list
Throws:
java.lang.Exception - the exception

getListCateIdByModerator

java.util.List<java.lang.String> getListCateIdByModerator(java.lang.String user)
                                                          throws java.lang.Exception
Get all categories of user. the first lookup all the categories, find categories which have user in moderators after that put this categories into a list category object

Parameters:
user - the name of user
sProvider - the session provider
Returns:
Category list
Throws:
java.lang.Exception - if can't found user

getSubCategories

java.util.List<Category> getSubCategories(java.lang.String categoryId,
                                          FAQSetting faqSetting,
                                          boolean isGetAll,
                                          java.util.List<java.lang.String> userView)
                                          throws java.lang.Exception
This method should lookup all sub-categories of a category and convert to category object and return list of category object

Parameters:
categoryId - the category id
userView - TODO
sProvider - the s provider
Returns:
Category list
Throws:
java.lang.Exception - the exception

moveCategory

void moveCategory(java.lang.String categoryId,
                  java.lang.String destCategoryId)
                  throws java.lang.Exception
Throws:
java.lang.Exception

saveQuestion

javax.jcr.Node saveQuestion(Question question,
                            boolean isAddNew,
                            FAQSetting faqSetting)
                            throws java.lang.Exception
Save question after create new question or edit infor of quesiton which is existed. If param isAddNew is true then create new question node and set properties of question object to this node else reset infor for this question node

Parameters:
question - the question
isAddNew - is true if create new question node and is false if edit question node
sProvider - the sesison provider
Returns:
the question node
Throws:
java.lang.Exception - if path of question nod not found

removeQuestion

void removeQuestion(java.lang.String questionId)
                    throws java.lang.Exception
Delete question by question's id. Check question if it's existed then remove it

Parameters:
questionId - the id of question is deleted
sProvider - the s provider
Throws:
java.lang.Exception - if question not found

getQuestionById

Question getQuestionById(java.lang.String questionId)
                         throws java.lang.Exception
Lookup the question node via identify, convert to question object and return

Parameters:
questionId - the question id
sProvider - the s provider
Returns:
Question
Throws:
java.lang.Exception - the exception

getAllQuestions

QuestionPageList getAllQuestions()
                                 throws java.lang.Exception
Get all questions

Parameters:
sProvider - the s provider
Returns:
List of question
Throws:
java.lang.Exception - if attachment not foune

getQuestionsNotYetAnswer

QuestionPageList getQuestionsNotYetAnswer(java.lang.String categoryId,
                                          boolean isApproved)
                                          throws java.lang.Exception
Get all questisons not yet answered, the first get all questions which have property response is null (have not yet answer) then convert to list of question object

Parameters:
sProvider - the session provider
Returns:
List of question
Throws:
java.lang.Exception - if lost attachment

getQuestionsByCatetory

QuestionPageList getQuestionsByCatetory(java.lang.String categoryId,
                                        FAQSetting faqSetting)
                                        throws java.lang.Exception
Get questions are activagted and approved in the category. The first get category from id which is specified by param categoryId then lookup questions of this category, only question is activated and approved via category identify, the last convert to list of question object

Parameters:
categoryId - the category id
sProvider - the session provider
Returns:
Question list
Throws:
java.lang.Exception - if can't found category

getAllQuestionsByCatetory

QuestionPageList getAllQuestionsByCatetory(java.lang.String categoryId,
                                           FAQSetting faqSetting)
                                           throws java.lang.Exception
Get all questions of the category. The first get category from id which is specified by param categoryId then get all questions of this category and put them into an question page list object

Parameters:
categoryId - the id of category
sProvider - the session provider
Returns:
Question page list
Throws:
java.lang.Exception - when category not found

getCategoryInfo

long[] getCategoryInfo(java.lang.String categoryId,
                       FAQSetting setting)
                       throws java.lang.Exception
Get some informations of category: Lookup category node by category's id and count sub-categories and questions are contained in this category.

Parameters:
categoryId - the category id
sProvider - the s provider
Returns:
number of sub-categories number of questions number of questions is not approved number of question is have not yet answered
Throws:
java.lang.Exception - if not found category by id if not found question or lose file attach
java.lang.Exception - the exception

getQuestionsByListCatetory

QuestionPageList getQuestionsByListCatetory(java.util.List<java.lang.String> listCategoryId,
                                            boolean isNotYetAnswer)
                                            throws java.lang.Exception
Get questions in list categories.

With each category in the list categories, if isNotYetAnswer is false get all questoin in this catgory else get questions which is not yet answered, and put them in to a QuestionPageList object

Parameters:
listCategoryId - the list category id
isNotYetAnswer - is true if get qeustions not yet answered is false if want get all questions in list categories
sProvider - the session provider
Returns:
Question page list
Throws:
java.lang.Exception - the exception

getCategoryPathOfQuestion

java.lang.String getCategoryPathOfQuestion(java.lang.String categoryId)
                                           throws java.lang.Exception
Get path of question. For example question A is included in category C and C is child of category B, then, this function will be return C > B

Parameters:
categoryId - id of category is contain question
sProvider - the Session provider
Returns:
name of categories
Throws:
java.lang.Exception

getQuestionLanguages

java.util.List<QuestionLanguage> getQuestionLanguages(java.lang.String questionId)
                                                      throws java.lang.Exception
Get all language nodes of question node which have id is specified, with each language node get properties of them and set into QuestionLanguage object. One QuestionLanguage object have properties:

Parameters:
questionId - the id of question
sProvider - the session provider
Returns:
list languages are support by the question
Throws:
java.lang.Exception - when question not found

moveQuestions

void moveQuestions(java.util.List<java.lang.String> questions,
                   java.lang.String destCategoryId,
                   java.lang.String questionLink,
                   FAQSetting faqSetting)
                   throws java.lang.Exception
Move all of questions to category which have id is specified

Parameters:
questions - the questions
destCategoryId - the dest category id
questionLink - TODO
faqSetting - TODO
sProvider - the s provider
Throws:
java.lang.Exception - the exception

saveFAQSetting

void saveFAQSetting(FAQSetting faqSetting,
                    java.lang.String userName)
                    throws java.lang.Exception
This method to update FAQ setting.

Parameters:
newSetting - the new setting
sProvider - the session provider
Throws:
java.lang.Exception - the exception

addWatchCategory

void addWatchCategory(java.lang.String id,
                      Watch watch)
                      throws java.lang.Exception
This function is used to allow user can watch a category. You have to register your email for whenever there is new question is inserted in the category or new category then there will a notification sent to you.

Parameters:
id - of category with user want add watch on that category
value, - this address email (multiple value) with input to interface will save on data
sProvider - the session provider
Throws:
java.lang.Exception - the exception

deleteCategoryWatch

void deleteCategoryWatch(java.lang.String categoryId,
                         java.lang.String user)
                         throws java.lang.Exception
This method will delete watch in one category

Parameters:
categoryId - is id of current category
sProvider - the session provider
emails - is location current of one watch with user want delete
Throws:
java.lang.Exception - the exception

unWatchCategory

void unWatchCategory(java.lang.String categoryId,
                     java.lang.String userCurrent)
                     throws java.lang.Exception
This method will un watch in one category

Parameters:
categoryId - is id of current category
sProvider - the session provider
userCurrent - is user current then you un watch
Throws:
java.lang.Exception - the exception

unWatchQuestion

void unWatchQuestion(java.lang.String questionID,
                     java.lang.String userCurrent)
                     throws java.lang.Exception
This method will un watch in one question

Parameters:
questionId - is id of current category
sProvider - the session provider
userCurrent - is user current then you un watch
Throws:
java.lang.Exception - the exception

getSearchResults

java.util.List<ObjectSearchResult> getSearchResults(FAQEventQuery eventQuery)
                                                    throws java.lang.Exception
This method should lookup all the categories node so find category have user in moderators and convert to category object and return list of category object

Parameters:
user - is name when user login
sProvider - the session provider
Returns:
Category list
Throws:
java.lang.Exception - the exception

getCategoryPath

java.util.List<java.lang.String> getCategoryPath(java.lang.String categoryId)
                                                 throws java.lang.Exception
This method return path of category identify

Parameters:
category - identify
sProvider - the session provider
Returns:
list category name is sort(path of this category)
Throws:
java.lang.Exception - the exception

sendMessage

void sendMessage(org.exoplatform.services.mail.Message message)
                 throws java.lang.Exception
This method will send message to address but you want send

Parameters:
message - is object save content with user want send to one or many address email
Throws:
java.lang.Exception - the exception

addLanguage

void addLanguage(javax.jcr.Node questionNode,
                 QuestionLanguage language)
                 throws java.lang.Exception
Add language for question node, this function only use for Question node, and language node is added not default.

the first, get this language node if it's existed, opposite add new language node. Then set properties for this node: node's name, question's content and response's content.

Parameters:
questionNode - add language node for this question node
language - The QuestionLanguage object which is add for the question node, language object have some properties: name, question's content and response's content. Property response may be don't need setting value if question not yet answered
Throws:
java.lang.Exception - the exception

getUserSetting

void getUserSetting(java.lang.String userName,
                    FAQSetting faqSetting)
                    throws java.lang.Exception
Get setting of user to view data (categories and questions). At first time user come, system will create setting for user (automatically) base on setting of admin (Default setting of FAQ system). After that, when user login again, his setting is getted.

Parameters:
sProvider - system provider
userName - the name of user
faqSetting - the setting of user
Throws:
java.lang.Exception - when can't find user or faqSetting

getMessageInfo

NotifyInfo getMessageInfo(java.lang.String name)
                          throws java.lang.Exception
Throws:
java.lang.Exception

isAdminRole

boolean isAdminRole(java.lang.String userName)
                    throws java.lang.Exception
Check permission of user

Parameters:
userName - id or user name of user who is checked permission
Returns:
return true if user is addmin and false if opposite
Throws:
java.lang.Exception

getAllFAQAdmin

java.util.List<java.lang.String> getAllFAQAdmin()
                                                throws java.lang.Exception
Get all user is admin.

Throws:
java.lang.Exception - the exception

addRolePlugin

void addRolePlugin(org.exoplatform.container.component.ComponentPlugin plugin)
                   throws java.lang.Exception
Adds the plugin.

Parameters:
plugin - the plugin
Throws:
java.lang.Exception - the exception

addWatchQuestion

void addWatchQuestion(java.lang.String questionId,
                      Watch watch,
                      boolean isNew)
                      throws java.lang.Exception
Throws:
java.lang.Exception

saveTopicIdDiscussQuestion

void saveTopicIdDiscussQuestion(java.lang.String questionId,
                                java.lang.String pathDiscuss)
                                throws java.lang.Exception
Throws:
java.lang.Exception

getListQuestionsWatch

QuestionPageList getListQuestionsWatch(FAQSetting faqSetting,
                                       java.lang.String currentUser)
                                       throws java.lang.Exception
Throws:
java.lang.Exception

getCategoryNodeById

javax.jcr.Node getCategoryNodeById(java.lang.String categoryId)
                                   throws java.lang.Exception
Throws:
java.lang.Exception

importData

boolean importData(java.lang.String categoryId,
                   java.io.InputStream inputStream,
                   boolean isZip)
                   throws java.lang.Exception
Throws:
java.lang.Exception

swapCategories

void swapCategories(java.lang.String cateId1,
                    java.lang.String cateId2)
                    throws java.lang.Exception
Throws:
java.lang.Exception

getMaxindexCategory

long getMaxindexCategory(java.lang.String parentId)
                         throws java.lang.Exception
Throws:
java.lang.Exception

deleteAnswer

void deleteAnswer(java.lang.String questionId,
                  java.lang.String answerId)
                  throws java.lang.Exception
Throws:
java.lang.Exception

deleteComment

void deleteComment(java.lang.String questionId,
                   java.lang.String commentId)
                   throws java.lang.Exception
Throws:
java.lang.Exception

saveAnswer

void saveAnswer(java.lang.String questionId,
                Answer answer,
                boolean isNew)
                throws java.lang.Exception
Throws:
java.lang.Exception

saveComment

void saveComment(java.lang.String questionId,
                 Comment comment,
                 boolean isNew)
                 throws java.lang.Exception
Throws:
java.lang.Exception

getCommentById

Comment getCommentById(java.lang.String questionId,
                       java.lang.String commentId)
                       throws java.lang.Exception
Throws:
java.lang.Exception

getAnswerById

Answer getAnswerById(java.lang.String questionId,
                     java.lang.String answerid)
                     throws java.lang.Exception
Throws:
java.lang.Exception

saveAnswer

void saveAnswer(java.lang.String questionId,
                Answer[] answers)
                throws java.lang.Exception
Throws:
java.lang.Exception

getPageListComment

JCRPageList getPageListComment(java.lang.String questionId)
                               throws java.lang.Exception
Throws:
java.lang.Exception

getPageListAnswer

JCRPageList getPageListAnswer(java.lang.String questionId,
                              java.lang.Boolean isSortByVote)
                              throws java.lang.Exception
Throws:
java.lang.Exception

getWatchedCategoryByUser

QuestionPageList getWatchedCategoryByUser(java.lang.String userId)
                                          throws java.lang.Exception
Throws:
java.lang.Exception

getUserAvatar

FileAttachment getUserAvatar(java.lang.String userName)
                             throws java.lang.Exception
Throws:
java.lang.Exception

saveUserAvatar

void saveUserAvatar(java.lang.String userId,
                    FileAttachment fileAttachment)
                    throws java.lang.Exception
Throws:
java.lang.Exception

isUserWatched

boolean isUserWatched(java.lang.String userId,
                      java.lang.String cateId)

setDefaultAvatar

void setDefaultAvatar(java.lang.String userName)
                      throws java.lang.Exception
Throws:
java.lang.Exception

getQuestionsIterator

javax.jcr.NodeIterator getQuestionsIterator()
                                            throws java.lang.Exception
Throws:
java.lang.Exception

getPendingQuestionsByCategory

QuestionPageList getPendingQuestionsByCategory(java.lang.String categoryId,
                                               FAQSetting faqSetting)
                                               throws java.lang.Exception
Throws:
java.lang.Exception

exportData

java.io.InputStream exportData(java.lang.String categoryId,
                               boolean createZipFile)
                               throws java.lang.Exception
Throws:
java.lang.Exception

isExisting

boolean isExisting(java.lang.String path)

getCategoryPathOf

java.lang.String getCategoryPathOf(java.lang.String id)
                                   throws java.lang.Exception
Throws:
java.lang.Exception

getQuestionContents

java.util.List<java.lang.String> getQuestionContents(java.util.List<java.lang.String> paths)
                                                     throws java.lang.Exception
Throws:
java.lang.Exception

isModerateAnswer

boolean isModerateAnswer(java.lang.String id)
                         throws java.lang.Exception
Throws:
java.lang.Exception

getQuestionNodeById

javax.jcr.Node getQuestionNodeById(java.lang.String path)
                                   throws java.lang.Exception
Throws:
java.lang.Exception

getParentCategoriesName

java.lang.String getParentCategoriesName(java.lang.String path)
                                         throws java.lang.Exception
Throws:
java.lang.Exception

getListMailInWatch

QuestionPageList getListMailInWatch(java.lang.String categoryId)
                                    throws java.lang.Exception
Throws:
java.lang.Exception

isCategoryModerator

boolean isCategoryModerator(java.lang.String categoryPath,
                            java.lang.String user)
                            throws java.lang.Exception
Throws:
java.lang.Exception

addLanguage

void addLanguage(java.lang.String questionPath,
                 QuestionLanguage language)
                 throws java.lang.Exception
Throws:
java.lang.Exception

deleteAnswerQuestionLang

void deleteAnswerQuestionLang(java.lang.String questionPath,
                              java.lang.String answerId,
                              java.lang.String language)
                              throws java.lang.Exception
Throws:
java.lang.Exception

deleteCommentQuestionLang

void deleteCommentQuestionLang(java.lang.String questionPath,
                               java.lang.String commentId,
                               java.lang.String language)
                               throws java.lang.Exception
Throws:
java.lang.Exception

getQuestionLanguageByLanguage

QuestionLanguage getQuestionLanguageByLanguage(java.lang.String questionPath,
                                               java.lang.String language)
                                               throws java.lang.Exception
Throws:
java.lang.Exception

getCommentById

Comment getCommentById(java.lang.String questionPath,
                       java.lang.String commentId,
                       java.lang.String language)
                       throws java.lang.Exception
Throws:
java.lang.Exception

getAnswerById

Answer getAnswerById(java.lang.String questionPath,
                     java.lang.String answerid,
                     java.lang.String language)
                     throws java.lang.Exception
Throws:
java.lang.Exception

saveAnswer

void saveAnswer(java.lang.String questionPath,
                Answer answer,
                java.lang.String languge)
                throws java.lang.Exception
Throws:
java.lang.Exception

saveAnswer

void saveAnswer(java.lang.String questionPath,
                QuestionLanguage questionLanguage)
                throws java.lang.Exception
Throws:
java.lang.Exception

saveComment

void saveComment(java.lang.String questionPath,
                 Comment comment,
                 java.lang.String languge)
                 throws java.lang.Exception
Throws:
java.lang.Exception

removeLanguage

void removeLanguage(java.lang.String questionPath,
                    java.util.List<java.lang.String> listLanguage)

voteAnswer

void voteAnswer(java.lang.String answerPath,
                java.lang.String userName,
                boolean isUp)
                throws java.lang.Exception
Throws:
java.lang.Exception

voteQuestion

void voteQuestion(java.lang.String questionPath,
                  java.lang.String userName,
                  int number)
                  throws java.lang.Exception
Throws:
java.lang.Exception

getModeratorsOf

java.lang.String[] getModeratorsOf(java.lang.String path)
                                   throws java.lang.Exception
Throws:
java.lang.Exception

unVoteQuestion

void unVoteQuestion(java.lang.String questionPath,
                    java.lang.String userName)
                    throws java.lang.Exception
Throws:
java.lang.Exception

isViewAuthorInfo

boolean isViewAuthorInfo(java.lang.String id)
                         throws java.lang.Exception
Throws:
java.lang.Exception

existingCategories

long existingCategories()
                        throws java.lang.Exception
Throws:
java.lang.Exception

getCategoryNameOf

java.lang.String getCategoryNameOf(java.lang.String categoryPath)
                                   throws java.lang.Exception
Throws:
java.lang.Exception

getQuickQuestionsByListCatetory

java.util.List<Question> getQuickQuestionsByListCatetory(java.util.List<java.lang.String> listCategoryId,
                                                         boolean isNotYetAnswer)
                                                         throws java.lang.Exception
Throws:
java.lang.Exception

listingCategoryTree

java.util.List<Cate> listingCategoryTree()
                                         throws java.lang.Exception
Throws:
java.lang.Exception

getWatchByCategory

java.util.List<Watch> getWatchByCategory(java.lang.String categoryId)
                                         throws java.lang.Exception
Throws:
java.lang.Exception

hasWatch

boolean hasWatch(java.lang.String categoryPath)

getCategoryInfo

CategoryInfo getCategoryInfo(java.lang.String categoryPath,
                             java.util.List<java.lang.String> categoryIdScoped)
                             throws java.lang.Exception
Throws:
java.lang.Exception

getTemplate

byte[] getTemplate()
                   throws java.lang.Exception
Throws:
java.lang.Exception

saveTemplate

void saveTemplate(java.lang.String str)
                  throws java.lang.Exception
Throws:
java.lang.Exception

updateQuestionRelatives

void updateQuestionRelatives(java.lang.String questionPath,
                             java.lang.String[] relatives)
                             throws java.lang.Exception
Throws:
java.lang.Exception

isCategoryExist

boolean isCategoryExist(java.lang.String name,
                        java.lang.String path)

isModerateQuestion

boolean isModerateQuestion(java.lang.String id)
                           throws java.lang.Exception
Throws:
java.lang.Exception

saveBBCode

void saveBBCode(java.util.List<BBCode> bbcodes)
                throws java.lang.Exception
Throws:
java.lang.Exception

getAllBBCode

java.util.List<BBCode> getAllBBCode()
                                    throws java.lang.Exception
Throws:
java.lang.Exception

getActiveBBCode

java.util.List<java.lang.String> getActiveBBCode()
                                                 throws java.lang.Exception
Throws:
java.lang.Exception

getBBcode

BBCode getBBcode(java.lang.String id)
                 throws java.lang.Exception
Throws:
java.lang.Exception

removeBBCode

void removeBBCode(java.lang.String bbcodeId)
                  throws java.lang.Exception
Throws:
java.lang.Exception


Copyright © 2011 eXo Platform SAS. All Rights Reserved.