com.atlassian.confluence.content
Class DefaultContentType

java.lang.Object
  extended by com.atlassian.confluence.content.DefaultContentType
All Implemented Interfaces:
ContentType

public class DefaultContentType
extends java.lang.Object
implements ContentType

A default immutable implementation of a content type.


Constructor Summary
DefaultContentType(java.lang.String name)
           
DefaultContentType(java.lang.String name, java.lang.String displayName)
           
 
Method Summary
 boolean equals(java.lang.Object obj)
           
 java.lang.String getDisplayName()
          This is the name of the content as it can be displayed on a UI.
 java.lang.String getName()
           Get the name of the content.
 int hashCode()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultContentType

public DefaultContentType(java.lang.String name)

DefaultContentType

public DefaultContentType(java.lang.String name,
                          java.lang.String displayName)
Method Detail

getName

public java.lang.String getName()
Description copied from interface: ContentType

Get the name of the content. This is meant to be a key to access content type and therefore one should be very careful when deciding the name of the content. Implementation should rely on a constant for their name.

The name is what will be used to register the ContentType to any kind of registry.

Specified by:
getName in interface ContentType
Returns:
the name (key) of the content type.

getDisplayName

public java.lang.String getDisplayName()
Description copied from interface: ContentType

This is the name of the content as it can be displayed on a UI. This can also be a key to an i18nized name.

Specified by:
getDisplayName in interface ContentType
Returns:
a human readable name of the content type or a key to an i18nized human readable name of the content type.

equals

public boolean equals(java.lang.Object obj)
Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object


Copyright © 2003-2009 Atlassian Pty Ltd. All Rights Reserved.