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 DefaultThemeLinkItem

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

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

    public class DefaultThemeLinkItem

extends DefaultThemeItem
implements ThemeLinkItem

Creates a link to a portal page. This extension will parse the plugin.xml and create a link to the specified content node.

This class may be sub-classed by developers.

Markup description:

Element name: item

Attributes:

- id
- class
- ordinal
- title
- description
- tooltip
- contentNode
- useNewWindow

Since:
  6.0
Note:

  This interface is designed to be implemented by clients.

Field Summary
`static java.lang.String` | `CONTENT_NODE_ATTRIBUTE` The `CONTENT_NODE_ATTRIBUTE` indicates the content node in the navigation model that we want to generate a URL to.
`static java.lang.String` | `NEW_WINDOW_ATTRIBUTE` The `NEW_WINDOW_ATTRIBUTE` indicates whether the url should be opened in a new window or not.

Fields inherited from class com.ibm.portal.theme.plugin.impl.DefaultThemeItem
`ICON_NAME_ATTRIBUTE, iconName, 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
`DefaultThemeLinkItem()`

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.
`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.
`boolean` | `isActive()`
`boolean` | `isNewWindow()` Indicates if the URL should be opened in a new browser window or not.
`EngineURL` | `newURL()` Returns the generated URL.
`boolean` | `requiresPOST()` If the URL is an action, it should be rendered as a FORM POST instead of the usual GET.
`void` | `setInitializationData(IConfigurationElement element, java.lang.String arg1, java.lang.Object arg2)`

Methods inherited from class com.ibm.portal.theme.plugin.impl.DefaultThemeItem
`createIconFilename, getIconDirectoryPath, getIconFileName, getIconStateValue, getStateValue, newIconURL`

Methods inherited from class com.ibm.portal.theme.plugin.impl.DefaultThemeContent
`getRequest, getResponse, init`

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
`newIconURL`

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

Field Detail

### CONTENT_NODE_ATTRIBUTE

    public static final java.lang.String CONTENT_NODE_ATTRIBUTE

  The `CONTENT_NODE_ATTRIBUTE` indicates the content node in the navigation model that we want to generate a URL to.

  See Also:
    Constant Field Values

### NEW_WINDOW_ATTRIBUTE

    public static final java.lang.String NEW_WINDOW_ATTRIBUTE

  The `NEW_WINDOW_ATTRIBUTE` indicates whether the url should be opened in a new window or not.

  See Also:
    Constant Field Values

Constructor Detail

### DefaultThemeLinkItem

    public DefaultThemeLinkItem()

Method Detail

### setInitializationData

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

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

### newURL

    public EngineURL newURL()
                     throws StateException

  Description copied from interface: `ThemeLinkItem`
  Returns the generated URL. If the user is not allowed access to the resource provided by the URL, a `null` value is returned.

  Specified by:
    `newURL` in interface `ThemeLinkItem`
  Overrides:
    `newURL` in class `DefaultThemeItem`
  Returns:
    the URL or `null`
  Throws:
    `StateException` - if an error occurs creating the URL

### 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`
  Overrides:
    `getTitle` in class `DefaultThemeContent`
  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.

### 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`
  Overrides:
    `getDescription` in class `DefaultThemeContent`
  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`
  Overrides:
    `getLocales` in class `DefaultThemeContent`
  Returns:
    a list of locales defined for this object, returns an empty `ListModel` if no locales are supported.

### 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`
  Overrides:
    `getTooltip` in class `DefaultThemeContent`
  Parameters:
    `locale` - the current locale
  Returns:
    the tooltip text or `null`

### requiresPOST

    public boolean requiresPOST()

  Description copied from interface: `ThemeLinkItem`
  If the URL is an action, it should be rendered as a FORM POST instead of the usual GET.

  Specified by:
    `requiresPOST` in interface `ThemeLinkItem`
  Overrides:
    `requiresPOST` in class `DefaultThemeItem`
  Returns:
    `true` if the URL is an action

### 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`
  Overrides:
    `getOrdinal` in class `DefaultThemeContent`
  Returns:
    the ordinal value or -1 as a default value

### isNewWindow

    public boolean isNewWindow()

  Description copied from interface: `ThemeLinkItem`
  Indicates if the URL should be opened in a new browser window or not.

  Specified by:
    `isNewWindow` in interface `ThemeLinkItem`
  Returns:
    `true` if the URL should be opened in a new window

### isActive

    public boolean isActive()
                     throws ModelException

  Overrides:
    `isActive` in class `DefaultThemeContent`
  Throws:
    `ModelException`

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