com.atlassian.confluence.core
Class BodyType

java.lang.Object
  extended by com.atlassian.confluence.core.BodyType
All Implemented Interfaces:
Serializable, net.sf.hibernate.PersistentEnum

public class BodyType
extends Object
implements Serializable, net.sf.hibernate.PersistentEnum

BodyType is not an enum because ultimately there may not be a fixed set of BodyType. It could become a plugin point in the future.

See Also:
Serialized Form

Field Summary
static BodyType MAIL
          Deprecated. since 4.2 and removal of Mail as core content type
static BodyType RAW
          Body is raw character data (will not be rendered for display)
static BodyType WIKI
          Body is legacy wiki markup (will be auto-converted to XHTML)
static BodyType XHTML
          Body is XHTML storage format
 
Constructor Summary
BodyType(int id)
           
 
Method Summary
 boolean equals(Object obj)
           
static BodyType fromInt(int id)
          Static method required by the PersistentEnum definition.
 int hashCode()
           
 int toInt()
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

WIKI

public static final BodyType WIKI
Body is legacy wiki markup (will be auto-converted to XHTML)


RAW

public static final BodyType RAW
Body is raw character data (will not be rendered for display)


XHTML

public static final BodyType XHTML
Body is XHTML storage format


MAIL

public static final BodyType MAIL
Deprecated. since 4.2 and removal of Mail as core content type
Legacy BodyType for Mail objects (behaves the same as BodyType.RAW)

Constructor Detail

BodyType

public BodyType(int id)
Method Detail

toInt

public int toInt()
Specified by:
toInt in interface net.sf.hibernate.PersistentEnum

fromInt

public static BodyType fromInt(int id)
Static method required by the PersistentEnum definition.

Will throw a RuntimeException if the ID specified is not known.

Parameters:
id - Id of the BodyType to resolve.
Returns:
An instance of BodyType for the ID specified.

toString

public String toString()
Overrides:
toString in class Object

equals

public boolean equals(Object obj)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object


Copyright © 2003-2013 Atlassian. All Rights Reserved.