Oracle Fusion Middleware extensions for Applications Core API Reference
11g Release 1 (11.1.2)

E22562-02

oracle.apps.fnd.applcore.globalSearch.ui
Class IconUtils

java.lang.Object
  extended by oracle.apps.fnd.applcore.globalSearch.ui.IconUtils

public final class IconUtils
extends java.lang.Object

Icon utilities.


Method Summary
static java.lang.String getIconPath(java.lang.String mimeType, java.lang.String resourceName)
          Gets the icon path given a service ID, a resource type (usually a mime type) and a resource name.
static java.lang.String toWCIconPath(java.lang.String wcServiceId)
          Generate an icon path to the given Web Center service, as passed by the wc_serviceId search parameter.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getIconPath

public static final java.lang.String getIconPath(java.lang.String mimeType,
                                                 java.lang.String resourceName)
Gets the icon path given a service ID, a resource type (usually a mime type) and a resource name. The order of the logic is:
  1. Mime Type: This overrides anything and if a match is found it is returned
  2. Resource Type Prefix: If we take the prefix in the mime type (i.e. before the '/' and find a match, we'll take it too.
  3. Resource Name: If the extension match is found, return it.
  4. All else fails, return the text icon.

Parameters:
mimeType - this allows us to lookup an icon path in a pre-built map based on the mime type.
resourceName - based off of the extension, deduce what type of file it is, and therefore what icon to show.
Returns:
a String to be used in an af:image.

toWCIconPath

public static java.lang.String toWCIconPath(java.lang.String wcServiceId)
Generate an icon path to the given Web Center service, as passed by the wc_serviceId search parameter.

Parameters:
wcServiceId - web center service id.
Returns:
offset to icon, null if cannot work it out (i.e. no icon).

Oracle Fusion Middleware extensions for Applications Core API Reference
11g Release 1 (11.1.2)

E22562-02

Copyright © 2011 Oracle. All Rights Reserved.