blackboard.base
Class FormattedText.Type

java.lang.Object
  extended by blackboard.base.BbEnum
      extended by blackboard.base.FormattedText.Type
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable
Enclosing class:
FormattedText

public static final class FormattedText.Type
extends BbEnum

Enumeration class to specify possible text formats. The format does not affect the storage of the data; only rendering.

See Also:
Serialized Form

Field Summary
static FormattedText.Type DEFAULT
          Value used when not specifically identified.
static FormattedText.Type HTML
          Treat text as "literal HTML" with no character conversions
static FormattedText.Type PLAIN_TEXT
          Treat text as unformatted; HTML characters will be entity escaped at render time.
static FormattedText.Type SMART_TEXT
          Treat text as "literal HTML", but with additional behaviors; at render-time, single newline characters will be translated to <BR> and double newline characters will be translated to <P>.
 
Method Summary
static FormattedText.Type fromExternalString(java.lang.String externalString)
          Returns the FormattedText.Type element specified by the externalString.
static FormattedText.Type fromFieldName(java.lang.String fieldName)
          Returns the FormattedText.Type element specified by the fieldName.
static FormattedText.Type[] getValues()
          Returns an array of all of the elements in this enumeration.
 
Methods inherited from class blackboard.base.BbEnum
compareTo, defineAlias, defineDefault, fromExternalString, fromFieldName, fromFieldName, getDefaultElement, getValues, isDefault, readResolve, toExternalString, toFieldName, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

HTML

public static final FormattedText.Type HTML
Treat text as "literal HTML" with no character conversions


PLAIN_TEXT

public static final FormattedText.Type PLAIN_TEXT
Treat text as unformatted; HTML characters will be entity escaped at render time.


SMART_TEXT

public static final FormattedText.Type SMART_TEXT
Treat text as "literal HTML", but with additional behaviors; at render-time, single newline characters will be translated to <BR> and double newline characters will be translated to <P>.


DEFAULT

public static final FormattedText.Type DEFAULT
Value used when not specifically identified. Value is SMART.

Method Detail

getValues

public static FormattedText.Type[] getValues()
Returns an array of all of the elements in this enumeration.


fromExternalString

public static FormattedText.Type fromExternalString(java.lang.String externalString)
                                             throws java.lang.IllegalArgumentException
Returns the FormattedText.Type element specified by the externalString.

Throws:
java.lang.IllegalArgumentException - if the given string is not an external representation of one of the elements in this enumeration class.

fromFieldName

public static FormattedText.Type fromFieldName(java.lang.String fieldName)
                                        throws java.lang.IllegalArgumentException
Returns the FormattedText.Type element specified by the fieldName.

Throws:
java.lang.IllegalArgumentException - if the given string is not a short representation of one of the elements in this enumeration class.


Copyright © 2003 Blackboard, Inc. All Rights Reserved.