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 DefaultThemeItem

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

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

Direct Known Subclasses:
  DefaultThemeLinkItem

    public class DefaultThemeItem

extends DefaultThemeContent
implements ThemeItem

This class will retrieve the icon path for an extension.

Since:
  6.0
Note:

  This interface is designed to be implemented by clients.

Field Summary
`static java.lang.String` | `ICON_NAME_ATTRIBUTE` The `ICON_NAME_ATTRIBUTE` indicates the icon files name that we want to generate a URL to.
`java.lang.String` | `iconName`
`java.lang.String` | `state`

Fields inherited from class com.ibm.portal.theme.plugin.impl.DefaultThemeContent
`context, description, ordinal, title`

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
`DefaultThemeItem()`

Method Summary
`java.lang.String` | `createIconFilename(java.lang.String icon, PortalIcons.State s)` This method is called to process the concatenation of the state to the icon filename
`java.lang.String` | `getIconDirectoryPath(java.lang.String path)` This method will parse the full icon's path and return only the directory path
`java.lang.String` | `getIconFileName(java.lang.String path)` This method will parse the full icon's path and return only the filename
`java.lang.String` | `getIconStateValue(PortalIcons.State iconState, java.lang.String iconValue)` This method concatenates the state onto the front of the icon's filename
`PortalIcons.State` | `getStateValue(java.lang.String s)` This method retrieves the state that should be sent into newIconURL
`DisposableURL` | `newIconURL(PortalIcons.State s)` Returns the URL for the associated icon.
`EngineURL` | `newURL()`
`boolean` | `requiresPOST()`
`void` | `setInitializationData(IConfigurationElement element, java.lang.String arg1, java.lang.Object arg2)`

Methods inherited from class com.ibm.portal.theme.plugin.impl.DefaultThemeContent
`getDescription, getLocales, getOrdinal, getRequest, getResponse, getTitle, getTooltip, init, isActive`

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

Methods inherited from interface com.ibm.portal.theme.plugin.ThemeItem
`getTooltip`

Methods inherited from interface com.ibm.portal.theme.plugin.ThemeContent
`getOrdinal, init`

Methods inherited from interface com.ibm.portal.Localized
`getDescription, getLocales, getTitle`

Field Detail

### state

    public java.lang.String state

### iconName

    public java.lang.String iconName

### ICON_NAME_ATTRIBUTE

    public static final java.lang.String ICON_NAME_ATTRIBUTE

  The `ICON_NAME_ATTRIBUTE` indicates the icon files name that we want to generate a URL to.

  See Also:
    Constant Field Values

Constructor Detail

### DefaultThemeItem

    public DefaultThemeItem()

Method Detail

### setInitializationData

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

  Overrides:
    `setInitializationData` in class `DefaultThemeContent`
  Throws:
    `CoreException`

### newIconURL

    public DisposableURL newIconURL(PortalIcons.State s)

  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`
  Overrides:
    `newIconURL` in class `DefaultThemeContent`
  Parameters:
    `s` - the icon state
  Returns:
    the URL or `null` if the URL cannot be created

### requiresPOST

    public boolean requiresPOST()

### newURL

    public EngineURL newURL()
                     throws StateException

  Throws:
    `StateException`

### getStateValue

    public PortalIcons.State getStateValue(java.lang.String s)

  This method retrieves the state that should be sent into newIconURL

  Parameters:
    `s` - the string retrieved from the state attribute on the tag
  Returns:
    PortalIcons.State

### createIconFilename

    public java.lang.String createIconFilename(java.lang.String icon,
                                               PortalIcons.State s)

  This method is called to process the concatenation of the state to the icon filename

  Parameters:
    `icon` - the icons file path
  Returns:
    fileValue

### getIconFileName

    public java.lang.String getIconFileName(java.lang.String path)

  This method will parse the full icon's path and return only the filename

  Parameters:
    `path` - complete icon path
  Returns:
    filenameValue

### getIconDirectoryPath

    public java.lang.String getIconDirectoryPath(java.lang.String path)

  This method will parse the full icon's path and return only the directory path

  Parameters:
    `path` - full icon's path
  Returns:
    dirPath

### getIconStateValue

    public java.lang.String getIconStateValue(PortalIcons.State iconState,
                                              java.lang.String iconValue)

  This method concatenates the state onto the front of the icon's filename

  Parameters:
    `iconState` - the string retrieved from the state attribute on the tag
    `iconValue` - the filename of the icon
  Returns:
    iconValue

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