com.ibm.portal.theme.plugin.impl
Class DefaultThemeJspInclude

java.lang.Object
  extended by com.ibm.portal.theme.plugin.impl.DefaultThemeJspInclude
All Implemented Interfaces:
ActiveFlag, Localized, ThemeContentDescriptorConstants, ThemeJspIncludeDescriptorConstants, ThemeContent, ThemeInclude, ThemeJspInclude, org.eclipse.core.runtime.IExecutableExtension

public class DefaultThemeJspInclude
extends java.lang.Object
implements ThemeJspInclude, ThemeJspIncludeDescriptorConstants

The default implementation of ThemeJspInclude. This class provides a method of including a JSP in the theme.

This class may be sub-classed by developers.

Markup Description:

Element name: item

Attributes:

Since:
6.0
Note:
This interface is designed to be implemented by clients.

Field Summary
protected  int ordinal
          the ordinal value for this element
protected  javax.servlet.http.HttpServletRequest request
          the current request
protected  javax.servlet.http.HttpServletResponse response
          the current response
 
Fields inherited from interface com.ibm.portal.theme.plugin.impl.ThemeJspIncludeDescriptorConstants
ELEMENT_NAME, JSP_ATTRIBUTE
 
Fields inherited from interface com.ibm.portal.theme.plugin.impl.ThemeContentDescriptorConstants
CLASS_ATTRIBUTE, DESCR_ATTRIBUTE, ID_ATTRIBUTE, ORDINAL_ATTRIBUTE, TITLE_ATTRIBUTE
 
Constructor Summary
DefaultThemeJspInclude()
           
 
Method Summary
 java.lang.String getDescription(java.util.Locale arg0)
          Returns the description of this object in the given locale.
 java.lang.String getJspPath()
          Retrieve the jsp path to include.
 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.
 void init(ThemeContext context)
          Initializes the ThemeContent object with the current context.
 boolean isActive()
          Returns whether this resource is active or not.
 void render()
          Renders the output for this contribution.
 void setInitializationData(org.eclipse.core.runtime.IConfigurationElement element, java.lang.String arg1, java.lang.Object arg2)
           
 void setOrdinal(int value)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

request

protected javax.servlet.http.HttpServletRequest request
the current request


response

protected javax.servlet.http.HttpServletResponse response
the current response


ordinal

protected int ordinal
the ordinal value for this element

Constructor Detail

DefaultThemeJspInclude

public DefaultThemeJspInclude()
Method Detail

isActive

public boolean isActive()
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

init

public void init(ThemeContext context)
Description copied from interface: ThemeContent
Initializes the ThemeContent object with the current context.

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

render

public void render()
Description copied from interface: ThemeInclude
Renders the output for this contribution.

Specified by:
render in interface ThemeInclude

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

setOrdinal

public void setOrdinal(int value)

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.

setInitializationData

public void setInitializationData(org.eclipse.core.runtime.IConfigurationElement element,
                                  java.lang.String arg1,
                                  java.lang.Object arg2)
                           throws org.eclipse.core.runtime.CoreException
Specified by:
setInitializationData in interface org.eclipse.core.runtime.IExecutableExtension
Throws:
org.eclipse.core.runtime.CoreException

getJspPath

public java.lang.String getJspPath()
Description copied from interface: ThemeJspInclude
Retrieve the jsp path to include.

Specified by:
getJspPath in interface ThemeJspInclude
Returns:
the path to the included jsp