|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.sun.portal.providers.context.Theme
A Theme is a collection of visual elements to be used when displaying a desktop. For example, channel background color, font face etc. Theme is a global setting (independent of channels) which a user can select from a preset list or customizing to his/her perference. The global preset list of themes is configured by the administrator and it cannot be changed using this API. The custom theme is the theme that each user can manipulate according to his/her perference. The constant CUSTOM_THEME defined in this class is to refer to the custom theme.
Themes are stored as properties accessed through ProviderContext
. This class serves as a wrapper over ProviderContext
to encapsulate the implementation details of theme.
For details of the theme design and steps to configure the global preset themes, please refer to the Desktop Customization Guide and the Administrator's Guide.
ProviderContext
Field Summary | |
static java.lang.String |
CUSTOM_THEME
Constant refering to the custom theme. |
Constructor Summary | |
Theme()
|
Method Summary | |
static java.lang.String |
getAttribute(java.lang.String channel,
ProviderContext pc,
java.lang.String name)
Gets an attribute value of the selected theme. |
static java.lang.String |
getAttribute(java.lang.String channel,
ProviderContext pc,
java.lang.String theme,
java.lang.String name)
Gets an attribute value of a theme. |
static java.lang.String |
getAttribute(java.lang.String channel,
ProviderContext pc,
java.lang.String theme,
java.lang.String name,
java.lang.String def)
Gets an attribute value of a theme, if the attribute is not defined, and a default value is given, then returns the default value. |
static java.util.Collection |
getGlobal(java.lang.String channel,
ProviderContext pc)
Gets the global list of preset theme that is available. |
static java.util.Map |
getMap(java.lang.String channel,
ProviderContext pc,
java.lang.String theme)
Gets the attributes of a theme as a map. |
static java.lang.String |
getSelectedName(java.lang.String channel,
ProviderContext pc)
Gets the theme name to be used for displaying desktop. |
static void |
setCustomAttribute(java.lang.String channel,
ProviderContext pc,
java.lang.String name,
java.lang.String value)
Sets an attribute value of the custom theme. |
static void |
setSelectedName(java.lang.String channel,
ProviderContext pc,
java.lang.String name)
Sets the theme to be used for displaying desktop. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final java.lang.String CUSTOM_THEME
Constructor Detail |
public Theme()
Method Detail |
public static java.lang.String getSelectedName(java.lang.String channel, ProviderContext pc) throws ProviderContextException
ProviderContextException
- if an error occurs in getting the
selected theme name.public static java.util.Collection getGlobal(java.lang.String channel, ProviderContext pc) throws ProviderContextException
ProviderContextException
- if an error occurs in getting the
global theme names.public static java.util.Map getMap(java.lang.String channel, ProviderContext pc, java.lang.String theme) throws ProviderContextException
theme
- Theme name, either one from the preset list or
CUSTOM_THEME
for the custom theme.
ProviderContextException
- if an error occurs in getting the
attributes of the theme.public static java.lang.String getAttribute(java.lang.String channel, ProviderContext pc, java.lang.String theme, java.lang.String name) throws ProviderContextException
theme
- Theme name, either one from the preset list or
CUSTOM_THEME
for the custom theme.name
- Attribute name
ProviderContextException
- if an error occurs getting the attribute, or
the theme is not CUSTOM_THEME
or one in the preset list.public static java.lang.String getAttribute(java.lang.String channel, ProviderContext pc, java.lang.String theme, java.lang.String name, java.lang.String def) throws ProviderContextException
theme
- Theme name, either one from the preset list or
CUSTOM_THEME
for the custom theme.name
- Attribute namedef
- the default value
ProviderContextException
- if an error occurs getting the attribute, or
the theme is not CUSTOM_THEME
or one in the preset list.public static java.lang.String getAttribute(java.lang.String channel, ProviderContext pc, java.lang.String name) throws ProviderContextException
name
- Attribute name
ProviderContextException
- if an error occurs getting the attribute.public static void setCustomAttribute(java.lang.String channel, ProviderContext pc, java.lang.String name, java.lang.String value)
CUSTOM_THEME
name
- Attribute namevalue
- Attribute valuepublic static void setSelectedName(java.lang.String channel, ProviderContext pc, java.lang.String name) throws ProviderContextException
name
- Theme name, either one from the preset list or
CUSTOM_THEME
for the custom theme.
ProviderContextException
- if an error occurs in setting the
selected theme name.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |