public class FAQServiceImpl extends Object implements FAQService, org.picocontainer.Startable
| Modifier and Type | Field and Description |
|---|---|
static int |
CATEGORY |
protected List<AnswerEventListener> |
listeners_ |
static int |
QUESTION |
static int |
SEND_EMAIL |
| Constructor and Description |
|---|
FAQServiceImpl(org.exoplatform.container.xml.InitParams params,
org.exoplatform.forum.common.jcr.KSDataLocation locator,
org.exoplatform.container.configuration.ConfigurationManager configManager) |
| Modifier and Type | Method and Description |
|---|---|
void |
addInitialDataPlugin(InitialDataPlugin plugin)
Adds a plugin which initializes the default FAQ data.
|
void |
addLanguage(javax.jcr.Node questionNode,
QuestionLanguage language)
Adds the language node, when question have multiple language,
each language is a child node of question node.
|
void |
addLanguage(String questionPath,
QuestionLanguage language)
Adds a language to a question.
|
void |
addListenerPlugin(AnswerEventListener listener)
Adds a listener plugin.
|
void |
addPlugin(org.exoplatform.container.component.ComponentPlugin plugin)
Adds a plugin to the list of FAQ plugins.
|
void |
addRolePlugin(org.exoplatform.container.component.ComponentPlugin plugin)
Adds a plugin which defines the "administrator" role.
|
void |
addTemplatePlugin(org.exoplatform.container.component.ComponentPlugin plugin) |
void |
addWatch(String id,
Watch watch,
org.exoplatform.services.jcr.ext.common.SessionProvider sProvider)
This function is used to allow user can watch a category.
|
void |
addWatchCategory(String id,
Watch watch)
Adds a watch to a category.
|
void |
addWatchQuestion(String questionId,
Watch watch,
boolean isNew)
Adds a watch to a question.
|
void |
addWatchQuestion(String questionId,
Watch watch,
boolean isNew,
org.exoplatform.services.jcr.ext.common.SessionProvider sProvider) |
CategoryTree |
buildCategoryTree(String categoryId)
Builds a category tree by its provided Id.
|
void |
calculateDeletedUser(String userName)
Updates information of answers related to a deleted user.
|
void |
changeStatusCategoryView(List<String> listCateIds)
Changes status of a category to "hidden" or "shown".
|
void |
changeStatusCategoryView(List<String> listCateIds,
org.exoplatform.services.jcr.ext.common.SessionProvider sProvider) |
InputStream |
createAnswerRSS(String cateId)
Creates an RSS for a set of answers under a category.
|
void |
deleteAnswer(String questionId,
String answerId)
Removes an answer.
|
void |
deleteAnswer(String questionId,
String answerId,
org.exoplatform.services.jcr.ext.common.SessionProvider sProvider) |
void |
deleteAnswerQuestionLang(String questionPath,
String answerId,
String language)
Deletes an answer's language.
|
void |
deleteCategoryWatch(String categoryId,
String user)
Deletes a watch from a category.
|
void |
deleteComment(String questionId,
String commentId)
Removes a question's comment.
|
void |
deleteComment(String questionId,
String commentId,
org.exoplatform.services.jcr.ext.common.SessionProvider sProvider) |
void |
deleteCommentQuestionLang(String questionPath,
String commentId,
String language,
boolean isPromoted)
Deletes a comment's language.
|
void |
deleteMailInWatch(String categoryId,
org.exoplatform.services.jcr.ext.common.SessionProvider sProvider,
String user)
This function will delete watch in one category
|
long |
existingCategories()
Gets the number of existing categories.
|
InputStream |
exportData(String categoryId,
boolean createZipFile)
Exports a category.
|
String |
getActivityIdForAnswer(String ownerPath,
Answer answer)
Gets information of an answer activity that is used for processing the activity streams.
|
String |
getActivityIdForComment(String ownerPath,
String commentId,
String language)
Get information of a comment activity that is used for processing the activity streams.
|
String |
getActivityIdForQuestion(String ownerPath)
Gets information of a question activity that is used for processing the activity streams.
|
List<Category> |
getAllCategories()
Gets all categories.
|
List<Category> |
getAllCategories(org.exoplatform.services.jcr.ext.common.SessionProvider sProvider)
This method get all the category
|
List<String> |
getAllFAQAdmin()
This method get all admin in FAQ
|
QuestionPageList |
getAllQuestions()
Gets all questions.
|
QuestionPageList |
getAllQuestions(org.exoplatform.services.jcr.ext.common.SessionProvider sProvider)
This method get all the question
and convert to list of question object (QuestionPageList)
|
QuestionPageList |
getAllQuestionsByCatetory(String categoryId,
FAQSetting faqSetting)
Gets all questions of a category by its Id.
|
QuestionPageList |
getAllQuestionsByCatetory(String categoryId,
org.exoplatform.services.jcr.ext.common.SessionProvider sProvider,
FAQSetting faqSetting)
This method get all questions via category identify and convert to list of question list
|
Answer |
getAnswerById(String questionId,
String answerid)
Gets a question's answer.
|
Answer |
getAnswerById(String questionId,
String answerid,
org.exoplatform.services.jcr.ext.common.SessionProvider sProvider) |
Answer |
getAnswerById(String questionPath,
String answerid,
String language)
Gets an answer by its Id.
|
Category |
getCategoryById(String categoryId)
Gets a category by its Id.
|
Category |
getCategoryById(String categoryId,
org.exoplatform.services.jcr.ext.common.SessionProvider sProvider)
Returns an category that can then be get property of this category.
|
long[] |
getCategoryInfo(String categoryId,
FAQSetting setting)
Gets some information of a category by its Id,
including the number of its sub-categories, total of questions,
the number of questions which are unapproved and not yet answered.
|
CategoryInfo |
getCategoryInfo(String categoryPath,
List<String> categoryIdScoped)
Gets information of a category.
|
long[] |
getCategoryInfo(String categoryId,
org.exoplatform.services.jcr.ext.common.SessionProvider sProvider,
FAQSetting setting)
This method get some informations of category:
to count sub-categories, to count questions, to count question have not yet answer,
to count question is not approved are contained in this category
|
String |
getCategoryNameOf(String categoryPath)
Gets a category name.
|
javax.jcr.Node |
getCategoryNodeById(String categoryId)
Gets a category by its Id.
|
javax.jcr.Node |
getCategoryNodeById(String categoryId,
org.exoplatform.services.jcr.ext.common.SessionProvider sProvider) |
List<String> |
getCategoryPath(org.exoplatform.services.jcr.ext.common.SessionProvider sProvider,
String categoryId)
This method return path of category identify
|
List<String> |
getCategoryPath(String categoryId)
Gets paths of a category by its Id.
|
String |
getCategoryPathOf(String id)
Gets a category path by its Id.
|
String |
getCategoryPathOfQuestion(String questionPath)
Gets a question path.
|
String |
getCategoryPathOfQuestion(String questionPath,
org.exoplatform.services.jcr.ext.common.SessionProvider sProvider) |
Comment |
getCommentById(org.exoplatform.services.jcr.ext.common.SessionProvider sProvider,
String questionId,
String commentId) |
Comment |
getCommentById(String questionId,
String commentId)
Gets a question's comment.
|
Comment |
getCommentById(String questionPath,
String commentId,
String language)
Gets a question's comment by the question path and comment Id.
|
Comment[] |
getComments(String questionId)
Gets comments of a question.
|
QuestionPageList |
getListCategoriesWatch(String userId,
org.exoplatform.services.jcr.ext.common.SessionProvider sProvider) |
List<String> |
getListCateIdByModerator(String user)
Get all categories of a given user.
|
List<String> |
getListCateIdByModerator(String user,
org.exoplatform.services.jcr.ext.common.SessionProvider sProvider)
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
|
QuestionPageList |
getListMailInWatch(String categoryId)
Gets email addresses that are watched in a category.
|
QuestionPageList |
getListQuestionsWatch(FAQSetting faqSetting,
String currentUser)
Gets a list of questions watched by a user.
|
QuestionPageList |
getListQuestionsWatch(FAQSetting faqSetting,
String currentUser,
org.exoplatform.services.jcr.ext.common.SessionProvider sProvider) |
long |
getMaxindexCategory(String parentId)
Gets the maximum index of categories.
|
long |
getMaxindexCategory(String parentId,
org.exoplatform.services.jcr.ext.common.SessionProvider sProvider) |
org.exoplatform.forum.common.NotifyInfo |
getMessageInfo(String name)
Gets information of a message.
|
String[] |
getModeratorsOf(String path)
Gets moderators of a question or a category.
|
JCRPageList |
getPageListAnswer(org.exoplatform.services.jcr.ext.common.SessionProvider sProvider,
String questionId,
boolean isSortByVote) |
JCRPageList |
getPageListAnswer(String questionId,
boolean isSortByVote)
Gets answers of a question.
|
JCRPageList |
getPageListComment(org.exoplatform.services.jcr.ext.common.SessionProvider sProvider,
String questionId) |
JCRPageList |
getPageListComment(String questionId)
Gets comments of a question.
|
String |
getParentCategoriesName(String path)
Gets name of a parent category.
|
Iterator<org.exoplatform.forum.common.NotifyInfo> |
getPendingMessages()
This function will send all the pending notification message
|
QuestionPageList |
getPendingQuestionsByCategory(String categoryId,
FAQSetting faqSetting)
Gets a list of pending questions in a category.
|
QuestionPageList |
getPendingQuestionsByCategory(String categoryId,
org.exoplatform.services.jcr.ext.common.SessionProvider sProvider,
FAQSetting faqSetting) |
Question |
getQuestionById(String questionId)
Gets a question by its Id.
|
Question |
getQuestionById(String questionId,
org.exoplatform.services.jcr.ext.common.SessionProvider sProvider)
This method should get question node via identify
|
List<String> |
getQuestionContents(List<String> paths)
Gets titles of questions.
|
QuestionLanguage |
getQuestionLanguageByLanguage(String questionPath,
String language)
Gets a question's language.
|
List<QuestionLanguage> |
getQuestionLanguages(String questionId)
Gets all languages of a question by its Id.
|
List<QuestionLanguage> |
getQuestionLanguages(String questionId,
org.exoplatform.services.jcr.ext.common.SessionProvider sProvider)
This method should lookup languageNode of question
and find all child node of language node
|
javax.jcr.Node |
getQuestionNodeById(String path)
Gets a question by its Id.
|
QuestionPageList |
getQuestionsByCatetory(String categoryId,
FAQSetting faqSetting)
Gets activated and approved questions of a category by its Id.
|
QuestionPageList |
getQuestionsByCatetory(String categoryId,
org.exoplatform.services.jcr.ext.common.SessionProvider sProvider,
FAQSetting faqSetting)
This method should view questions, only question node is activated and approved via category identify
and convert to list of question object
|
QuestionPageList |
getQuestionsByListCatetory(List<String> listCategoryId,
boolean isNotYetAnswer)
Gets all questions from a list of categories by its Id.
|
QuestionPageList |
getQuestionsByListCatetory(List<String> listCategoryId,
boolean isNotYetAnswer,
org.exoplatform.services.jcr.ext.common.SessionProvider sProvider)
This method every category should get list question, all question convert to list of question object
|
QuestionPageList |
getQuestionsNotYetAnswer(org.exoplatform.services.jcr.ext.common.SessionProvider sProvider,
String categoryId,
FAQSetting setting)
This method get all question node have not yet answer
and convert to list of question object (QuestionPageList)
|
QuestionPageList |
getQuestionsNotYetAnswer(String categoryId,
boolean isApproved)
Gets all questions which are not yet answered.
|
List<Question> |
getQuickQuestionsByListCatetory(List<String> listCategoryId,
boolean isNotYetAnswer)
Gets quick questions from a list of categories.
|
Map<String,String> |
getRelationQuestion(List<String> paths)
Gets titles of questions, then maps them to their paths.
|
List<ObjectSearchResult> |
getSearchResults(FAQEventQuery eventQuery)
This method will return list question when user input value search
|
List<Category> |
getSubCategories(String categoryPath,
FAQSetting faqSetting,
List<String> userView)
Gets all sub-categories of a category.
|
List<Category> |
getSubCategories(String categoryPath,
org.exoplatform.services.jcr.ext.common.SessionProvider sProvider,
FAQSetting faqSetting,
List<String> userView)
Returns an list category that can then be view on the screen.
|
byte[] |
getTemplate()
Gets a question's template.
|
FileAttachment |
getUserAvatar(String userName)
Gets a user's avatar.
|
FileAttachment |
getUserAvatar(String userName,
org.exoplatform.services.jcr.ext.common.SessionProvider sProvider) |
void |
getUserSetting(org.exoplatform.services.jcr.ext.common.SessionProvider sProvider,
String userName,
FAQSetting faqSetting) |
void |
getUserSetting(String userName,
FAQSetting faqSetting)
Gets settings of a user that are used for displaying categories and questions.
|
List<Watch> |
getWatchByCategory(String categoryId)
Gets a list of watches in a category.
|
boolean |
getWatchByUser(String userId,
String cateId,
org.exoplatform.services.jcr.ext.common.SessionProvider sProvider) |
QuestionPageList |
getWatchedCategoryByUser(String userId)
Gets a list of questions watched by a user.
|
boolean |
hasWatch(String categoryPath)
Checks if a category has been watched or not.
|
boolean |
importData(String categoryId,
InputStream inputStream,
boolean isZip)
Imports data to a category.
|
void |
importData(String categoryId,
javax.jcr.Session session,
InputStream inputStream,
boolean isZip,
org.exoplatform.services.jcr.ext.common.SessionProvider sProvider) |
boolean |
isAdminRole(String userName)
Checks if a user is administrator or not.
|
boolean |
isAdminRole(String userName,
org.exoplatform.services.jcr.ext.common.SessionProvider sProvider) |
boolean |
isCategoryExist(String name,
String path)
Checks if a category exists or not.
|
boolean |
isCategoryModerator(String categoryId,
String user)
Checks if a user is moderator of a category or not.
|
boolean |
isExisting(String path)
Checks if a path exists or not.
|
boolean |
isModerateAnswer(String id)
Checks if moderation is applied to answers of a category or not.
|
boolean |
isModerateQuestion(String id)
Checks if moderation is applied to a question or not.
|
boolean |
isUserWatched(String userId,
String cateId)
Checks if a user is watching a category or not.
|
boolean |
isViewAuthorInfo(String id)
Checks if the author information is displayed or not.
|
List<Cate> |
listingCategoryTree()
Gets a list of categories.
|
void |
moveCategory(String categoryId,
String destCategoryId)
Moves a category to another one.
|
void |
moveCategory(String categoryId,
String destCategoryId,
org.exoplatform.services.jcr.ext.common.SessionProvider sProvider)
Move one category in list to another plate in project.
|
void |
moveQuestions(List<String> questions,
String destCategoryId,
org.exoplatform.services.jcr.ext.common.SessionProvider sProvider)
This method should lookup questions via question identify and from category identify
so lookup destination category and move questions to destination category
|
void |
moveQuestions(List<String> questions,
String destCategoryId,
String questionLink,
FAQSetting faqSetting)
Moves questions to a category.
|
Object |
readCategoryProperty(String categoryId,
String propertyName,
Class returnType)
Reads a category property by its name.
|
Object |
readQuestionProperty(String questionId,
String propertyName,
Class returnType)
Reads a question property by its name.
|
void |
reCalculateLastActivityOfQuestion(String absPathOfProp)
Deprecated.
: not public anymore
|
void |
removeCategory(String categoryId)
Removes a specific category by its provided Id.
|
void |
removeCategory(String categoryId,
org.exoplatform.services.jcr.ext.common.SessionProvider sProvider)
Remove one category in list
|
void |
removeLanguage(String questionPath,
List<String> listLanguage)
Removes languages from a question.
|
void |
removeListenerPlugin(AnswerEventListener listener)
Removes a listener plugin.
|
void |
removeQuestion(String questionId)
Deletes a question by its Id.
|
void |
removeQuestion(String questionId,
org.exoplatform.services.jcr.ext.common.SessionProvider sProvider)
Remove one question in list
|
void |
saveActivityIdForAnswer(String ownerPath,
Answer answer,
String activityId)
Saves information of an answer activity that is used for processing the activity streams.
|
void |
saveActivityIdForComment(String ownerPath,
String commentId,
String language,
String activityId)
Saves information of a comment activity that is used for processing the activity streams.
|
void |
saveActivityIdForQuestion(String ownerPath,
String activityId)
Saves information of a question activity that is used for processing the activity streams.
|
void |
saveAnswer(String questionId,
Answer[] answers,
FAQSetting faqSetting)
Saves answers.
|
void |
saveAnswer(String questionId,
Answer[] answers,
org.exoplatform.services.jcr.ext.common.SessionProvider sProvider)
Deprecated.
|
void |
saveAnswer(String questionId,
Answer answer,
boolean isNew)
Saves an answer.
|
void |
saveAnswer(String questionId,
Answer answer,
boolean isNew,
org.exoplatform.services.jcr.ext.common.SessionProvider sProvider) |
void |
saveAnswer(String questionPath,
Answer answer,
String language)
Saves an answer.
|
void |
saveAnswer(String questionPath,
QuestionLanguage questionLanguage)
Saves an answer.
|
void |
saveCategory(String parentId,
Category cat,
boolean isAddNew)
Checks if a category exists or not.
|
void |
saveCategory(String parentId,
Category cat,
boolean isAddNew,
org.exoplatform.services.jcr.ext.common.SessionProvider sProvider)
Add new or edit category in list.
|
void |
saveComment(String questionId,
Comment comment,
boolean isNew)
Saves a question's comment.
|
void |
saveComment(String questionId,
Comment comment,
boolean isNew,
org.exoplatform.services.jcr.ext.common.SessionProvider sProvider) |
void |
saveComment(String questionPath,
Comment comment,
String language)
Saves a question's comment.
|
void |
saveFAQSetting(FAQSetting faqSetting,
String userName)
Updates the settings information of FAQ.
|
void |
saveFAQSetting(FAQSetting faqSetting,
String userName,
org.exoplatform.services.jcr.ext.common.SessionProvider sProvider)
This function is used to set some properties of FAQ.
|
javax.jcr.Node |
saveQuestion(Question question,
boolean isAddNew,
FAQSetting faqSetting)
Saves information for a question which is added or updated.
|
javax.jcr.Node |
saveQuestion(Question question,
boolean isAddNew,
org.exoplatform.services.jcr.ext.common.SessionProvider sProvider,
FAQSetting faqSetting)
This method should create new question or update exists question
|
void |
saveTemplate(String str)
Saves a template.
|
void |
saveTopicIdDiscussQuestion(String questionId,
String pathDiscuss)
Saves a topic.
|
void |
saveTopicIdDiscussQuestion(String questionId,
String pathDiscuss,
org.exoplatform.services.jcr.ext.common.SessionProvider sProvider) |
void |
saveUserAvatar(String userId,
FileAttachment fileAttachment)
Saves an avatar of the user.
|
void |
saveUserAvatar(String userId,
FileAttachment fileAttachment,
org.exoplatform.services.jcr.ext.common.SessionProvider sProvider) |
void |
setDefaultAvatar(String userName)
Sets a default avatar for a user.
|
void |
setDefaultAvatar(String userName,
org.exoplatform.services.jcr.ext.common.SessionProvider sProvider) |
void |
start() |
void |
stop() |
void |
swapCategories(String cateId1,
String cateId2)
Swaps two categories.
|
void |
swapCategories(String parentCateId,
String cateId1,
String cateId2,
org.exoplatform.services.jcr.ext.common.SessionProvider sProvider) |
void |
unVoteQuestion(String questionPath,
String userName)
Removes a vote from a question.
|
void |
UnWatch(String categoryId,
org.exoplatform.services.jcr.ext.common.SessionProvider sProvider,
String userCurrent)
This function will un watch in one category
|
void |
unWatchCategory(String categoryId,
String userCurrent)
Unwatches a category.
|
void |
UnWatchQuestion(String questionID,
org.exoplatform.services.jcr.ext.common.SessionProvider sProvider,
String userCurrent)
This function will un watch in one category
|
void |
unWatchQuestion(String questionID,
String userCurrent)
Unwatches a question.
|
void |
updateQuestionRelatives(String questionPath,
String[] relatives)
Updates relatives of a question.
|
void |
voteAnswer(String answerPath,
String userName,
boolean isUp)
Votes for an answer.
|
void |
voteQuestion(String questionPath,
String userName,
int number)
Votes for a question.
|
public static final int CATEGORY
public static final int QUESTION
public static final int SEND_EMAIL
protected List<AnswerEventListener> listeners_
public void addPlugin(org.exoplatform.container.component.ComponentPlugin plugin)
throws Exception
FAQServiceaddPlugin in interface FAQServiceplugin - The plugin to be added.Exception - the exceptionpublic void addRolePlugin(org.exoplatform.container.component.ComponentPlugin plugin)
throws Exception
FAQServiceaddRolePlugin in interface FAQServiceplugin - The plugin to be added.Exception - the exceptionpublic void addInitialDataPlugin(InitialDataPlugin plugin) throws Exception
FAQServiceaddInitialDataPlugin in interface FAQServiceplugin - The plugin to be added.Exceptionpublic void addTemplatePlugin(org.exoplatform.container.component.ComponentPlugin plugin)
throws Exception
Exceptionpublic void start()
start in interface org.picocontainer.Startablepublic void stop()
stop in interface org.picocontainer.Startablepublic List<String> getAllFAQAdmin() throws Exception
getAllFAQAdmin in interface FAQServiceException - the exceptionpublic List<Category> getAllCategories(org.exoplatform.services.jcr.ext.common.SessionProvider sProvider) throws Exception
sProvider - is session providerException - the exceptionpublic List<Category> getAllCategories() throws Exception
FAQServicegetAllCategories in interface FAQServiceException - the exceptionpublic QuestionPageList getAllQuestions(org.exoplatform.services.jcr.ext.common.SessionProvider sProvider) throws Exception
sProvider - Exception - the exceptionpublic QuestionPageList getAllQuestions() throws Exception
FAQServicegetAllQuestions in interface FAQServiceException - if the attachment is not found.public QuestionPageList getQuestionsNotYetAnswer(org.exoplatform.services.jcr.ext.common.SessionProvider sProvider, String categoryId, FAQSetting setting) throws Exception
sProvider - Exception - the exceptionpublic QuestionPageList getQuestionsNotYetAnswer(String categoryId, boolean isApproved) throws Exception
FAQServicegetQuestionsNotYetAnswer in interface FAQServicecategoryId - Id of the category which contains unanswered questions.isApproved - If "true", only approved questions are got.Exception - if the attachment is lost.public long[] getCategoryInfo(String categoryId, org.exoplatform.services.jcr.ext.common.SessionProvider sProvider, FAQSetting setting) throws Exception
categoryId - sProvider - Exception - the exceptionpublic long[] getCategoryInfo(String categoryId, FAQSetting setting) throws Exception
FAQServicegetCategoryInfo in interface FAQServicecategoryId - Id of the category.setting - Settings of FAQ.Exception - if the category or question is not found by its Id, or the attached file is lost.public Category getCategoryById(String categoryId, org.exoplatform.services.jcr.ext.common.SessionProvider sProvider) throws Exception
categoryId - is address id of the category so you want getsProvider - Exception - the exceptionpublic Category getCategoryById(String categoryId) throws Exception
FAQServicegetCategoryById in interface FAQServicecategoryId - Id of the category.Exception - the exceptionpublic Question getQuestionById(String questionId, org.exoplatform.services.jcr.ext.common.SessionProvider sProvider) throws Exception
questionId - Question identifiersProvider - Exception - the exceptionpublic Comment[] getComments(String questionId) throws Exception
FAQServicegetComments in interface FAQServicequestionId - Id of the question.Exceptionpublic Question getQuestionById(String questionId) throws Exception
FAQServicegetQuestionById in interface FAQServicequestionId - Id of the questionException - the exceptionpublic QuestionPageList getQuestionsByCatetory(String categoryId, org.exoplatform.services.jcr.ext.common.SessionProvider sProvider, FAQSetting faqSetting) throws Exception
categoryId - Category identifiersProvider - Exception - the exceptionpublic QuestionPageList getQuestionsByCatetory(String categoryId, FAQSetting faqSetting) throws Exception
FAQServicegetQuestionsByCatetory in interface FAQServicecategoryId - Id of the category.faqSetting - Settings of FAQ.Exception - if the category is not found.public QuestionPageList getAllQuestionsByCatetory(String categoryId, org.exoplatform.services.jcr.ext.common.SessionProvider sProvider, FAQSetting faqSetting) throws Exception
categoryId - Category identifiersProvider - Exception - the exceptionpublic QuestionPageList getAllQuestionsByCatetory(String categoryId, FAQSetting faqSetting) throws Exception
FAQServicegetAllQuestionsByCatetory in interface FAQServicecategoryId - Id of the category.faqSetting - Settings of FAQ.Exception - when the category is not found.public QuestionPageList getQuestionsByListCatetory(List<String> listCategoryId, boolean isNotYetAnswer, org.exoplatform.services.jcr.ext.common.SessionProvider sProvider) throws Exception
listCategoryId - is list via identifyisNotYetAnswer - if isNotYetAnswer equal true then return list question is not yet answer
isNotYetAnswer if isNotYetAnswer equal false then return list all questionssProvider - Exception - the exceptionpublic QuestionPageList getQuestionsByListCatetory(List<String> listCategoryId, boolean isNotYetAnswer) throws Exception
FAQServicegetQuestionsByListCatetory in interface FAQServicelistCategoryId - Id of the categories list.isNotYetAnswer - If "true", all questions which are not yet answered are got.
If "false", all questions are got.Exception - the exceptionpublic String getCategoryPathOfQuestion(String questionPath, org.exoplatform.services.jcr.ext.common.SessionProvider sProvider) throws Exception
Exceptionpublic String getCategoryPathOfQuestion(String questionPath) throws Exception
FAQServicegetCategoryPathOfQuestion in interface FAQServicequestionPath - Id of the category containing the question.Exceptionpublic List<QuestionLanguage> getQuestionLanguages(String questionId, org.exoplatform.services.jcr.ext.common.SessionProvider sProvider) throws Exception
questionId - Question identifiersProvider - Exception - the exceptionpublic List<QuestionLanguage> getQuestionLanguages(String questionId)
FAQServicegetQuestionLanguages in interface FAQServicequestionId - Id of the question.public List<Category> getSubCategories(String categoryPath, org.exoplatform.services.jcr.ext.common.SessionProvider sProvider, FAQSetting faqSetting, List<String> userView) throws Exception
This method always returns immediately, this view list category in screen. if categoryId equal null then list category is list parent category else this view list category of one value parent category that you communicate categoryId
categoryPath - is address id of the categorysProvider - Exception - the exceptioncategorypublic List<Category> getSubCategories(String categoryPath, FAQSetting faqSetting, List<String> userView) throws Exception
FAQServicegetSubCategories in interface FAQServicecategoryPath - Path of the category.faqSetting - Settings of FAQ.userView - Users who have the view permission on sub-categories of a category.Exception - the exceptionpublic void moveQuestions(List<String> questions, String destCategoryId, org.exoplatform.services.jcr.ext.common.SessionProvider sProvider) throws Exception
questions - Question identifier listdestCategoryId - category identifiersProvider - Exception - the exceptionpublic void moveQuestions(List<String> questions, String destCategoryId, String questionLink, FAQSetting faqSetting) throws Exception
FAQServicemoveQuestions in interface FAQServicequestions - The questions to be moved.destCategoryId - Id of the destination category.questionLink - URL of the question.faqSetting - Settings of FAQ.Exception - the exceptionpublic void removeCategory(String categoryId, org.exoplatform.services.jcr.ext.common.SessionProvider sProvider) throws Exception
This function is used to remove one category in list
categoryId - is address id of the category need removesProvider - Exception - the exceptionpublic void removeCategory(String categoryId) throws Exception
FAQServiceremoveCategory in interface FAQServicecategoryId - Id of the category which is removed.Exception - the exceptionpublic void removeQuestion(String questionId, org.exoplatform.services.jcr.ext.common.SessionProvider sProvider) throws Exception
This function is used to remove one question in list
questionId - question identifiersProvider - Exception - the exceptionpublic void removeQuestion(String questionId) throws Exception
FAQServiceremoveQuestion in interface FAQServicequestionId - Id of the question which is deleted.Exception - if the question is not found.public void saveCategory(String parentId, Category cat, boolean isAddNew, org.exoplatform.services.jcr.ext.common.SessionProvider sProvider) throws Exception
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
parentId - is address id of the category parent where user want add sub category
when paretId equal null so this category is parent category else sub categorycat - is properties that user input to interface will save on dataisAddNew - is true when add new category else update categorysProvider - Exception - the exceptioncategorypublic void saveCategory(String parentId, Category cat, boolean isAddNew)
FAQServiceThis function is used to add new or update the category. The user will input information into required fields of the Add Category form, then save the category into database.
saveCategory in interface FAQServiceparentId - The address Id of the parent category where the user wants to add a sub-category.
When paretId is "null", this category does not contain any sub-categories.cat - The category information provided by the user.isAddNew - If "true", the new category is added. If "false", the category is updated.categorypublic CategoryTree buildCategoryTree(String categoryId) throws Exception
FAQServicebuildCategoryTree in interface FAQServicecategoryId - Id of the category.Exceptionpublic void changeStatusCategoryView(List<String> listCateIds, org.exoplatform.services.jcr.ext.common.SessionProvider sProvider) throws Exception
Exceptionpublic void changeStatusCategoryView(List<String> listCateIds) throws Exception
FAQServicechangeStatusCategoryView in interface FAQServicelistCateIds - Ids of a category which is changed.Exception - the exceptionpublic javax.jcr.Node saveQuestion(Question question, boolean isAddNew, org.exoplatform.services.jcr.ext.common.SessionProvider sProvider, FAQSetting faqSetting) throws Exception
question - is information but user input or edit to form interface of questionisAddNew - equal true then add new question
isAddNew equal false then update questionsProvider - Exceptionpublic javax.jcr.Node saveQuestion(Question question, boolean isAddNew, FAQSetting faqSetting) throws Exception
FAQServicesaveQuestion in interface FAQServicequestion - The question to be added or updated.isAddNew - If "true", the new question node is added. If "false", the question is updated.faqSetting - Settings of FAQ.Exception - if the question node's path is not found.public void saveFAQSetting(FAQSetting faqSetting, String userName, org.exoplatform.services.jcr.ext.common.SessionProvider sProvider) throws Exception
This function is used(Users of FAQ Administrator) choose some properties in object FAQSetting
faqSetting - is properties of object FAQSetting that user input to interface will save on datauserName - sProvider - Exception - the exceptionpublic void saveFAQSetting(FAQSetting faqSetting, String userName) throws Exception
FAQServicesaveFAQSetting in interface FAQServicefaqSetting - Settings of FAQ.userName - Name of the user for whom the FAQ settings are updated.Exception - the exceptionpublic void moveCategory(String categoryId, String destCategoryId, org.exoplatform.services.jcr.ext.common.SessionProvider sProvider) throws Exception
This function is used to move category in list. User will right click on category need move, so user choose in list category one another category want to put
categoryId - is address id of the category that user want platedestCategoryId - is address id of the category that user want put( destination )sProvider - Exception - the exceptionpublic void moveCategory(String categoryId, String destCategoryId) throws Exception
FAQServicemoveCategory in interface FAQServicecategoryId - Id of the category which is moved.destCategoryId - Id of the destination category.Exception - the exceptionpublic void addWatch(String id, Watch watch, org.exoplatform.services.jcr.ext.common.SessionProvider sProvider) throws Exception
id - of category with user want add watch on that categorywatch, - this address email (multiple value) with input to interface will save on datasProvider - Exception - the exceptionpublic void addWatchCategory(String id, Watch watch) throws Exception
FAQServiceaddWatchCategory in interface FAQServiceid - Id of the category which is watched.watch - The user who watches the category.Exception - the exceptionpublic void deleteMailInWatch(String categoryId, org.exoplatform.services.jcr.ext.common.SessionProvider sProvider, String user) throws Exception
categoryId - is id of current categorysProvider - user - is location current of one watch with user want deleteException - the exceptionpublic void deleteCategoryWatch(String categoryId, String user) throws Exception
FAQServicedeleteCategoryWatch in interface FAQServicecategoryId - Id of the category.user - The user whose watch is removed by himself or someone else.Exception - the exceptionpublic void UnWatch(String categoryId, org.exoplatform.services.jcr.ext.common.SessionProvider sProvider, String userCurrent) throws Exception
categoryId - is id of current categorysProvider - userCurrent - is location current of one watch with user want deleteException - the exceptionpublic void unWatchCategory(String categoryId, String userCurrent) throws Exception
FAQServiceunWatchCategory in interface FAQServicecategoryId - Id of the category which is unwatched.userCurrent - The user whose watch is removed by himself or someone else.Exception - the exceptionpublic void UnWatchQuestion(String questionID, org.exoplatform.services.jcr.ext.common.SessionProvider sProvider, String userCurrent) throws Exception
questionID - is id of current questionsProvider - userCurrent - is location current of one watch with user want deleteException - the exceptionpublic void unWatchQuestion(String questionID, String userCurrent) throws Exception
FAQServiceunWatchQuestion in interface FAQServicequestionID - Id of the question which is unwatched.userCurrent - The user whose watch is removed by himself or someone else.Exception - the exceptionpublic List<String> getListCateIdByModerator(String user, org.exoplatform.services.jcr.ext.common.SessionProvider sProvider) throws Exception
user - is name when user loginsProvider - Exception - the exceptionpublic List<String> getListCateIdByModerator(String user) throws Exception
FAQServicegetListCateIdByModerator in interface FAQServiceuser - Name of the user.Exception - if the given user is not found.public List<ObjectSearchResult> getSearchResults(FAQEventQuery eventQuery) throws Exception
With many questions , it's difficult to find a question which user want to see. So to support to users can find their questions more quickly and accurate, user can use 'Search Question' function
getSearchResults in interface FAQServiceeventQuery - is object save value in form advanced searchException - the exceptionpublic List<String> getCategoryPath(org.exoplatform.services.jcr.ext.common.SessionProvider sProvider, String categoryId) throws Exception
sProvider - categoryId - category identifierException - the exceptionpublic List<String> getCategoryPath(String categoryId) throws Exception
FAQServicegetCategoryPath in interface FAQServicecategoryId - Id of the category.Exception - the exceptionpublic Iterator<org.exoplatform.forum.common.NotifyInfo> getPendingMessages()
getPendingMessages in interface FAQServicepublic void addLanguage(javax.jcr.Node questionNode,
QuestionLanguage language)
throws Exception
addLanguage in interface FAQServicequestionNode - the question node which have multiple languagelanguage - the language which is added in to questionNodeException - throw an exception when save a new language nodepublic void getUserSetting(org.exoplatform.services.jcr.ext.common.SessionProvider sProvider,
String userName,
FAQSetting faqSetting)
throws Exception
Exceptionpublic void getUserSetting(String userName, FAQSetting faqSetting) throws Exception
FAQServicegetUserSetting in interface FAQServiceuserName - Name of the user.faqSetting - Settings of FAQ.Exception - when the user or FAQ settings is/are not found.public org.exoplatform.forum.common.NotifyInfo getMessageInfo(String name) throws Exception
FAQServicegetMessageInfo in interface FAQServicename - Key to get the message.Exceptionpublic boolean isAdminRole(String userName, org.exoplatform.services.jcr.ext.common.SessionProvider sProvider) throws Exception
Exceptionpublic boolean isAdminRole(String userName) throws Exception
FAQServiceisAdminRole in interface FAQServiceuserName - Name of the checked user.Exceptionpublic javax.jcr.Node getCategoryNodeById(String categoryId, org.exoplatform.services.jcr.ext.common.SessionProvider sProvider) throws Exception
Exceptionpublic javax.jcr.Node getCategoryNodeById(String categoryId) throws Exception
FAQServicegetCategoryNodeById in interface FAQServicecategoryId - Id of the category.Exceptionpublic void addWatchQuestion(String questionId, Watch watch, boolean isNew, org.exoplatform.services.jcr.ext.common.SessionProvider sProvider) throws Exception
Exceptionpublic void addWatchQuestion(String questionId, Watch watch, boolean isNew) throws Exception
FAQServiceaddWatchQuestion in interface FAQServicequestionId - Id of the question.watch - Information of the user who watches the question.isNew - If "true", a new watch is added. If "false", the watch is edited.Exceptionpublic QuestionPageList getListQuestionsWatch(FAQSetting faqSetting, String currentUser, org.exoplatform.services.jcr.ext.common.SessionProvider sProvider) throws Exception
Exceptionpublic QuestionPageList getListQuestionsWatch(FAQSetting faqSetting, String currentUser) throws Exception
FAQServicegetListQuestionsWatch in interface FAQServicefaqSetting - Settings of FAQ.currentUser - Name of the user who watches questions.Exceptionpublic void importData(String categoryId, javax.jcr.Session session, InputStream inputStream, boolean isZip, org.exoplatform.services.jcr.ext.common.SessionProvider sProvider) throws Exception
Exceptionpublic boolean importData(String categoryId, InputStream inputStream, boolean isZip) throws Exception
FAQServiceimportData in interface FAQServicecategoryId - Id of the category.inputStream - The data.isZip - Data is zip-typed or not.Exceptionpublic InputStream exportData(String categoryId, boolean createZipFile) throws Exception
FAQServiceexportData in interface FAQServicecategoryId - Id of the exported category.createZipFile - The category is exported into a zip file or not.Exceptionpublic void swapCategories(String parentCateId, String cateId1, String cateId2, org.exoplatform.services.jcr.ext.common.SessionProvider sProvider) throws Exception
Exceptionpublic void swapCategories(String cateId1, String cateId2) throws Exception
FAQServiceswapCategories in interface FAQServicecateId1 - Id of the Category 1.cateId2 - Id of the Category 2.Exceptionpublic void saveTopicIdDiscussQuestion(String questionId, String pathDiscuss, org.exoplatform.services.jcr.ext.common.SessionProvider sProvider) throws Exception
Exceptionpublic void saveTopicIdDiscussQuestion(String questionId, String pathDiscuss) throws Exception
FAQServicesaveTopicIdDiscussQuestion in interface FAQServicequestionId - Id of the question which is discussed in the topic.pathDiscuss - Path to the discussion.Exceptionpublic long getMaxindexCategory(String parentId, org.exoplatform.services.jcr.ext.common.SessionProvider sProvider) throws Exception
Exceptionpublic long getMaxindexCategory(String parentId) throws Exception
FAQServicegetMaxindexCategory in interface FAQServiceparentId - Id of the parent category.Exceptionpublic void deleteAnswer(String questionId, String answerId, org.exoplatform.services.jcr.ext.common.SessionProvider sProvider) throws Exception
Exceptionpublic void deleteAnswer(String questionId, String answerId) throws Exception
FAQServicedeleteAnswer in interface FAQServicequestionId - Id of the question whose answer is removed.answerId - Id of the answer.Exceptionpublic void deleteComment(String questionId, String commentId, org.exoplatform.services.jcr.ext.common.SessionProvider sProvider) throws Exception
Exceptionpublic void deleteComment(String questionId, String commentId) throws Exception
FAQServicedeleteComment in interface FAQServicequestionId - Id of the question whose comment is removed.commentId - Id of the comment.Exceptionpublic void saveAnswer(String questionId, Answer answer, boolean isNew, org.exoplatform.services.jcr.ext.common.SessionProvider sProvider) throws Exception
Exceptionpublic void saveAnswer(String questionId, Answer answer, boolean isNew) throws Exception
FAQServicesaveAnswer in interface FAQServicequestionId - Id of the question.answer - The answer to be saved.isNew - If "true", the new answer is added. If "false", the answer is updated.Exceptionpublic void saveComment(String questionId, Comment comment, boolean isNew, org.exoplatform.services.jcr.ext.common.SessionProvider sProvider) throws Exception
Exceptionpublic void saveComment(String questionId, Comment comment, boolean isNew) throws Exception
FAQServicesaveComment in interface FAQServicequestionId - Id of the question.comment - The saved comment.isNew - If "true", the new answer is added. If "false", the answer is updated.Exceptionpublic Comment getCommentById(org.exoplatform.services.jcr.ext.common.SessionProvider sProvider, String questionId, String commentId) throws Exception
Exceptionpublic Comment getCommentById(String questionId, String commentId) throws Exception
FAQServicegetCommentById in interface FAQServicequestionId - Id of the question.commentId - Id of the comment.Exceptionpublic Answer getAnswerById(String questionId, String answerid, org.exoplatform.services.jcr.ext.common.SessionProvider sProvider) throws Exception
Exceptionpublic Answer getAnswerById(String questionId, String answerid) throws Exception
FAQServicegetAnswerById in interface FAQServicequestionId - Id of the question.answerid - Id of the answer.Exceptionpublic void saveAnswer(String questionId, Answer[] answers, org.exoplatform.services.jcr.ext.common.SessionProvider sProvider) throws Exception
saveAnswer(String, Answer, boolean)Exceptionpublic void saveAnswer(String questionId, Answer[] answers, FAQSetting faqSetting) throws Exception
FAQServicesaveAnswer in interface FAQServicequestionId - Id of the question which contains the saved answers.answers - The saved answers.Exceptionpublic JCRPageList getPageListAnswer(org.exoplatform.services.jcr.ext.common.SessionProvider sProvider, String questionId, boolean isSortByVote) throws Exception
Exceptionpublic JCRPageList getPageListAnswer(String questionId, boolean isSortByVote) throws Exception
FAQServicegetPageListAnswer in interface FAQServicequestionId - Id of the question.isSortByVote - If "true", the returned answers will be sorted by vote.Exceptionpublic JCRPageList getPageListComment(org.exoplatform.services.jcr.ext.common.SessionProvider sProvider, String questionId) throws Exception
Exceptionpublic JCRPageList getPageListComment(String questionId) throws Exception
FAQServicegetPageListComment in interface FAQServicequestionId - Id of the question.Exceptionpublic QuestionPageList getListCategoriesWatch(String userId, org.exoplatform.services.jcr.ext.common.SessionProvider sProvider) throws Exception
Exceptionpublic QuestionPageList getWatchedCategoryByUser(String userId) throws Exception
FAQServicegetWatchedCategoryByUser in interface FAQServiceuserId - Name of the user who watches questions.Exceptionpublic FileAttachment getUserAvatar(String userName, org.exoplatform.services.jcr.ext.common.SessionProvider sProvider) throws Exception
Exceptionpublic FileAttachment getUserAvatar(String userName) throws Exception
FAQServicegetUserAvatar in interface FAQServiceuserName - Name of the user.Exceptionpublic void saveUserAvatar(String userId, FileAttachment fileAttachment, org.exoplatform.services.jcr.ext.common.SessionProvider sProvider) throws Exception
Exceptionpublic void saveUserAvatar(String userId, FileAttachment fileAttachment) throws Exception
FAQServicesaveUserAvatar in interface FAQServiceuserId - Name of the user.fileAttachment - Avatar of the user.Exceptionpublic void setDefaultAvatar(String userName, org.exoplatform.services.jcr.ext.common.SessionProvider sProvider) throws Exception
Exceptionpublic void setDefaultAvatar(String userName) throws Exception
FAQServicesetDefaultAvatar in interface FAQServiceuserName - Name of the user.Exceptionpublic boolean getWatchByUser(String userId, String cateId, org.exoplatform.services.jcr.ext.common.SessionProvider sProvider) throws Exception
Exceptionpublic boolean isUserWatched(String userId, String cateId)
FAQServiceisUserWatched in interface FAQServiceuserId - Name of the user.cateId - Id of the category.public QuestionPageList getPendingQuestionsByCategory(String categoryId, org.exoplatform.services.jcr.ext.common.SessionProvider sProvider, FAQSetting faqSetting) throws Exception
Exceptionpublic QuestionPageList getPendingQuestionsByCategory(String categoryId, FAQSetting faqSetting) throws Exception
FAQServicegetPendingQuestionsByCategory in interface FAQServicecategoryId - Id of the category.faqSetting - Settings of FAQ.Exceptionpublic boolean isExisting(String path) throws Exception
FAQServiceisExisting in interface FAQServicepath - The path to be checked.Exceptionpublic String getCategoryPathOf(String id) throws Exception
FAQServicegetCategoryPathOf in interface FAQServiceid - Id of the category.Exceptionpublic List<String> getQuestionContents(List<String> paths) throws Exception
FAQServicegetQuestionContents in interface FAQServicepaths - Paths to the questions.Exceptionpublic Map<String,String> getRelationQuestion(List<String> paths) throws Exception
FAQServicegetRelationQuestion in interface FAQServicepaths - Paths to the questions.Exceptionpublic javax.jcr.Node getQuestionNodeById(String path) throws Exception
FAQServicegetQuestionNodeById in interface FAQServicepath - Path to the question.Exceptionpublic boolean isModerateAnswer(String id) throws Exception
FAQServiceisModerateAnswer in interface FAQServiceid - Id of the category.Exceptionpublic boolean isModerateQuestion(String id) throws Exception
FAQServiceisModerateQuestion in interface FAQServiceid - Id of the question.Exceptionpublic String getParentCategoriesName(String path) throws Exception
FAQServicegetParentCategoriesName in interface FAQServicepath - Path to the parent category.Exceptionpublic QuestionPageList getListMailInWatch(String categoryId) throws Exception
FAQServicegetListMailInWatch in interface FAQServicecategoryId - Id of the category.Exceptionpublic boolean isCategoryModerator(String categoryId, String user) throws Exception
FAQServiceisCategoryModerator in interface FAQServicecategoryId - Id of the category.user - Name of the user.Exceptionpublic void addLanguage(String questionPath, QuestionLanguage language) throws Exception
FAQServiceaddLanguage in interface FAQServicequestionPath - Path to the question.language - Information of the added language.Exceptionpublic void deleteAnswerQuestionLang(String questionPath, String answerId, String language) throws Exception
FAQServicedeleteAnswerQuestionLang in interface FAQServicequestionPath - Path to the question.answerId - Id of the answer.language - The language to be deleted.Exceptionpublic void deleteCommentQuestionLang(String questionPath, String commentId, String language, boolean isPromoted) throws Exception
FAQServicedeleteCommentQuestionLang in interface FAQServicequestionPath - Path to the question.commentId - Id of the comment.language - The language to be deleted.isPromoted - If "true", the comment is promoted to an answer.Exceptionpublic QuestionLanguage getQuestionLanguageByLanguage(String questionPath, String language) throws Exception
FAQServicegetQuestionLanguageByLanguage in interface FAQServicequestionPath - Path to the question.language - Type of the language.Exceptionpublic Comment getCommentById(String questionPath, String commentId, String language) throws Exception
FAQServicegetCommentById in interface FAQServicequestionPath - Path to the question.commentId - Id of the comment.language - Type of the language.Exceptionpublic Answer getAnswerById(String questionPath, String answerid, String language) throws Exception
FAQServicegetAnswerById in interface FAQServicequestionPath - Path to the question.answerid - Id of the answer.language - Type of the language.Exceptionpublic void saveAnswer(String questionPath, Answer answer, String language) throws Exception
FAQServicesaveAnswer in interface FAQServicequestionPath - Path to the question.answer - The answer to be saved.language - The language type of the saved answer.Exceptionpublic void saveAnswer(String questionPath, QuestionLanguage questionLanguage) throws Exception
FAQServicesaveAnswer in interface FAQServicequestionPath - Path to the question.questionLanguage - The language type of the saved answer.Exceptionpublic void saveComment(String questionPath, Comment comment, String language) throws Exception
FAQServicesaveComment in interface FAQServicequestionPath - Path to the question.comment - The comment to be saved.language - The language type of comment.Exceptionpublic void removeLanguage(String questionPath, List<String> listLanguage)
FAQServiceremoveLanguage in interface FAQServicequestionPath - Path to the question.listLanguage - A list of removed languages.public void voteAnswer(String answerPath, String userName, boolean isUp) throws Exception
FAQServicevoteAnswer in interface FAQServiceanswerPath - Path of the answer.userName - Name of the user who has voted for the answer.isUp - If this value is "true", the answer is voted up. If "false", the answer is voted down.Exceptionpublic void voteQuestion(String questionPath, String userName, int number) throws Exception
FAQServicevoteQuestion in interface FAQServicequestionPath - Path to the question.userName - Name of the user who has voted for the question.number - The value of ratings (from 0 to 5 points).Exceptionpublic void unVoteQuestion(String questionPath, String userName) throws Exception
FAQServiceunVoteQuestion in interface FAQServicequestionPath - Path to the question.userName - Name of the user who unvotes the question.Exceptionpublic String[] getModeratorsOf(String path) throws Exception
FAQServicegetModeratorsOf in interface FAQServicepath - Path to the question or category.Exceptionpublic boolean isViewAuthorInfo(String id)
FAQServiceisViewAuthorInfo in interface FAQServiceid - Id of the question.public long existingCategories()
throws Exception
FAQServiceexistingCategories in interface FAQServiceExceptionpublic String getCategoryNameOf(String categoryPath) throws Exception
FAQServicegetCategoryNameOf in interface FAQServicecategoryPath - Path to the category.Exceptionpublic List<Question> getQuickQuestionsByListCatetory(List<String> listCategoryId, boolean isNotYetAnswer) throws Exception
FAQServicegetQuickQuestionsByListCatetory in interface FAQServicelistCategoryId - Id of the categories.isNotYetAnswer - If this value is "true", only quick questions which are not yet answered are got.Exceptionpublic List<Cate> listingCategoryTree() throws Exception
FAQServicelistingCategoryTree in interface FAQServiceExceptionpublic List<Watch> getWatchByCategory(String categoryId) throws Exception
FAQServicegetWatchByCategory in interface FAQServicecategoryId - Id of the category.Exceptionpublic boolean hasWatch(String categoryPath)
FAQServicehasWatch in interface FAQServicecategoryPath - Path to the category.public CategoryInfo getCategoryInfo(String categoryPath, List<String> categoryIdScoped) throws Exception
FAQServicegetCategoryInfo in interface FAQServicecategoryPath - Path to the category.categoryIdScoped - A list of sub-categories.Exceptionpublic byte[] getTemplate()
throws Exception
FAQServicegetTemplate in interface FAQServiceExceptionpublic void saveTemplate(String str) throws Exception
FAQServicesaveTemplate in interface FAQServicestr - The template to be saved.Exceptionpublic boolean isCategoryExist(String name, String path)
FAQServiceisCategoryExist in interface FAQServicename - Name of the category.path - Path to the category.public void updateQuestionRelatives(String questionPath, String[] relatives) throws Exception
FAQServiceupdateQuestionRelatives in interface FAQServicequestionPath - Path to the question.relatives - Relative paths of the question.Exceptionpublic InputStream createAnswerRSS(String cateId) throws Exception
FAQServicecreateAnswerRSS in interface FAQServicecateId - Id of the category.Exceptionpublic void reCalculateLastActivityOfQuestion(String absPathOfProp) throws Exception
FAQServicereCalculateLastActivityOfQuestion in interface FAQServiceabsPathOfProp - Path to the question.Exceptionpublic void addListenerPlugin(AnswerEventListener listener) throws Exception
FAQServiceaddListenerPlugin in interface FAQServicelistener - The listener plugin to be added.Exceptionpublic void removeListenerPlugin(AnswerEventListener listener) throws Exception
FAQServiceremoveListenerPlugin in interface FAQServicelistener - The listener plugin to be removed.Exceptionpublic void calculateDeletedUser(String userName) throws Exception
FAQServicecalculateDeletedUser in interface FAQServiceuserName - Name of the deleted user.Exceptionpublic Object readCategoryProperty(String categoryId, String propertyName, Class returnType) throws Exception
FAQServicereadCategoryProperty in interface FAQServicecategoryId - Id of the category.propertyName - Name of the property.returnType - A returned type of the property. The supported types are String[], String, Long, Boolean, Double and Date.Exceptionpublic Object readQuestionProperty(String questionId, String propertyName, Class returnType) throws Exception
FAQServicereadQuestionProperty in interface FAQServicequestionId - Id of the question.propertyName - Name of the property.returnType - A returned type of the property. The supported types are String[], String, Long, Boolean, Double and Date.Exceptionpublic void saveActivityIdForQuestion(String ownerPath, String activityId)
FAQServicesaveActivityIdForQuestion in interface FAQServiceownerPath - Path to the question activity.activityId - Id of the question activity.public String getActivityIdForQuestion(String ownerPath)
FAQServicegetActivityIdForQuestion in interface FAQServiceownerPath - Path to the question activity.public void saveActivityIdForAnswer(String ownerPath, Answer answer, String activityId)
FAQServicesaveActivityIdForAnswer in interface FAQServiceownerPath - Path to the answer activity.answer - Information of the answer which is used for creating or updating the activity.activityId - Id of the answer activity.public String getActivityIdForAnswer(String ownerPath, Answer answer)
FAQServicegetActivityIdForAnswer in interface FAQServiceownerPath - Path to the answer activity.answer - Information of the answer which is used for getting the activity.public void saveActivityIdForComment(String ownerPath, String commentId, String language, String activityId)
FAQServicesaveActivityIdForComment in interface FAQServiceownerPath - Path to the comment activity.commentId - Id of the comment.language - Language of the comment.activityId - Id of the comment activity.public String getActivityIdForComment(String ownerPath, String commentId, String language)
FAQServicegetActivityIdForComment in interface FAQServiceownerPath - Path to the comment activity.commentId - Id of the comment.language - Language of the comment.Copyright © 2003–2018 eXo Platform SAS. All rights reserved.