Clearspace API (1.7.0) 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.
 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(Community community)
          Returns the count of all questions in a community.
 int getQuestionCount(Community community, QuestionFilter questionFilter)
          Returns the count of questions in a community 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(Community community)
          Returns an iterable for all questions in a community.
 JiveIterator<Question> getQuestions(Community community, 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, initialize
 

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 community.

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

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

getQuestionCount

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

Parameters:
community - the community.
questionFilter - the question filter.
Returns:
the count of questions in a community 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(Community community)
Returns an iterable for all questions in a community.

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

getQuestions

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

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

Clearspace Project Page

Copyright © 1999-2007 Jive Software.