|
Jive Forums API (5.5.8) Developer Javadocs | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.jivesoftware.forum.database.DbQuestionManager
public class DbQuestionManager
Implementation of the QuestionManager interface.
| Field Summary | |
|---|---|
protected static QuestionFilter |
DEFAULT_FILTER
|
| Constructor Summary | |
|---|---|
protected |
DbQuestionManager()
|
| Method Summary | |
|---|---|
Question |
createQuestion(ForumThread thread)
Creates a new question. |
void |
deleteQuestion(Question question)
Deletes an existing question. |
void |
destroy()
Notifies the manager to release any resources that may be holding on too. |
int |
getHelpfulAnswersPerThread()
Returns the number of helpful answers allowed per question. |
static DbQuestionManager |
getInstance()
|
Question |
getQuestion(ForumThread thread)
Returns the question associated with a thread. |
Question |
getQuestion(long threadID)
|
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. |
protected CachedPreparedStatement |
getQuestionListSQL(int objectType,
long objectID,
QuestionFilter questionFilter,
boolean countQuery)
Returns the SQL statement corresponding to a QuestionFilter for questions. |
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 |
initialize()
Initialize the manager. |
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 |
| Field Detail |
|---|
protected static final QuestionFilter DEFAULT_FILTER
| Constructor Detail |
|---|
protected DbQuestionManager()
| Method Detail |
|---|
public static DbQuestionManager getInstance()
public void initialize()
JiveManagerThis method is used internally by Jive during application startup and should not be called during normal usage of the class.
initialize in interface JiveManagerpublic void destroy()
JiveManager
destroy in interface JiveManagerpublic int getHelpfulAnswersPerThread()
QuestionManager
getHelpfulAnswersPerThread in interface QuestionManagerpublic void setHelpfulAnswersPerThread(int count)
QuestionManager
setHelpfulAnswersPerThread in interface QuestionManagercount - the number of helpful answers allowed per thread.
public Question getQuestion(ForumThread thread)
throws NotFoundException
QuestionManager
getQuestion in interface QuestionManagerthread - the thread.
NotFoundException - if the question for the thread could not be found.
public Question getQuestion(long threadID)
throws NotFoundException
NotFoundExceptionpublic boolean hasQuestion(ForumThread thread)
QuestionManager
hasQuestion in interface QuestionManagerthread - the thread.
public Question createQuestion(ForumThread thread)
throws UnauthorizedException
QuestionManager
createQuestion in interface QuestionManagerthread - the thread the question is associated with.
UnauthorizedExceptionpublic void deleteQuestion(Question question)
QuestionManager
deleteQuestion in interface QuestionManagerquestion - the question.public int getQuestionCount()
QuestionManager
getQuestionCount in interface QuestionManagerpublic int getQuestionCount(QuestionFilter questionFilter)
QuestionManager
getQuestionCount in interface QuestionManagerquestionFilter - the question filter.
public int getQuestionCount(ForumCategory category)
QuestionManager
getQuestionCount in interface QuestionManagercategory - the category.
public int getQuestionCount(ForumCategory category,
QuestionFilter questionFilter)
QuestionManager
getQuestionCount in interface QuestionManagercategory - the category.questionFilter - the question filter.
public int getQuestionCount(Forum forum)
QuestionManager
getQuestionCount in interface QuestionManagerforum - the forum.
public int getQuestionCount(Forum forum,
QuestionFilter questionFilter)
QuestionManager
getQuestionCount in interface QuestionManagerforum - the forum.questionFilter - the question filter.
public java.util.Iterator getQuestions()
QuestionManager
getQuestions in interface QuestionManagerpublic java.util.Iterator getQuestions(QuestionFilter questionFilter)
QuestionManager
getQuestions in interface QuestionManagerquestionFilter - the question filter.
public java.util.Iterator getQuestions(ForumCategory category)
QuestionManager
getQuestions in interface QuestionManagercategory - the category.
public java.util.Iterator getQuestions(ForumCategory category,
QuestionFilter questionFilter)
QuestionManager
getQuestions in interface QuestionManagercategory - the category.questionFilter - the question filter.
public java.util.Iterator getQuestions(Forum forum)
QuestionManager
getQuestions in interface QuestionManagerforum - the forum.
public java.util.Iterator getQuestions(Forum forum,
QuestionFilter questionFilter)
QuestionManager
getQuestions in interface QuestionManagerforum - the forum.questionFilter - the question filter.
protected CachedPreparedStatement getQuestionListSQL(int objectType,
long objectID,
QuestionFilter questionFilter,
boolean countQuery)
objectType - forum or categoryobjectID - the ID of the objectquestionFilter - a question filtercountQuery - true for a count query
|
Jive Forums Project Page | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||