Jive Forums API (5.5.20.2-oracle) Developer Javadocs

com.jivesoftware.base.theme
Class ThemeType

java.lang.Object
  extended by com.jivesoftware.base.theme.ThemeType
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
ForumThemeType

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

A ThemeType is a way to bind a theme to the application. There are various ways to map a theme to the application, such as URL matching. The theme will be determined in order of the ThemeType precedence

See Also:
Serialized Form

Field Summary
static ThemeType GLOBAL
          Type representing a Global map.
static ThemeType LOCALE
          Type representing a Locale map.
protected static ThemeType[] types
          Array containing all ThemeType objects.
static ThemeType URL
          Type representing a URL map.
 
Constructor Summary
ThemeType(java.lang.String name, int precedence)
           
 
Method Summary
static ThemeType fromString(java.lang.String name)
          Loads a ThemeType object from the name of the theme type.
 java.lang.String getI18nKey()
          Returns an i18n key of this theme type for internationalization.
 int getPrecedence()
          Gets the precedence for this theme type.
static ThemeType[] getTypes()
          Returns an array of all theme types, ordered by precedence.
 void setPrecedence(int precedence)
          Sets the precedence for this theme type.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

GLOBAL

public static final ThemeType GLOBAL
Type representing a Global map.


URL

public static final ThemeType URL
Type representing a URL map.


LOCALE

public static final ThemeType LOCALE
Type representing a Locale map.


types

protected static ThemeType[] types
Array containing all ThemeType objects.

Constructor Detail

ThemeType

public ThemeType(java.lang.String name,
                 int precedence)
Method Detail

setPrecedence

public void setPrecedence(int precedence)
Sets the precedence for this theme type. The precedence is the order in which theme maps will be checked when determinding a theme.

Parameters:
precedence - the precedence for this theme type.

getPrecedence

public int getPrecedence()
Gets the precedence for this theme type. The precedence is the order in which theme maps will be checked when determinding a theme.

Returns:
the precedence for this theme type.

toString

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

getI18nKey

public java.lang.String getI18nKey()
Returns an i18n key of this theme type for internationalization. The corresponding key should be available in the jive_forums_admin_i18n.properties file. The key is built using "admin.theme.type.TypeName.label", the the TypeName is the name value for the ThemeType.

Returns:
the i18n key for this theme type, based on the theme name.

fromString

public static ThemeType fromString(java.lang.String name)
Loads a ThemeType object from the name of the theme type.

Parameters:
name - the name of the theme type
Returns:
the ThemeType corresponding to the name.

getTypes

public static ThemeType[] getTypes()
Returns an array of all theme types, ordered by precedence.

Returns:
an array of all theme types, ordered by precedence

Jive Forums Project Page

Copyright © 1999-2006 Jive Software.