org.oddjob.webapp.model
Class IconRegistry

java.lang.Object
  extended by org.oddjob.webapp.model.IconRegistry

public class IconRegistry
extends Object

A registry of icons so they can be served up to the view. This registry works on the principle that an icon id identifies the same icon for all jobs.

Author:
Rob Gordon.

Constructor Summary
IconRegistry()
           
 
Method Summary
 void register(String iconId, Iconic iconic)
          Register an iconId.
 IconTip retrieve(String iconId)
          Retrieve an IconTip for a given icon id.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IconRegistry

public IconRegistry()
Method Detail

register

public void register(String iconId,
                     Iconic iconic)
Register an iconId. If the icon id isn't registered already, the icon is looked up.

Parameters:
iconId - The iconId.
iconic - The Iconic that can provide the lookup.

retrieve

public IconTip retrieve(String iconId)
Retrieve an IconTip for a given icon id.

Parameters:
iconId - The iconId.
Returns:
The IconTip, null if none exists if nothing is registered for that id.