Compoze Software, Inc.

com.compoze.discussion
Class ForumType

java.lang.Object
  |
  +--com.compoze.discussion.ForumType
All Implemented Interfaces:
java.io.Serializable

public class ForumType
extends java.lang.Object
implements java.io.Serializable

This class stores the values for the Forum types. There are built-in types such as moderated and unmoderated.

The internationalizable string values are stored in the discussion_resources.properties file (accessed through DiscussionResources) and referenced by their key.

See Also:
Serialized Form

Field Summary
static ForumType MODERATED
          This value represents the 'moderated' forum type.
static int STORE_VALUE_MODERATED
          This value represents a 'moderated' forum type.
static int STORE_VALUE_UNMODERATED
          This value represents an 'unmoderated' forum type.
static ForumType UNMODERATED
          This value represents the 'unmoderated' forum type.
 
Method Summary
 boolean equals(java.lang.Object o)
          Checks for equality.
static ForumType get(int iStoreValue)
          Gets the type by the store value.
static java.util.List getList()
          Gets the list of properties.
 java.lang.String getName()
          Gets the name of the type using the system default locale.
 java.lang.String getName(java.util.Locale locale)
          Gets the name of the type using the specified locale.
 int getStoreValue()
          Gets the value that's used to store the type in the storage system.
 java.lang.String toString()
          Returns a string representation of the object.
 java.lang.String toString(java.util.Locale locale)
          Returns a string representation of the object.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

STORE_VALUE_MODERATED

public static final int STORE_VALUE_MODERATED
This value represents a 'moderated' forum type.
See Also:
MODERATED, getStoreValue()

STORE_VALUE_UNMODERATED

public static final int STORE_VALUE_UNMODERATED
This value represents an 'unmoderated' forum type.
See Also:
UNMODERATED, getStoreValue()

MODERATED

public static final ForumType MODERATED
This value represents the 'moderated' forum type.

UNMODERATED

public static final ForumType UNMODERATED
This value represents the 'unmoderated' forum type.
Method Detail

getName

public java.lang.String getName()
Gets the name of the type using the system default locale.
Returns:
the name

getName

public java.lang.String getName(java.util.Locale locale)
Gets the name of the type using the specified locale.
Parameters:
locale - the locale
Returns:
the name

getStoreValue

public int getStoreValue()
Gets the value that's used to store the type in the storage system.
Returns:
the store value

get

public static ForumType get(int iStoreValue)
Gets the type by the store value.
Parameters:
iStoreValue - the store value
Returns:
the matching type or null if not found

getList

public static java.util.List getList()
Gets the list of properties.
Returns:
the list of ForumTypes (unmodifiable)

equals

public boolean equals(java.lang.Object o)
Checks for equality. The store value is used to determine equality, so that the language the name is represented in is not important.
Overrides:
equals in class java.lang.Object
Parameters:
o - the object to check
Returns:
true if this object has the same store value as the argument, false otherwise

toString

public java.lang.String toString()
Returns a string representation of the object.
Overrides:
toString in class java.lang.Object
Returns:
the string representation of the object

toString

public java.lang.String toString(java.util.Locale locale)
Returns a string representation of the object.
Parameters:
locale - the locale
Returns:
the string representation of the object

Compoze Software, Inc.

Copyright ©1999-2003 Compoze Software, Inc. All rights reserved.