Clearspace API (2.5.22) Core Javadocs

com.jivesoftware.community
Interface QuestionManager

All Superinterfaces:
JiveManager

public interface QuestionManager
extends JiveManager

Manages questions.


Method Summary
 Question createQuestion(ForumThread thread)
          Creates a new question.
 void deleteQuestion(Question question)
          Deletes an existing question.
 void deleteUserQuestions(User user)
          Delete all questions authored by the given user.
 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(JiveContainer container)
          Returns the count of all questions in a container.
 int getQuestionCount(JiveContainer container, QuestionFilter questionFilter)
          Returns the count of questions in a container 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.
 JiveIterator<Question> getQuestions()
          Returns an iterable for all questions in the system.
 JiveIterator<Question> getQuestions(JiveContainer container)
          Returns an iterable for all questions in a container.
 JiveIterator<Question> getQuestions(JiveContainer container, QuestionFilter questionFilter)
          Returns an iterable for all questions in a categetory that pass the specified question filter.
 JiveIterator<Question> getQuestions(QuestionFilter questionFilter)
          Returns an iterable 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.
 
Methods inherited from interface com.jivesoftware.community.JiveManager
destroy
 

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.

deleteUserQuestions

void deleteUserQuestions(User user)
Delete all questions authored by the given user.

Parameters:
user - the author of the deleted questions.

createQuestion

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

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(JiveContainer container)
Returns the count of all questions in a container.

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

getQuestionCount

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

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

getQuestions

JiveIterator<Question> getQuestions()
Returns an iterable for all questions in the system.

Returns:
an iterable for all questions in the system.

getQuestions

JiveIterator<Question> getQuestions(QuestionFilter questionFilter)
Returns an iterable for all questions in the system that pass the specified question filter.

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

getQuestions

JiveIterator<Question> getQuestions(JiveContainer container)
Returns an iterable for all questions in a container.

Parameters:
container - the container.
Returns:
an iterable for all questions in a container.

getQuestions

JiveIterator<Question> getQuestions(JiveContainer container,
                                    QuestionFilter questionFilter)
Returns an iterable for all questions in a categetory that pass the specified question filter.

Parameters:
container - the jive container.
questionFilter - the question filter.
Returns:
an iterable for questions in a container that pass the specified question filter.

Clearspace Project Page

Copyright © 1999-2007 Jive Software.