org.exoplatform.faq.service
Interface DataStorage
- All Known Implementing Classes:
- JCRDataStorage
public interface DataStorage
|
Method Summary |
void |
addPlugin(org.exoplatform.container.component.ComponentPlugin plugin)
|
void |
addRolePlugin(org.exoplatform.container.component.ComponentPlugin plugin)
|
void |
addWatchCategory(String id,
Watch watch)
|
void |
addWatchQuestion(String questionId,
Watch watch,
boolean isNew)
|
CategoryTree |
buildCategoryTree(String categoryId)
|
void |
calculateDeletedUser(String userName)
|
void |
changeStatusCategoryView(List<String> listCateIds)
|
void |
deleteAnswer(String questionId,
String answerId)
|
void |
deleteCategoryWatch(String categoryId,
String user)
|
void |
deleteComment(String questionId,
String commentId)
|
long |
existingCategories()
|
InputStream |
exportData(String categoryId,
boolean createZipFile)
|
List<Category> |
findCategoriesByName(String categoryName)
|
String |
getActivityIdForAnswer(String ownerPath,
Answer answer)
|
String |
getActivityIdForComment(String ownerPath,
String commentId,
String language)
|
String |
getActivityIdForQuestion(String ownerPath)
|
List<String> |
getAllActivityIdsByCatetory(String categoryId)
|
List<Category> |
getAllCategories()
|
List<String> |
getAllFAQAdmin()
|
QuestionPageList |
getAllQuestions()
|
QuestionPageList |
getAllQuestionsByCatetory(String categoryId,
FAQSetting faqSetting)
|
Answer |
getAnswerById(String questionId,
String answerid)
|
Category |
getCategoryById(String categoryId)
|
long[] |
getCategoryInfo(String categoryId,
FAQSetting faqSetting)
|
CategoryInfo |
getCategoryInfo(String categoryPath,
List<String> categoryIdScoped)
|
String |
getCategoryNameOf(String categoryPath)
|
javax.jcr.Node |
getCategoryNodeById(String categoryId)
|
List<String> |
getCategoryPath(String categoryId)
|
String |
getCategoryPathOf(String id)
|
String |
getCategoryPathOfQuestion(String questionPath)
|
Comment |
getCommentById(javax.jcr.Node questionNode,
String commentId)
|
Comment |
getCommentById(String questionId,
String commentId)
|
List<String> |
getListCateIdByModerator(String user)
|
QuestionPageList |
getListMailInWatch(String categoryId)
|
QuestionPageList |
getListQuestionsWatch(FAQSetting faqSetting,
String currentUser)
|
long |
getMaxindexCategory(String parentId)
|
org.exoplatform.forum.common.NotifyInfo |
getMessageInfo(String name)
|
String[] |
getModeratorsOf(String path)
|
JCRPageList |
getPageListAnswer(String questionId,
boolean isSortByVote)
|
JCRPageList |
getPageListComment(String questionId)
|
String |
getParentCategoriesName(String path)
|
Iterator<org.exoplatform.forum.common.NotifyInfo> |
getPendingMessages()
|
QuestionPageList |
getPendingQuestionsByCategory(String categoryId,
FAQSetting faqSetting)
|
Question |
getQuestionById(String questionId)
|
List<String> |
getQuestionContents(List<String> paths)
|
List<QuestionLanguage> |
getQuestionLanguages(String questionId)
|
javax.jcr.Node |
getQuestionNodeById(String path)
|
QuestionPageList |
getQuestionsByCatetory(String categoryId,
FAQSetting faqSetting)
|
QuestionPageList |
getQuestionsByListCatetory(List<String> listCategoryId,
boolean isNotYetAnswer)
|
QuestionPageList |
getQuestionsNotYetAnswer(String categoryId,
boolean isApproved)
|
List<Question> |
getQuickQuestionsByListCatetory(List<String> listCategoryId,
boolean isNotYetAnswer)
|
List<ObjectSearchResult> |
getSearchResults(FAQEventQuery eventQuery)
|
List<Category> |
getSubCategories(String categoryId,
FAQSetting faqSetting,
boolean isGetAll,
List<String> limitedUsers)
|
byte[] |
getTemplate()
|
FileAttachment |
getUserAvatar(String userName)
|
void |
getUserSetting(String userName,
FAQSetting faqSetting)
|
List<Watch> |
getWatchByCategory(String categoryId)
|
List<Watch> |
getWatchByQuestion(String questionId)
|
QuestionPageList |
getWatchedCategoryByUser(String userId)
|
List<String> |
getWatchedSubCategory(String userId,
String cateId)
|
boolean |
hasWatch(String categoryPath)
|
boolean |
importData(String parentId,
InputStream inputStream,
boolean isZip)
|
boolean |
initRootCategory()
|
boolean |
isAdminRole(String userName)
|
boolean |
isCategoryExist(String name,
String path)
|
boolean |
isCategoryModerator(String categoryId,
String user)
|
boolean |
isExisting(String path)
|
boolean |
isModerateAnswer(String id)
|
boolean |
isModerateQuestion(String id)
|
boolean |
isUserWatched(String userId,
String cateId)
|
boolean |
isViewAuthorInfo(String id)
|
List<Cate> |
listingCategoryTree()
|
void |
moveCategory(String categoryId,
String destCategoryId)
|
void |
moveQuestions(List<String> questions,
String destCategoryId,
String questionLink,
FAQSetting faqSetting)
|
void |
removeCategory(String categoryId)
|
void |
removeQuestion(String questionId)
|
void |
saveActivityIdForAnswer(String ownerPath,
Answer answer,
String activityId)
|
void |
saveActivityIdForComment(String ownerPath,
String commentId,
String language,
String activityId)
|
void |
saveActivityIdForQuestion(String ownerPath,
String activityId)
|
void |
saveAnswer(String questionId,
Answer[] answers)
|
void |
saveAnswer(String questionId,
Answer answer,
boolean isNew)
|
void |
saveAnswerQuestionLang(String questionId,
Answer answer,
String language,
boolean isNew)
|
void |
saveCategory(String parentId,
Category cat,
boolean isAddNew)
|
void |
saveComment(String questionId,
Comment comment,
boolean isNew)
|
void |
saveFAQSetting(FAQSetting faqSetting,
String userName)
|
javax.jcr.Node |
saveQuestion(Question question,
boolean isAddNew,
FAQSetting faqSetting)
|
void |
saveTemplate(String str)
|
void |
saveTopicIdDiscussQuestion(String questionId,
String topicId)
|
void |
saveUserAvatar(String userId,
FileAttachment fileAttachment)
|
void |
setDefaultAvatar(String userName)
|
void |
swapCategories(String cateId1,
String cateId2)
|
void |
unWatchCategory(String categoryId,
String user)
|
void |
unWatchQuestion(String questionId,
String user)
|
void |
updateQuestionRelatives(String questionPath,
String[] relatives)
|
addPlugin
void addPlugin(org.exoplatform.container.component.ComponentPlugin plugin)
throws Exception
- Throws:
Exception
addRolePlugin
void addRolePlugin(org.exoplatform.container.component.ComponentPlugin plugin)
throws Exception
- Throws:
Exception
isAdminRole
boolean isAdminRole(String userName)
throws Exception
- Parameters:
userName - userName
- Returns:
- true if userName has admin role. The current user is implied if userName is null.
- Throws:
Exception
getAllFAQAdmin
List<String> getAllFAQAdmin()
throws Exception
- Throws:
Exception
getUserSetting
void getUserSetting(String userName,
FAQSetting faqSetting)
throws Exception
- Throws:
Exception
saveFAQSetting
void saveFAQSetting(FAQSetting faqSetting,
String userName)
throws Exception
- Throws:
Exception
getUserAvatar
FileAttachment getUserAvatar(String userName)
throws Exception
- Throws:
Exception
saveUserAvatar
void saveUserAvatar(String userId,
FileAttachment fileAttachment)
throws Exception
- Throws:
Exception
setDefaultAvatar
void setDefaultAvatar(String userName)
throws Exception
- Throws:
Exception
initRootCategory
boolean initRootCategory()
throws Exception
- Throws:
Exception
getTemplate
byte[] getTemplate()
throws Exception
- Throws:
Exception
saveTemplate
void saveTemplate(String str)
throws Exception
- Throws:
Exception
getPendingMessages
Iterator<org.exoplatform.forum.common.NotifyInfo> getPendingMessages()
getQuestionLanguages
List<QuestionLanguage> getQuestionLanguages(String questionId)
deleteAnswer
void deleteAnswer(String questionId,
String answerId)
throws Exception
- Throws:
Exception
deleteComment
void deleteComment(String questionId,
String commentId)
throws Exception
- Throws:
Exception
getPageListAnswer
JCRPageList getPageListAnswer(String questionId,
boolean isSortByVote)
throws Exception
- Throws:
Exception
saveAnswer
void saveAnswer(String questionId,
Answer answer,
boolean isNew)
throws Exception
- Throws:
Exception
saveAnswer
void saveAnswer(String questionId,
Answer[] answers)
throws Exception
- Throws:
Exception
saveComment
void saveComment(String questionId,
Comment comment,
boolean isNew)
throws Exception
- Throws:
Exception
saveAnswerQuestionLang
void saveAnswerQuestionLang(String questionId,
Answer answer,
String language,
boolean isNew)
throws Exception
- Throws:
Exception
getAnswerById
Answer getAnswerById(String questionId,
String answerid)
throws Exception
- Throws:
Exception
getPageListComment
JCRPageList getPageListComment(String questionId)
throws Exception
- Throws:
Exception
getCommentById
Comment getCommentById(String questionId,
String commentId)
throws Exception
- Throws:
Exception
saveQuestion
javax.jcr.Node saveQuestion(Question question,
boolean isAddNew,
FAQSetting faqSetting)
throws Exception
- Throws:
Exception
removeQuestion
void removeQuestion(String questionId)
throws Exception
- Throws:
Exception
getCommentById
Comment getCommentById(javax.jcr.Node questionNode,
String commentId)
throws Exception
- Throws:
Exception
getQuestionById
Question getQuestionById(String questionId)
throws Exception
- Throws:
Exception
getAllQuestions
QuestionPageList getAllQuestions()
throws Exception
- Throws:
Exception
getQuestionsNotYetAnswer
QuestionPageList getQuestionsNotYetAnswer(String categoryId,
boolean isApproved)
throws Exception
- Throws:
Exception
getPendingQuestionsByCategory
QuestionPageList getPendingQuestionsByCategory(String categoryId,
FAQSetting faqSetting)
throws Exception
- Throws:
Exception
getQuestionsByCatetory
QuestionPageList getQuestionsByCatetory(String categoryId,
FAQSetting faqSetting)
throws Exception
- Throws:
Exception
getAllQuestionsByCatetory
QuestionPageList getAllQuestionsByCatetory(String categoryId,
FAQSetting faqSetting)
throws Exception
- Throws:
Exception
getQuestionsByListCatetory
QuestionPageList getQuestionsByListCatetory(List<String> listCategoryId,
boolean isNotYetAnswer)
throws Exception
- Throws:
Exception
getQuickQuestionsByListCatetory
List<Question> getQuickQuestionsByListCatetory(List<String> listCategoryId,
boolean isNotYetAnswer)
throws Exception
- Throws:
Exception
getCategoryPathOfQuestion
String getCategoryPathOfQuestion(String questionPath)
throws Exception
- Throws:
Exception
moveQuestions
void moveQuestions(List<String> questions,
String destCategoryId,
String questionLink,
FAQSetting faqSetting)
throws Exception
- Throws:
Exception
changeStatusCategoryView
void changeStatusCategoryView(List<String> listCateIds)
throws Exception
- Throws:
Exception
getMaxindexCategory
long getMaxindexCategory(String parentId)
throws Exception
- Throws:
Exception
saveCategory
void saveCategory(String parentId,
Category cat,
boolean isAddNew)
listingCategoryTree
List<Cate> listingCategoryTree()
throws Exception
- Throws:
Exception
buildCategoryTree
CategoryTree buildCategoryTree(String categoryId)
throws Exception
- Throws:
Exception
removeCategory
void removeCategory(String categoryId)
throws Exception
- Throws:
Exception
getCategoryById
Category getCategoryById(String categoryId)
throws Exception
- Parameters:
categoryId - the path of the category starting from home. It should be in the form of "categories/CategoryXXX/CategoryXXX"
- Returns:
-
- Throws:
Exception
findCategoriesByName
List<Category> findCategoriesByName(String categoryName)
throws Exception
- Throws:
Exception
getListCateIdByModerator
List<String> getListCateIdByModerator(String user)
throws Exception
- Throws:
Exception
getAllCategories
List<Category> getAllCategories()
throws Exception
- Throws:
Exception
existingCategories
long existingCategories()
throws Exception
- Throws:
Exception
getCategoryNodeById
javax.jcr.Node getCategoryNodeById(String categoryId)
throws Exception
- Throws:
Exception
getSubCategories
List<Category> getSubCategories(String categoryId,
FAQSetting faqSetting,
boolean isGetAll,
List<String> limitedUsers)
throws Exception
- Throws:
Exception
getCategoryInfo
long[] getCategoryInfo(String categoryId,
FAQSetting faqSetting)
throws Exception
- Throws:
Exception
moveCategory
void moveCategory(String categoryId,
String destCategoryId)
throws Exception
- Throws:
Exception
addWatchCategory
void addWatchCategory(String id,
Watch watch)
throws Exception
- Throws:
Exception
getListMailInWatch
QuestionPageList getListMailInWatch(String categoryId)
throws Exception
- Throws:
Exception
getWatchByCategory
List<Watch> getWatchByCategory(String categoryId)
throws Exception
- Throws:
Exception
hasWatch
boolean hasWatch(String categoryPath)
addWatchQuestion
void addWatchQuestion(String questionId,
Watch watch,
boolean isNew)
throws Exception
- Throws:
Exception
getWatchByQuestion
List<Watch> getWatchByQuestion(String questionId)
throws Exception
- Throws:
Exception
getWatchedCategoryByUser
QuestionPageList getWatchedCategoryByUser(String userId)
throws Exception
- Throws:
Exception
isUserWatched
boolean isUserWatched(String userId,
String cateId)
getWatchedSubCategory
List<String> getWatchedSubCategory(String userId,
String cateId)
throws Exception
- Throws:
Exception
getListQuestionsWatch
QuestionPageList getListQuestionsWatch(FAQSetting faqSetting,
String currentUser)
throws Exception
- Throws:
Exception
deleteCategoryWatch
void deleteCategoryWatch(String categoryId,
String user)
throws Exception
- Throws:
Exception
unWatchCategory
void unWatchCategory(String categoryId,
String user)
throws Exception
- Throws:
Exception
unWatchQuestion
void unWatchQuestion(String questionId,
String user)
throws Exception
- Throws:
Exception
getSearchResults
List<ObjectSearchResult> getSearchResults(FAQEventQuery eventQuery)
throws Exception
- Throws:
Exception
getCategoryPath
List<String> getCategoryPath(String categoryId)
throws Exception
- Throws:
Exception
getParentCategoriesName
String getParentCategoriesName(String path)
throws Exception
- Throws:
Exception
getMessageInfo
org.exoplatform.forum.common.NotifyInfo getMessageInfo(String name)
throws Exception
- Throws:
Exception
swapCategories
void swapCategories(String cateId1,
String cateId2)
throws Exception
- Throws:
Exception
saveTopicIdDiscussQuestion
void saveTopicIdDiscussQuestion(String questionId,
String topicId)
throws Exception
- Throws:
Exception
exportData
InputStream exportData(String categoryId,
boolean createZipFile)
throws Exception
- Throws:
Exception
importData
boolean importData(String parentId,
InputStream inputStream,
boolean isZip)
throws Exception
- Throws:
Exception
isExisting
boolean isExisting(String path)
throws Exception
- Throws:
Exception
getCategoryPathOf
String getCategoryPathOf(String id)
throws Exception
- Throws:
Exception
isModerateAnswer
boolean isModerateAnswer(String id)
throws Exception
- Throws:
Exception
isModerateQuestion
boolean isModerateQuestion(String id)
throws Exception
- Throws:
Exception
isViewAuthorInfo
boolean isViewAuthorInfo(String id)
isCategoryModerator
boolean isCategoryModerator(String categoryId,
String user)
throws Exception
- Parameters:
categoryId - id of categoryuser - username
- Returns:
- true if user is moderator of the category. The current user is implied if user is null.
- Throws:
Exception
isCategoryExist
boolean isCategoryExist(String name,
String path)
getQuestionContents
List<String> getQuestionContents(List<String> paths)
throws Exception
- Throws:
Exception
getQuestionNodeById
javax.jcr.Node getQuestionNodeById(String path)
throws Exception
- Throws:
Exception
getModeratorsOf
String[] getModeratorsOf(String path)
throws Exception
- Throws:
Exception
getCategoryNameOf
String getCategoryNameOf(String categoryPath)
throws Exception
- Throws:
Exception
getCategoryInfo
CategoryInfo getCategoryInfo(String categoryPath,
List<String> categoryIdScoped)
throws Exception
- Throws:
Exception
updateQuestionRelatives
void updateQuestionRelatives(String questionPath,
String[] relatives)
throws Exception
- Throws:
Exception
calculateDeletedUser
void calculateDeletedUser(String userName)
throws Exception
- Throws:
Exception
saveActivityIdForQuestion
void saveActivityIdForQuestion(String ownerPath,
String activityId)
getActivityIdForQuestion
String getActivityIdForQuestion(String ownerPath)
saveActivityIdForAnswer
void saveActivityIdForAnswer(String ownerPath,
Answer answer,
String activityId)
getActivityIdForAnswer
String getActivityIdForAnswer(String ownerPath,
Answer answer)
saveActivityIdForComment
void saveActivityIdForComment(String ownerPath,
String commentId,
String language,
String activityId)
getActivityIdForComment
String getActivityIdForComment(String ownerPath,
String commentId,
String language)
getAllActivityIdsByCatetory
List<String> getAllActivityIdsByCatetory(String categoryId)
throws Exception
- Throws:
Exception
Copyright © 2003-2013 eXo Platform SAS. All Rights Reserved.