PREV CLASS NEXT CLASS
Tree SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD com.ibm.portal.theme.plugin.impl
Class DefaultThemeContentjava.lang.Objectcom.ibm.portal.theme.plugin.impl.DefaultThemeContent
- All Implemented Interfaces:
- ActiveFlag, Localized, ThemeContentDescriptorConstants, ThemeItemDescriptorConstants, ThemeContent, ThemeItem, org.eclipse.core.runtime.IExecutableExtension
- 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 ThemeContextprotected java.lang.String description
description the description of the extension; usually specified in the plugin.xmlprotected int ordinal
ordinal used to determine rendering orderprotected 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)
Return the description of this object in the given locale.ListModel getLocales()
Return a list model containing the locales that are supported by this object.int getOrdinal()
Gets the ordinal value.javax.servlet.http.HttpServletRequest getRequest()
javax.servlet.http.HttpServletResponse getResponse()
java.lang.String getTitle(java.util.Locale arg0)
Return the title of this object in the given locale.java.lang.String getTooltip(java.util.Locale locale)
Return the tooltip text for the current locale.void init(ThemeContext aContext)
Initializes the ThemeContent object with the current context.boolean isActive()
Returns whether this resource is active or not.DisposableURL newIconURL(PortalResources.State state)
Return the URL for the associated icon.void setInitializationData(org.eclipse.core.runtime.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 javax.servlet.http.HttpServletRequest getRequest()
getResponse
public javax.servlet.http.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(PortalResources.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
- Description copied from interface: ActiveFlag
- Returns whether this resource is active or not.
- Specified by:
- isActive in interface ActiveFlag
- Returns:
- true if the resource is active, false otherwise
- Throws:
- ModelException - in case the flag cannot be retrieved.
setInitializationData
public void setInitializationData(org.eclipse.core.runtime.IConfigurationElement element, java.lang.String arg1, java.lang.Object arg2) throws org.eclipse.core.runtime.CoreExceptionPREV CLASS NEXT CLASS
- Specified by:
- setInitializationData in interface org.eclipse.core.runtime.IExecutableExtension
- Throws:
- org.eclipse.core.runtime.CoreException
Tree SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD