Clearspace API (1.7.0) Core Javadocs

com.jivesoftware.community
Class Question.State

java.lang.Object
  extended by com.jivesoftware.community.Question.State
All Implemented Interfaces:
java.lang.Comparable<Question.State>
Enclosing interface:
Question

public static class Question.State
extends java.lang.Object
implements java.lang.Comparable<Question.State>

Type-safe enumeration for the state a question is in. Values are:


Field Summary
static Question.State assumed_resolved
          The question is answered, but the question creator has not indicated that the question is resolved.
static Question.State open
          The question is not resolved.
static Question.State possibly_resolved
          There are one or more possible answers to the question.
static Question.State resolved
          The question is answered.
 
Method Summary
 int compareTo(Question.State s)
           
 int getCode()
          Returns the integer code associated with the state.
 java.lang.String toString()
           
static Question.State valueOf(int code)
          Returns the State associated with the specified integer code.
static Question.State valueOf(java.lang.String state)
          Returns the State associated with the specified String value.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

open

public static final Question.State open
The question is not resolved.


possibly_resolved

public static final Question.State possibly_resolved
There are one or more possible answers to the question. The question creator should mark the question as resolved or still open.


assumed_resolved

public static final Question.State assumed_resolved
The question is answered, but the question creator has not indicated that the question is resolved. This might happen when a support agent posts a definitive answer for the question. Or, when the question creator fails to mark the question as resolved and a moderator wants to indicate that the question is resolved.


resolved

public static final Question.State resolved
The question is answered. Only the question creator can set the question state to this value.

Method Detail

valueOf

public static Question.State valueOf(java.lang.String state)
Returns the State associated with the specified String value.

Parameters:
state - the State's String value.
Returns:
the State corresponding to the String value.

valueOf

public static Question.State valueOf(int code)
Returns the State associated with the specified integer code.

Parameters:
code - the State's code value.
Returns:
the State corresponding to the integer code value.

getCode

public int getCode()
Returns the integer code associated with the state. This is useful for persisting the state to the database.

Returns:
the code.

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

compareTo

public int compareTo(Question.State s)
Specified by:
compareTo in interface java.lang.Comparable<Question.State>

Clearspace Project Page

Copyright © 1999-2007 Jive Software.