Jive Forums API (5.5.8) Developer Javadocs

com.jivesoftware.forum
Interface QuestionManager

All Known Implementing Classes:
DbQuestionManager, QuestionManagerProxy

public interface QuestionManager

Manages questions.


Method Summary
 Question createQuestion(ForumThread thread)
          Creates a new question.
 void deleteQuestion(Question question)
          Deletes an existing question.
 int getHelpfulAnswersPerThread()
          Returns the number of helpful answers allowed per question.
 Question getQuestion(ForumThread thread)
          Returns the question associated with a thread.
 int getQuestionCount()
          Returns the count of all questions in the system.
 int getQuestionCount(Forum forum)
          Returns the count of all questions in a forum.
 int getQuestionCount(ForumCategory category)
          Returns the count of all questions in a category.
 int getQuestionCount(ForumCategory category, QuestionFilter questionFilter)
          Returns the count of questions in a category that pass the specified question filter.
 int getQuestionCount(Forum forum, QuestionFilter questionFilter)
          Returns the count of questions in a forum that pass the specified question filter.
 int getQuestionCount(QuestionFilter questionFilter)
          Returns the count of all questions in the system that pass the specified question filter.
 java.util.Iterator getQuestions()
          Returns an iterator for all questions in the system.
 java.util.Iterator getQuestions(Forum forum)
          Returns an iterator for all questions in a forum.
 java.util.Iterator getQuestions(ForumCategory category)
          Returns an iterator for all questions in a category.
 java.util.Iterator getQuestions(ForumCategory category, QuestionFilter questionFilter)
          Returns an iterator for all questions in a categetory that pass the specified question filter.
 java.util.Iterator getQuestions(Forum forum, QuestionFilter questionFilter)
          Returns an iterator for all questions in a forum that pass the specified question filter.
 java.util.Iterator getQuestions(QuestionFilter questionFilter)
          Returns an iterator for all questions in the system that pass the specified question filter.
 boolean hasQuestion(ForumThread thread)
          Returns true if the thread has a question associated with it.
 void setHelpfulAnswersPerThread(int count)
          Sets the number of helpful answers allowed per question.
 

Method Detail

getHelpfulAnswersPerThread

int getHelpfulAnswersPerThread()
Returns the number of helpful answers allowed per question. The default is two.

Returns:
the number of helpful answers allowed per thread.

setHelpfulAnswersPerThread

void setHelpfulAnswersPerThread(int count)
                                throws UnauthorizedException
Sets the number of helpful answers allowed per question. The default is two.

Parameters:
count - the number of helpful answers allowed per thread.
Throws:
UnauthorizedException - if not a system administrator.

getQuestion

Question getQuestion(ForumThread thread)
                     throws NotFoundException
Returns the question associated with a thread.

Parameters:
thread - the thread.
Returns:
the question associated with a thread.
Throws:
NotFoundException - if the question for the thread could not be found.

hasQuestion

boolean hasQuestion(ForumThread thread)
Returns true if the thread has a question associated with it.

Parameters:
thread - the thread.
Returns:
true if the thread has a question associated with it.

createQuestion

Question createQuestion(ForumThread thread)
                        throws UnauthorizedException
Creates a new question. The thread must already be added to a forum.

Parameters:
thread - the thread the question is associated with.
Returns:
the newly created question.
Throws:
UnauthorizedException

deleteQuestion

void deleteQuestion(Question question)
                    throws UnauthorizedException
Deletes an existing question.

Parameters:
question - the question.
Throws:
UnauthorizedException

getQuestionCount

int getQuestionCount()
Returns the count of all questions in the system.

Returns:
the count of all questions in the system.

getQuestionCount

int getQuestionCount(QuestionFilter questionFilter)
Returns the count of all questions in the system that pass the specified question filter.

Parameters:
questionFilter - the question filter.
Returns:
the count of all questions that pass the specified question filter.

getQuestionCount

int getQuestionCount(ForumCategory category)
Returns the count of all questions in a category.

Parameters:
category - the category.
Returns:
the count of all questions in the category.

getQuestionCount

int getQuestionCount(ForumCategory category,
                     QuestionFilter questionFilter)
Returns the count of questions in a category that pass the specified question filter.

Parameters:
category - the category.
questionFilter - the question filter.
Returns:
the count of questions in a category that pass the specified question filter.

getQuestionCount

int getQuestionCount(Forum forum)
Returns the count of all questions in a forum.

Parameters:
forum - the forum.
Returns:
the count of all questions in the forum.

getQuestionCount

int getQuestionCount(Forum forum,
                     QuestionFilter questionFilter)
Returns the count of questions in a forum that pass the specified question filter.

Parameters:
forum - the forum.
questionFilter - the question filter.
Returns:
the count of questions in a forum that pass the specified question filter.

getQuestions

java.util.Iterator getQuestions()
Returns an iterator for all questions in the system.

Returns:
an iterator for all questions in the system.

getQuestions

java.util.Iterator getQuestions(QuestionFilter questionFilter)
Returns an iterator for all questions in the system that pass the specified question filter.

Parameters:
questionFilter - the question filter.
Returns:
an iterator for all questions in the system that pass the specified question filter.

getQuestions

java.util.Iterator getQuestions(ForumCategory category)
Returns an iterator for all questions in a category.

Parameters:
category - the category.
Returns:
an iterator for all questions in a category.

getQuestions

java.util.Iterator getQuestions(ForumCategory category,
                                QuestionFilter questionFilter)
Returns an iterator for all questions in a categetory that pass the specified question filter.

Parameters:
category - the category.
questionFilter - the question filter.
Returns:
an iterator for questions in a category that pass the specified question filter.

getQuestions

java.util.Iterator getQuestions(Forum forum)
Returns an iterator for all questions in a forum.

Parameters:
forum - the forum.
Returns:
an iterator for all questions in a forum.

getQuestions

java.util.Iterator getQuestions(Forum forum,
                                QuestionFilter questionFilter)
Returns an iterator for all questions in a forum that pass the specified question filter.

Parameters:
forum - the forum.
questionFilter - the question filter.
Returns:
an iterator for questions in a forum that pass the specified question filter.

Jive Forums Project Page

Copyright © 1999-2006 Jive Software.