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:
- ActiveFlag, 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
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
|
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(IConfigurationElement element,
java.lang.String arg1,
java.lang.Object arg2)
throws CoreException
- Overrides:
- setInitializationData in class DefaultThemeContent
- Throws:
- CoreException
newIconURL
public DisposableURL newIconURL(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 EngineURL newURL()
throws StateException
- Throws:
- StateException
getStateValue
public 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,
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(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 tag
- iconValue - the filename of the icon
- Returns:
- iconValue