Jive Forums API (5.5.8) Developer Javadocs

com.jivesoftware.forum.proxy
Class QuestionManagerProxy

java.lang.Object
  extended by com.jivesoftware.forum.proxy.QuestionManagerProxy
All Implemented Interfaces:
QuestionManager

public class QuestionManagerProxy
extends java.lang.Object
implements QuestionManager

Protection proxy for QuestionManager instances.


Constructor Summary
QuestionManagerProxy(QuestionManager manager, AuthToken authToken, Permissions permissions)
           
 
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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

QuestionManagerProxy

public QuestionManagerProxy(QuestionManager manager,
                            AuthToken authToken,
                            Permissions permissions)
Method Detail

getHelpfulAnswersPerThread

public int getHelpfulAnswersPerThread()
Description copied from interface: QuestionManager
Returns the number of helpful answers allowed per question. The default is two.

Specified by:
getHelpfulAnswersPerThread in interface QuestionManager
Returns:
the number of helpful answers allowed per thread.

setHelpfulAnswersPerThread

public void setHelpfulAnswersPerThread(int count)
                                throws UnauthorizedException
Description copied from interface: QuestionManager
Sets the number of helpful answers allowed per question. The default is two.

Specified by:
setHelpfulAnswersPerThread in interface QuestionManager
Parameters:
count - the number of helpful answers allowed per thread.
Throws:
UnauthorizedException - if not a system administrator.

getQuestion

public Question getQuestion(ForumThread thread)
                     throws NotFoundException
Description copied from interface: QuestionManager
Returns the question associated with a thread.

Specified by:
getQuestion in interface QuestionManager
Parameters:
thread - the thread.
Returns:
the question associated with a thread.
Throws:
NotFoundException - if the question for the thread could not be found.

hasQuestion

public boolean hasQuestion(ForumThread thread)
Description copied from interface: QuestionManager
Returns true if the thread has a question associated with it.

Specified by:
hasQuestion in interface QuestionManager
Parameters:
thread - the thread.
Returns:
true if the thread has a question associated with it.

createQuestion

public Question createQuestion(ForumThread thread)
                        throws UnauthorizedException
Description copied from interface: QuestionManager
Creates a new question. The thread must already be added to a forum.

Specified by:
createQuestion in interface QuestionManager
Parameters:
thread - the thread the question is associated with.
Returns:
the newly created question.
Throws:
UnauthorizedException

deleteQuestion

public void deleteQuestion(Question question)
                    throws UnauthorizedException
Description copied from interface: QuestionManager
Deletes an existing question.

Specified by:
deleteQuestion in interface QuestionManager
Parameters:
question - the question.
Throws:
UnauthorizedException

getQuestionCount

public int getQuestionCount()
Description copied from interface: QuestionManager
Returns the count of all questions in the system.

Specified by:
getQuestionCount in interface QuestionManager
Returns:
the count of all questions in the system.

getQuestionCount

public int getQuestionCount(QuestionFilter questionFilter)
Description copied from interface: QuestionManager
Returns the count of all questions in the system that pass the specified question filter.

Specified by:
getQuestionCount in interface QuestionManager
Parameters:
questionFilter - the question filter.
Returns:
the count of all questions that pass the specified question filter.

getQuestionCount

public int getQuestionCount(ForumCategory category)
Description copied from interface: QuestionManager
Returns the count of all questions in a category.

Specified by:
getQuestionCount in interface QuestionManager
Parameters:
category - the category.
Returns:
the count of all questions in the category.

getQuestionCount

public int getQuestionCount(ForumCategory category,
                            QuestionFilter questionFilter)
Description copied from interface: QuestionManager
Returns the count of questions in a category that pass the specified question filter.

Specified by:
getQuestionCount in interface QuestionManager
Parameters:
category - the category.
questionFilter - the question filter.
Returns:
the count of questions in a category that pass the specified question filter.

getQuestionCount

public int getQuestionCount(Forum forum)
Description copied from interface: QuestionManager
Returns the count of all questions in a forum.

Specified by:
getQuestionCount in interface QuestionManager
Parameters:
forum - the forum.
Returns:
the count of all questions in the forum.

getQuestionCount

public int getQuestionCount(Forum forum,
                            QuestionFilter questionFilter)
Description copied from interface: QuestionManager
Returns the count of questions in a forum that pass the specified question filter.

Specified by:
getQuestionCount in interface QuestionManager
Parameters:
forum - the forum.
questionFilter - the question filter.
Returns:
the count of questions in a forum that pass the specified question filter.

getQuestions

public java.util.Iterator getQuestions()
Description copied from interface: QuestionManager
Returns an iterator for all questions in the system.

Specified by:
getQuestions in interface QuestionManager
Returns:
an iterator for all questions in the system.

getQuestions

public java.util.Iterator getQuestions(QuestionFilter questionFilter)
Description copied from interface: QuestionManager
Returns an iterator for all questions in the system that pass the specified question filter.

Specified by:
getQuestions in interface QuestionManager
Parameters:
questionFilter - the question filter.
Returns:
an iterator for all questions in the system that pass the specified question filter.

getQuestions

public java.util.Iterator getQuestions(ForumCategory category)
Description copied from interface: QuestionManager
Returns an iterator for all questions in a category.

Specified by:
getQuestions in interface QuestionManager
Parameters:
category - the category.
Returns:
an iterator for all questions in a category.

getQuestions

public java.util.Iterator getQuestions(ForumCategory category,
                                       QuestionFilter questionFilter)
Description copied from interface: QuestionManager
Returns an iterator for all questions in a categetory that pass the specified question filter.

Specified by:
getQuestions in interface QuestionManager
Parameters:
category - the category.
questionFilter - the question filter.
Returns:
an iterator for questions in a category that pass the specified question filter.

getQuestions

public java.util.Iterator getQuestions(Forum forum)
Description copied from interface: QuestionManager
Returns an iterator for all questions in a forum.

Specified by:
getQuestions in interface QuestionManager
Parameters:
forum - the forum.
Returns:
an iterator for all questions in a forum.

getQuestions

public java.util.Iterator getQuestions(Forum forum,
                                       QuestionFilter questionFilter)
Description copied from interface: QuestionManager
Returns an iterator for all questions in a forum that pass the specified question filter.

Specified by:
getQuestions in interface QuestionManager
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.