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:
- com.ibm.portal.ActiveFlag, Localized, ThemeContentDescriptorConstants, ThemeItemDescriptorConstants, ThemeContent, ThemeItem, org.eclipse.core.runtime.IExecutableExtension
- 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
|
Method Summary |
java.lang.String |
createIconFilename(java.lang.String icon,
com.ibm.portal.state.accessors.url.PortalResources.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(com.ibm.portal.state.accessors.url.PortalResources.State iconState,
java.lang.String iconValue)
This method concatenates the state onto the front of the icon's filename |
com.ibm.portal.state.accessors.url.PortalResources.State |
getStateValue(java.lang.String s)
This method retrieves the state that should be sent into newIconURL |
com.ibm.portal.state.DisposableURL |
newIconURL(com.ibm.portal.state.accessors.url.PortalResources.State s)
Returns the URL for the associated icon. |
com.ibm.portal.state.EngineURL |
newURL()
|
boolean |
requiresPOST()
|
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 |
Methods inherited from interface com.ibm.portal.ActiveFlag |
isActive |
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
DefaultThemeItem
public DefaultThemeItem()
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
- Overrides:
setInitializationData
in class DefaultThemeContent
- Throws:
org.eclipse.core.runtime.CoreException
newIconURL
public com.ibm.portal.state.DisposableURL newIconURL(com.ibm.portal.state.accessors.url.PortalResources.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 com.ibm.portal.state.EngineURL newURL()
throws com.ibm.portal.state.exceptions.StateException
- Throws:
com.ibm.portal.state.exceptions.StateException
getStateValue
public com.ibm.portal.state.accessors.url.PortalResources.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,
com.ibm.portal.state.accessors.url.PortalResources.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(com.ibm.portal.state.accessors.url.PortalResources.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 tagiconValue
- the filename of the icon
- Returns:
- iconValue