|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.exoplatform.faq.service.impl.FAQServiceImpl
public class FAQServiceImpl
| Field Summary | |
|---|---|
static int |
CATEGORY
|
protected List<AnswerEventListener> |
listeners_
|
static int |
QUESTION
|
static int |
SEND_EMAIL
|
| Constructor Summary | |
|---|---|
FAQServiceImpl(org.exoplatform.container.xml.InitParams params,
org.exoplatform.forum.common.jcr.KSDataLocation locator,
org.exoplatform.container.configuration.ConfigurationManager configManager)
|
|
| Method Summary | |
|---|---|
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 categoryId,
FAQSetting faqSetting,
boolean isGetAll,
List<String> userView)
Gets all sub-categories of a category. |
List<Category> |
getSubCategories(String categoryId,
org.exoplatform.services.jcr.ext.common.SessionProvider sProvider,
FAQSetting faqSetting,
boolean isGetAll,
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)
Updates the last active information of a question. |
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)
Saves answers. |
void |
saveAnswer(String questionId,
Answer[] answers,
org.exoplatform.services.jcr.ext.common.SessionProvider sProvider)
Deprecated. use saveAnswer(String questionId, Answer[] answers) |
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. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int CATEGORY
public static final int QUESTION
public static final int SEND_EMAIL
protected List<AnswerEventListener> listeners_
| Constructor Detail |
|---|
public FAQServiceImpl(org.exoplatform.container.xml.InitParams params,
org.exoplatform.forum.common.jcr.KSDataLocation locator,
org.exoplatform.container.configuration.ConfigurationManager configManager)
throws Exception
Exception| Method Detail |
|---|
public void addPlugin(org.exoplatform.container.component.ComponentPlugin plugin)
throws Exception
FAQService
addPlugin in interface FAQServiceplugin - The plugin to be added.
Exception - the exception
public void addRolePlugin(org.exoplatform.container.component.ComponentPlugin plugin)
throws Exception
FAQService
addRolePlugin in interface FAQServiceplugin - The plugin to be added.
Exception - the exception
public void addInitialDataPlugin(InitialDataPlugin plugin)
throws Exception
FAQService
addInitialDataPlugin in interface FAQServiceplugin - The plugin to be added.
Exception
public 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.Startable
public List<String> getAllFAQAdmin()
throws Exception
getAllFAQAdmin in interface FAQServiceException - the exception
public List<Category> getAllCategories(org.exoplatform.services.jcr.ext.common.SessionProvider sProvider)
throws Exception
sProvider - is session provider
Exception - the exception
public List<Category> getAllCategories()
throws Exception
FAQService
getAllCategories in interface FAQServiceException - the exception
public QuestionPageList getAllQuestions(org.exoplatform.services.jcr.ext.common.SessionProvider sProvider)
throws Exception
sProvider -
Exception - the exception
public QuestionPageList getAllQuestions()
throws Exception
FAQService
getAllQuestions 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 exception
public QuestionPageList getQuestionsNotYetAnswer(String categoryId,
boolean isApproved)
throws Exception
FAQService
getQuestionsNotYetAnswer 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 exception
public long[] getCategoryInfo(String categoryId,
FAQSetting setting)
throws Exception
FAQService
getCategoryInfo 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 exceptioncategory
public Category getCategoryById(String categoryId)
throws Exception
FAQService
getCategoryById in interface FAQServicecategoryId - Id of the category.
Exception - the exception
public Question getQuestionById(String questionId,
org.exoplatform.services.jcr.ext.common.SessionProvider sProvider)
throws Exception
question - identifysProvider -
Exception - the exception
public Comment[] getComments(String questionId)
throws Exception
FAQService
getComments in interface FAQServicequestionId - Id of the question.
Exception
public Question getQuestionById(String questionId)
throws Exception
FAQService
getQuestionById in interface FAQServicequestionId - Id of the question
Exception - the exception
public QuestionPageList getQuestionsByCatetory(String categoryId,
org.exoplatform.services.jcr.ext.common.SessionProvider sProvider,
FAQSetting faqSetting)
throws Exception
Category - identifysProvider -
Exception - the exception
public QuestionPageList getQuestionsByCatetory(String categoryId,
FAQSetting faqSetting)
throws Exception
FAQService
getQuestionsByCatetory 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
Category - identifysProvider -
Exception - the exception
public QuestionPageList getAllQuestionsByCatetory(String categoryId,
FAQSetting faqSetting)
throws Exception
FAQService
getAllQuestionsByCatetory 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 exception
public QuestionPageList getQuestionsByListCatetory(List<String> listCategoryId,
boolean isNotYetAnswer)
throws Exception
FAQService
getQuestionsByListCatetory 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 exception
public String getCategoryPathOfQuestion(String questionPath,
org.exoplatform.services.jcr.ext.common.SessionProvider sProvider)
throws Exception
Exception
public String getCategoryPathOfQuestion(String questionPath)
throws Exception
FAQService
getCategoryPathOfQuestion in interface FAQServicequestionPath - Id of the category containing the question.
Exception
public List<QuestionLanguage> getQuestionLanguages(String questionId,
org.exoplatform.services.jcr.ext.common.SessionProvider sProvider)
throws Exception
Question - identifysProvider -
Exception - the exceptionpublic List<QuestionLanguage> getQuestionLanguages(String questionId)
FAQService
getQuestionLanguages in interface FAQServicequestionId - Id of the question.
public List<Category> getSubCategories(String categoryId,
org.exoplatform.services.jcr.ext.common.SessionProvider sProvider,
FAQSetting faqSetting,
boolean isGetAll,
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
categoryId - is address id of the categorysProvider -
Exception - the exceptioncategory
public List<Category> getSubCategories(String categoryId,
FAQSetting faqSetting,
boolean isGetAll,
List<String> userView)
throws Exception
FAQService
getSubCategories in interface FAQServicecategoryId - Id of the category.faqSetting - Settings of FAQ.isGetAll - Deprecated.userView - Users who have the view permission on sub-categories of a category.
Exception - the exception
public void moveQuestions(List<String> questions,
String destCategoryId,
org.exoplatform.services.jcr.ext.common.SessionProvider sProvider)
throws Exception
Question - identify listdestination - category identifysProvider -
Exception - the exception
public void moveQuestions(List<String> questions,
String destCategoryId,
String questionLink,
FAQSetting faqSetting)
throws Exception
FAQService
moveQuestions 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 exception
public 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 exception
public void removeCategory(String categoryId)
throws Exception
FAQService
removeCategory in interface FAQServicecategoryId - Id of the category which is removed.
Exception - the exception
public void removeQuestion(String questionId,
org.exoplatform.services.jcr.ext.common.SessionProvider sProvider)
throws Exception
This function is used to remove one question in list
question - identifysProvider -
Exception - the exception
public void removeQuestion(String questionId)
throws Exception
FAQService
removeQuestion 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 exceptioncategory
public 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.category
public CategoryTree buildCategoryTree(String categoryId)
throws Exception
FAQService
buildCategoryTree in interface FAQServicecategoryId - Id of the category.
Exception
public void changeStatusCategoryView(List<String> listCateIds,
org.exoplatform.services.jcr.ext.common.SessionProvider sProvider)
throws Exception
Exception
public void changeStatusCategoryView(List<String> listCateIds)
throws Exception
FAQService
changeStatusCategoryView in interface FAQServicelistCateIds - Ids of a category which is changed.
Exception - the exception
public 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 -
Exception
public javax.jcr.Node saveQuestion(Question question,
boolean isAddNew,
FAQSetting faqSetting)
throws Exception
FAQService
saveQuestion 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
newSetting - is properties of object FAQSetting that user input to interface will save on datasProvider -
Exception - the exception
public void saveFAQSetting(FAQSetting faqSetting,
String userName)
throws Exception
FAQService
saveFAQSetting in interface FAQServicefaqSetting - Settings of FAQ.userName - Name of the user for whom the FAQ settings are updated.
Exception - the exception
public 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 exceptionsee category this plate but user see that category at new plate
public void moveCategory(String categoryId,
String destCategoryId)
throws Exception
FAQService
moveCategory in interface FAQServicecategoryId - Id of the category which is moved.destCategoryId - Id of the destination category.
Exception - the exception
public 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 categoryvalue, - this address email (multiple value) with input to interface will save on datasProvider -
Exception - the exception
public void addWatchCategory(String id,
Watch watch)
throws Exception
FAQService
addWatchCategory in interface FAQServiceid - Id of the category which is watched.watch - The user who watches the category.
Exception - the exception
public void deleteMailInWatch(String categoryId,
org.exoplatform.services.jcr.ext.common.SessionProvider sProvider,
String user)
throws Exception
categoryId - is id of current categorysProvider - emails - is location current of one watch with user want delete
Exception - the exception
public void deleteCategoryWatch(String categoryId,
String user)
throws Exception
FAQService
deleteCategoryWatch in interface FAQServicecategoryId - Id of the category.user - The user whose watch is removed by himself or someone else.
Exception - the exception
public void UnWatch(String categoryId,
org.exoplatform.services.jcr.ext.common.SessionProvider sProvider,
String userCurrent)
throws Exception
categoryId - is id of current categorysProvider - emails - is location current of one watch with user want delete
Exception - the exception
public void unWatchCategory(String categoryId,
String userCurrent)
throws Exception
FAQService
unWatchCategory in interface FAQServicecategoryId - Id of the category which is unwatched.userCurrent - The user whose watch is removed by himself or someone else.
Exception - the exception
public void UnWatchQuestion(String questionID,
org.exoplatform.services.jcr.ext.common.SessionProvider sProvider,
String userCurrent)
throws Exception
categoryId - is id of current categorysProvider - emails - is location current of one watch with user want delete
Exception - the exception
public void unWatchQuestion(String questionID,
String userCurrent)
throws Exception
FAQService
unWatchQuestion in interface FAQServicequestionID - Id of the question which is unwatched.userCurrent - The user whose watch is removed by himself or someone else.
Exception - the exception
public List<String> getListCateIdByModerator(String user,
org.exoplatform.services.jcr.ext.common.SessionProvider sProvider)
throws Exception
user - is name when user loginsProvider -
Exception - the exception
public List<String> getListCateIdByModerator(String user)
throws Exception
FAQService
getListCateIdByModerator 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 FAQServicesProvider - eventQuery - is object save value in form advanced search
Exception - the exception
public List<String> getCategoryPath(org.exoplatform.services.jcr.ext.common.SessionProvider sProvider,
String categoryId)
throws Exception
category - identifysProvider -
Exception - the exception
public List<String> getCategoryPath(String categoryId)
throws Exception
FAQService
getCategoryPath in interface FAQServicecategoryId - Id of the category.
Exception - the exceptionpublic Iterator<org.exoplatform.forum.common.NotifyInfo> getPendingMessages()
getPendingMessages in interface FAQService
public 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 questionNode
Exception - throw an exception when save a new language node
public void getUserSetting(org.exoplatform.services.jcr.ext.common.SessionProvider sProvider,
String userName,
FAQSetting faqSetting)
throws Exception
Exception
public void getUserSetting(String userName,
FAQSetting faqSetting)
throws Exception
FAQService
getUserSetting 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
FAQService
getMessageInfo in interface FAQServicename - Key to get the message.
Exception
public boolean isAdminRole(String userName,
org.exoplatform.services.jcr.ext.common.SessionProvider sProvider)
throws Exception
Exception
public boolean isAdminRole(String userName)
throws Exception
FAQService
isAdminRole in interface FAQServiceuserName - Name of the checked user.
Exception
public javax.jcr.Node getCategoryNodeById(String categoryId,
org.exoplatform.services.jcr.ext.common.SessionProvider sProvider)
throws Exception
Exception
public javax.jcr.Node getCategoryNodeById(String categoryId)
throws Exception
FAQService
getCategoryNodeById in interface FAQServicecategoryId - Id of the category.
Exception
public void addWatchQuestion(String questionId,
Watch watch,
boolean isNew,
org.exoplatform.services.jcr.ext.common.SessionProvider sProvider)
throws Exception
Exception
public void addWatchQuestion(String questionId,
Watch watch,
boolean isNew)
throws Exception
FAQService
addWatchQuestion 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.
Exception
public QuestionPageList getListQuestionsWatch(FAQSetting faqSetting,
String currentUser,
org.exoplatform.services.jcr.ext.common.SessionProvider sProvider)
throws Exception
Exception
public QuestionPageList getListQuestionsWatch(FAQSetting faqSetting,
String currentUser)
throws Exception
FAQService
getListQuestionsWatch in interface FAQServicefaqSetting - Settings of FAQ.currentUser - Name of the user who watches questions.
Exception
public void importData(String categoryId,
javax.jcr.Session session,
InputStream inputStream,
boolean isZip,
org.exoplatform.services.jcr.ext.common.SessionProvider sProvider)
throws Exception
Exception
public boolean importData(String categoryId,
InputStream inputStream,
boolean isZip)
throws Exception
FAQService
importData in interface FAQServicecategoryId - Id of the category.inputStream - The data.isZip - Data is zip-typed or not.
Exception
public InputStream exportData(String categoryId,
boolean createZipFile)
throws Exception
FAQService
exportData in interface FAQServicecategoryId - Id of the exported category.createZipFile - The category is exported into a zip file or not.
Exception
public void swapCategories(String parentCateId,
String cateId1,
String cateId2,
org.exoplatform.services.jcr.ext.common.SessionProvider sProvider)
throws Exception
Exception
public void swapCategories(String cateId1,
String cateId2)
throws Exception
FAQService
swapCategories in interface FAQServicecateId1 - Id of the Category 1.cateId2 - Id of the Category 2.
Exception
public void saveTopicIdDiscussQuestion(String questionId,
String pathDiscuss,
org.exoplatform.services.jcr.ext.common.SessionProvider sProvider)
throws Exception
Exception
public void saveTopicIdDiscussQuestion(String questionId,
String pathDiscuss)
throws Exception
FAQService
saveTopicIdDiscussQuestion in interface FAQServicequestionId - Id of the question which is discussed in the topic.pathDiscuss - Path to the discussion.
Exception
public long getMaxindexCategory(String parentId,
org.exoplatform.services.jcr.ext.common.SessionProvider sProvider)
throws Exception
Exception
public long getMaxindexCategory(String parentId)
throws Exception
FAQService
getMaxindexCategory in interface FAQServiceparentId - Id of the parent category.
Exception
public void deleteAnswer(String questionId,
String answerId,
org.exoplatform.services.jcr.ext.common.SessionProvider sProvider)
throws Exception
Exception
public void deleteAnswer(String questionId,
String answerId)
throws Exception
FAQService
deleteAnswer in interface FAQServicequestionId - Id of the question whose answer is removed.answerId - Id of the answer.
Exception
public void deleteComment(String questionId,
String commentId,
org.exoplatform.services.jcr.ext.common.SessionProvider sProvider)
throws Exception
Exception
public void deleteComment(String questionId,
String commentId)
throws Exception
FAQService
deleteComment in interface FAQServicequestionId - Id of the question whose comment is removed.commentId - Id of the comment.
Exception
public void saveAnswer(String questionId,
Answer answer,
boolean isNew,
org.exoplatform.services.jcr.ext.common.SessionProvider sProvider)
throws Exception
Exception
public void saveAnswer(String questionId,
Answer answer,
boolean isNew)
throws Exception
FAQService
saveAnswer 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.
Exception
public void saveComment(String questionId,
Comment comment,
boolean isNew,
org.exoplatform.services.jcr.ext.common.SessionProvider sProvider)
throws Exception
Exception
public void saveComment(String questionId,
Comment comment,
boolean isNew)
throws Exception
FAQService
saveComment 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.
Exception
public Comment getCommentById(org.exoplatform.services.jcr.ext.common.SessionProvider sProvider,
String questionId,
String commentId)
throws Exception
Exception
public Comment getCommentById(String questionId,
String commentId)
throws Exception
FAQService
getCommentById in interface FAQServicequestionId - Id of the question.commentId - Id of the comment.
Exception
public Answer getAnswerById(String questionId,
String answerid,
org.exoplatform.services.jcr.ext.common.SessionProvider sProvider)
throws Exception
Exception
public Answer getAnswerById(String questionId,
String answerid)
throws Exception
FAQService
getAnswerById in interface FAQServicequestionId - Id of the question.answerid - Id of the answer.
Exception
public void saveAnswer(String questionId,
Answer[] answers,
org.exoplatform.services.jcr.ext.common.SessionProvider sProvider)
throws Exception
saveAnswer(String questionId, Answer[] answers)
Exception
public void saveAnswer(String questionId,
Answer[] answers)
throws Exception
FAQService
saveAnswer in interface FAQServicequestionId - Id of the question which contains the saved answers.answers - The saved answers.
Exception
public JCRPageList getPageListAnswer(org.exoplatform.services.jcr.ext.common.SessionProvider sProvider,
String questionId,
boolean isSortByVote)
throws Exception
Exception
public JCRPageList getPageListAnswer(String questionId,
boolean isSortByVote)
throws Exception
FAQService
getPageListAnswer in interface FAQServicequestionId - Id of the question.isSortByVote - If "true", the returned answers will be sorted by vote.
Exception
public JCRPageList getPageListComment(org.exoplatform.services.jcr.ext.common.SessionProvider sProvider,
String questionId)
throws Exception
Exception
public JCRPageList getPageListComment(String questionId)
throws Exception
FAQService
getPageListComment in interface FAQServicequestionId - Id of the question.
Exception
public QuestionPageList getListCategoriesWatch(String userId,
org.exoplatform.services.jcr.ext.common.SessionProvider sProvider)
throws Exception
Exception
public QuestionPageList getWatchedCategoryByUser(String userId)
throws Exception
FAQService
getWatchedCategoryByUser in interface FAQServiceuserId - Name of the user who watches questions.
Exception
public FileAttachment getUserAvatar(String userName,
org.exoplatform.services.jcr.ext.common.SessionProvider sProvider)
throws Exception
Exception
public FileAttachment getUserAvatar(String userName)
throws Exception
FAQService
getUserAvatar in interface FAQServiceuserName - Name of the user.
Exception
public void saveUserAvatar(String userId,
FileAttachment fileAttachment,
org.exoplatform.services.jcr.ext.common.SessionProvider sProvider)
throws Exception
Exception
public void saveUserAvatar(String userId,
FileAttachment fileAttachment)
throws Exception
FAQService
saveUserAvatar in interface FAQServiceuserId - Name of the user.fileAttachment - Avatar of the user.
Exception
public void setDefaultAvatar(String userName,
org.exoplatform.services.jcr.ext.common.SessionProvider sProvider)
throws Exception
Exception
public void setDefaultAvatar(String userName)
throws Exception
FAQService
setDefaultAvatar in interface FAQServiceuserName - Name of the user.
Exception
public boolean getWatchByUser(String userId,
String cateId,
org.exoplatform.services.jcr.ext.common.SessionProvider sProvider)
throws Exception
Exception
public boolean isUserWatched(String userId,
String cateId)
FAQService
isUserWatched 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
Exception
public QuestionPageList getPendingQuestionsByCategory(String categoryId,
FAQSetting faqSetting)
throws Exception
FAQService
getPendingQuestionsByCategory in interface FAQServicecategoryId - Id of the category.faqSetting - Settings of FAQ.
Exception
public boolean isExisting(String path)
throws Exception
FAQService
isExisting in interface FAQServicepath - The path to be checked.
Exception
public String getCategoryPathOf(String id)
throws Exception
FAQService
getCategoryPathOf in interface FAQServiceid - Id of the category.
Exception
public List<String> getQuestionContents(List<String> paths)
throws Exception
FAQService
getQuestionContents in interface FAQServicepaths - Paths to the questions.
Exception
public Map<String,String> getRelationQuestion(List<String> paths)
throws Exception
FAQService
getRelationQuestion in interface FAQServicepaths - Paths to the questions.
Exception
public javax.jcr.Node getQuestionNodeById(String path)
throws Exception
FAQService
getQuestionNodeById in interface FAQServicepath - Path to the question.
Exception
public boolean isModerateAnswer(String id)
throws Exception
FAQService
isModerateAnswer in interface FAQServiceid - Id of the category.
Exception
public boolean isModerateQuestion(String id)
throws Exception
FAQService
isModerateQuestion in interface FAQServiceid - Id of the question.
Exception
public String getParentCategoriesName(String path)
throws Exception
FAQService
getParentCategoriesName in interface FAQServicepath - Path to the parent category.
Exception
public QuestionPageList getListMailInWatch(String categoryId)
throws Exception
FAQService
getListMailInWatch in interface FAQServicecategoryId - Id of the category.
Exception
public boolean isCategoryModerator(String categoryId,
String user)
throws Exception
FAQService
isCategoryModerator in interface FAQServicecategoryId - Id of the category.user - Name of the user.
Exception
public void addLanguage(String questionPath,
QuestionLanguage language)
throws Exception
FAQService
addLanguage in interface FAQServicequestionPath - Path to the question.language - Information of the added language.
Exception
public void deleteAnswerQuestionLang(String questionPath,
String answerId,
String language)
throws Exception
FAQService
deleteAnswerQuestionLang in interface FAQServicequestionPath - Path to the question.answerId - Id of the answer.language - The language to be deleted.
Exception
public void deleteCommentQuestionLang(String questionPath,
String commentId,
String language,
boolean isPromoted)
throws Exception
FAQService
deleteCommentQuestionLang 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.
Exception
public QuestionLanguage getQuestionLanguageByLanguage(String questionPath,
String language)
throws Exception
FAQService
getQuestionLanguageByLanguage in interface FAQServicequestionPath - Path to the question.language - Type of the language.
Exception
public Comment getCommentById(String questionPath,
String commentId,
String language)
throws Exception
FAQService
getCommentById in interface FAQServicequestionPath - Path to the question.commentId - Id of the comment.language - Type of the language.
Exception
public Answer getAnswerById(String questionPath,
String answerid,
String language)
throws Exception
FAQService
getAnswerById in interface FAQServicequestionPath - Path to the question.answerid - Id of the answer.language - Type of the language.
Exception
public void saveAnswer(String questionPath,
Answer answer,
String language)
throws Exception
FAQService
saveAnswer in interface FAQServicequestionPath - Path to the question.answer - The answer to be saved.language - The language type of the saved answer.
Exception
public void saveAnswer(String questionPath,
QuestionLanguage questionLanguage)
throws Exception
FAQService
saveAnswer in interface FAQServicequestionPath - Path to the question.questionLanguage - The language type of the saved answer.
Exception
public void saveComment(String questionPath,
Comment comment,
String language)
throws Exception
FAQService
saveComment in interface FAQServicequestionPath - Path to the question.comment - The comment to be saved.language - The language type of comment.
Exception
public void removeLanguage(String questionPath,
List<String> listLanguage)
FAQService
removeLanguage in interface FAQServicequestionPath - Path to the question.listLanguage - A list of removed languages.
public void voteAnswer(String answerPath,
String userName,
boolean isUp)
throws Exception
FAQService
voteAnswer 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.
Exception
public void voteQuestion(String questionPath,
String userName,
int number)
throws Exception
FAQService
voteQuestion 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).
Exception
public void unVoteQuestion(String questionPath,
String userName)
throws Exception
FAQService
unVoteQuestion in interface FAQServicequestionPath - Path to the question.userName - Name of the user who unvotes the question.
Exception
public String[] getModeratorsOf(String path)
throws Exception
FAQService
getModeratorsOf in interface FAQServicepath - Path to the question or category.
Exceptionpublic boolean isViewAuthorInfo(String id)
FAQService
isViewAuthorInfo in interface FAQServiceid - Id of the question.
public long existingCategories()
throws Exception
FAQService
existingCategories in interface FAQServiceException
public String getCategoryNameOf(String categoryPath)
throws Exception
FAQService
getCategoryNameOf in interface FAQServicecategoryPath - Path to the category.
Exception
public List<Question> getQuickQuestionsByListCatetory(List<String> listCategoryId,
boolean isNotYetAnswer)
throws Exception
FAQService
getQuickQuestionsByListCatetory in interface FAQServicelistCategoryId - Id of the categories.isNotYetAnswer - If this value is "true", only quick questions which are not yet answered are got.
Exception
public List<Cate> listingCategoryTree()
throws Exception
FAQService
listingCategoryTree in interface FAQServiceException
public List<Watch> getWatchByCategory(String categoryId)
throws Exception
FAQService
getWatchByCategory in interface FAQServicecategoryId - Id of the category.
Exceptionpublic boolean hasWatch(String categoryPath)
FAQService
hasWatch in interface FAQServicecategoryPath - Path to the category.
public CategoryInfo getCategoryInfo(String categoryPath,
List<String> categoryIdScoped)
throws Exception
FAQService
getCategoryInfo in interface FAQServicecategoryPath - Path to the category.categoryIdScoped - A list of sub-categories.
Exception
public byte[] getTemplate()
throws Exception
FAQService
getTemplate in interface FAQServiceException
public void saveTemplate(String str)
throws Exception
FAQService
saveTemplate in interface FAQServicestr - The template to be saved.
Exception
public boolean isCategoryExist(String name,
String path)
FAQService
isCategoryExist in interface FAQServicename - Name of the category.path - Path to the category.
public void updateQuestionRelatives(String questionPath,
String[] relatives)
throws Exception
FAQService
updateQuestionRelatives in interface FAQServicequestionPath - Path to the question.relatives - Relative paths of the question.
Exception
public InputStream createAnswerRSS(String cateId)
throws Exception
FAQService
createAnswerRSS in interface FAQServicecateId - Id of the category.
Exception
public void reCalculateLastActivityOfQuestion(String absPathOfProp)
throws Exception
FAQService
reCalculateLastActivityOfQuestion in interface FAQServiceabsPathOfProp - Path to the question.
Exception
public void addListenerPlugin(AnswerEventListener listener)
throws Exception
FAQService
addListenerPlugin in interface FAQServicelistener - The listener plugin to be added.
Exception
public void removeListenerPlugin(AnswerEventListener listener)
throws Exception
FAQService
removeListenerPlugin in interface FAQServicelistener - The listener plugin to be removed.
Exception
public void calculateDeletedUser(String userName)
throws Exception
FAQService
calculateDeletedUser in interface FAQServiceuserName - Name of the deleted user.
Exception
public Object readCategoryProperty(String categoryId,
String propertyName,
Class returnType)
throws Exception
FAQService
readCategoryProperty 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.
Exception
public Object readQuestionProperty(String questionId,
String propertyName,
Class returnType)
throws Exception
FAQService
readQuestionProperty 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.
Exception
public void saveActivityIdForQuestion(String ownerPath,
String activityId)
FAQService
saveActivityIdForQuestion in interface FAQServiceownerPath - Path to the question activity.activityId - Id of the question activity.public String getActivityIdForQuestion(String ownerPath)
FAQService
getActivityIdForQuestion in interface FAQServiceownerPath - Path to the question activity.
public void saveActivityIdForAnswer(String ownerPath,
Answer answer,
String activityId)
FAQService
saveActivityIdForAnswer 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)
FAQService
getActivityIdForAnswer 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)
FAQService
saveActivityIdForComment 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)
FAQService
getActivityIdForComment in interface FAQServiceownerPath - Path to the comment activity.commentId - Id of the comment.language - Language of the comment.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||