|
Jive Forums API (5.5.8) Developer Javadocs | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.jivesoftware.base.theme.Theme
public class Theme
A theme is a way to override the user interface in an application. This class is a simple bean which holds meta information about a theme like name, the decorator (the main theme template) and the locale the theme is tied to. A theme can also contain a set of properties.
| Constructor Summary | |
|---|---|
Theme()
|
|
Theme(java.lang.String name,
java.lang.String decorator,
java.util.Locale locale,
java.util.Properties properties)
|
|
| Method Summary | |
|---|---|
boolean |
getBooleanProperty(java.lang.String name)
Returns the specified property as a boolean or returns false if the property doesn't exist or isn't parseable. |
boolean |
getBooleanProperty(java.lang.String name,
boolean defaultValue)
Returns the specified property as a boolean or returns defaultValue if the property doesn't exist or isn't parseable. |
java.lang.String |
getDecorator()
Gets the name of the decorator file for this theme. |
int |
getIntProperty(java.lang.String name,
int defaultValue)
Returns the specified property as an integer or returns the defaultValue if the property does't exist or the value isn't a number. |
java.util.Locale |
getLocale()
Gets the locale for this theme. |
java.lang.String |
getName()
Gets the name of this theme. |
java.lang.String |
getProperty(java.lang.String name)
Returns the value of the specified property or null if the value doesn't exist. |
java.lang.String |
getProperty(java.lang.String name,
java.lang.String defaultValue)
Returns a theme property. |
java.util.Set |
getPropertyNames()
Returns all theme property names. |
boolean |
validate()
Reutrns true if all required properties (name, decorator) of this theme exist. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Theme()
public Theme(java.lang.String name,
java.lang.String decorator,
java.util.Locale locale,
java.util.Properties properties)
| Method Detail |
|---|
public java.lang.String getDecorator()
ThemeManager will look
for this decorator in /templates/ folder. The decorator is specified in the theme.xml as follows:
public java.lang.String getName()
public java.util.Locale getLocale()
public java.lang.String getProperty(java.lang.String name)
name - the name of the property to return.
public java.lang.String getProperty(java.lang.String name,
java.lang.String defaultValue)
name - the name of the property.defaultValue - value returned if the property doesn't exist.
public java.util.Set getPropertyNames()
public int getIntProperty(java.lang.String name,
int defaultValue)
name - the name of the property.defaultValue - value returned if the property doesn't exist or was not a number.
public boolean getBooleanProperty(java.lang.String name)
name - the name of the property to return.
public boolean getBooleanProperty(java.lang.String name,
boolean defaultValue)
name - the name of the property.defaultValue - value returned if the property doesn't exist.
public boolean validate()
|
Jive Forums Project Page | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||