Overview | Package | Class | Tree | Serialized | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.ibm.portal.theme.plugin.impl
Class DefaultThemeContent

    java.lang.Object
      com.ibm.portal.theme.plugin.impl.DefaultThemeContent

All Implemented Interfaces:
  Localized, ThemeContentDescriptorConstants, ThemeItemDescriptorConstants, ThemeContent, ThemeItem

Direct Known Subclasses:
  DefaultThemeItem, DefaultThemeTextItem

    public class DefaultThemeContent

extends java.lang.Object
implements ThemeItem, ThemeItemDescriptorConstants

The default implementation of `ThemeContent`. This class provides access to the default properties.

This class may be sub-classed by developers.

Since:
  6.0
Note:

  This interface is designed to be implemented by clients.

Field Summary
`protected ThemeContext` | `context` `context` the ThemeContext
`protected java.lang.String` | `description` `description` the description of the extension; usually specified in the plugin.xml
`protected int` | `ordinal` `ordinal` used to determine rendering order
`protected java.lang.String` | `title` `title` the title of the extension; usually specified in the plugin.xml

Fields inherited from interface com.ibm.portal.theme.plugin.impl.ThemeItemDescriptorConstants
`ELEMENT_NAME, TOOLTIP_ATTRIBUTE`

Fields inherited from interface com.ibm.portal.theme.plugin.impl.ThemeContentDescriptorConstants
`CLASS_ATTRIBUTE, DESCR_ATTRIBUTE, ID_ATTRIBUTE, ORDINAL_ATTRIBUTE, TITLE_ATTRIBUTE`

Constructor Summary
`DefaultThemeContent()`

Method Summary
`java.lang.String` | `getDescription(java.util.Locale arg0)` Returns the description of this object in the given locale.
`ListModel` | `getLocales()` Returns a list model containing the locales that are supported by this object.
`int` | `getOrdinal()` Gets the ordinal value.
`HttpServletRequest` | `getRequest()`
`HttpServletResponse` | `getResponse()`
`java.lang.String` | `getTitle(java.util.Locale arg0)` Returns the title of this object in the given locale.
`java.lang.String` | `getTooltip(java.util.Locale locale)` Returns the tooltip text for the current locale.
`void` | `init(ThemeContext aContext)` Initializes the `ThemeContent` object with the current context.
`boolean` | `isActive()`
`DisposableURL` | `newIconURL(State state)` Returns the URL for the associated icon.
`void` | `setInitializationData(IConfigurationElement element, java.lang.String arg1, java.lang.Object arg2)`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### ordinal

    protected int ordinal

  `ordinal` used to determine rendering order

### title

    protected java.lang.String title

  `title` the title of the extension; usually specified in the plugin.xml

### description

    protected java.lang.String description

  `description` the description of the extension; usually specified in the plugin.xml

### context

    protected ThemeContext context

  `context` the ThemeContext

Constructor Detail

### DefaultThemeContent

    public DefaultThemeContent()

Method Detail

### getOrdinal

    public int getOrdinal()

  Description copied from interface: `ThemeContent`
  Gets the ordinal value. If no value has been specified, this method should return -1. The lower the value of the ordinal, the higher the priority.

  Specified by:
    `getOrdinal` in interface `ThemeContent`
  Returns:
    the ordinal value or -1 as a default value

### init

    public void init(ThemeContext aContext)

  Description copied from interface: `ThemeContent`
  Initializes the `ThemeContent` object with the current context.

  Specified by:
    `init` in interface `ThemeContent`
  Parameters:
    `aContext` - the initialized current context

### getRequest

    public HttpServletRequest getRequest()

### getResponse

    public HttpServletResponse getResponse()

### getDescription

    public java.lang.String getDescription(java.util.Locale arg0)

  Description copied from interface: `Localized`
  Returns the description of this object in the given locale.

  Specified by:
    `getDescription` in interface `Localized`
  Parameters:
    `arg0` - the locale for which to retrieve the description, must not be `null`.
  Returns:
    the description of this node in the given locale. If a description is not available in the given locale, this method will return `null`. It is up to the invoker of the method to implement an appropriate fallback mechanism

### getLocales

    public ListModel getLocales()

  Description copied from interface: `Localized`
  Returns a list model containing the locales that are supported by this object. The presence of a locale in this list does not mean that a title and description is available, but rather that either one or both are available in that locale.

  Specified by:
    `getLocales` in interface `Localized`
  Returns:
    a list of locales defined for this object, returns an empty `ListModel` if no locales are supported.

### getTitle

    public java.lang.String getTitle(java.util.Locale arg0)

  Description copied from interface: `Localized`
  Returns the title of this object in the given locale.

  Specified by:
    `getTitle` in interface `Localized`
  Parameters:
    `arg0` - the locale for which to retrieve the title, must not be `null`.
  Returns:
    the title of this node in the given locale. If a title is not available in the given locale, this method will return `null`. It is up to the invoker of the method to implement an appropriate fallback mechanism.

### getTooltip

    public java.lang.String getTooltip(java.util.Locale locale)

  Description copied from interface: `ThemeItem`
  Returns the tooltip text for the current locale. Returns `null` if the tooltip text doesn't exist for the specified locale or if an error occurs.

  Specified by:
    `getTooltip` in interface `ThemeItem`
  Parameters:
    `locale` - the current locale
  Returns:
    the tooltip text or `null`

### newIconURL

    public DisposableURL newIconURL(State state)

  Description copied from interface: `ThemeItem`
  Returns the URL for the associated icon. If the URL cannot be created or does not exist, a `null` value is returned.

  Specified by:
    `newIconURL` in interface `ThemeItem`
  Parameters:
    `state` - the icon state
  Returns:
    the URL or `null` if the URL cannot be created

### isActive

    public boolean isActive()
                     throws ModelException

  Throws:
    `ModelException`

### setInitializationData

    public void setInitializationData(IConfigurationElement element,
                                      java.lang.String arg1,
                                      java.lang.Object arg2)
                               throws CoreException

  Throws:
    `CoreException`

Overview | Package | Class | Tree | Serialized | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD