org.apache.isis.viewer.scimpi.servlet
Class ImageLookup

java.lang.Object
  extended by org.apache.isis.viewer.scimpi.servlet.ImageLookup

public class ImageLookup
extends Object

ImageLookup provides an efficient way of finding the most suitable image to use. It ensures that an image is always available, providing a default image if needed. All requests are cached to improve performance.


Constructor Summary
ImageLookup()
           
 
Method Summary
static void debug(org.apache.isis.core.commons.debug.DebugString debug)
           
static String imagePath(org.apache.isis.core.metamodel.adapter.ObjectAdapter object, String contextPath)
           
static String imagePath(org.apache.isis.core.metamodel.spec.ObjectSpecification specification, String contextPath)
          For an object, the icon name from the object is return if it is not null, otherwise the specification is used to look up a suitable image name.
static void setImageDirectory(ServletContext context, String imageDirectory)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ImageLookup

public ImageLookup()
Method Detail

setImageDirectory

public static void setImageDirectory(ServletContext context,
                                     String imageDirectory)

debug

public static void debug(org.apache.isis.core.commons.debug.DebugString debug)

imagePath

public static String imagePath(org.apache.isis.core.metamodel.spec.ObjectSpecification specification,
                               String contextPath)
For an object, the icon name from the object is return if it is not null, otherwise the specification is used to look up a suitable image name.

Parameters:
contextPath -
See Also:
ObjectAdapter.getIconName(), #imagePath(ObjectSpecification)

imagePath

public static String imagePath(org.apache.isis.core.metamodel.adapter.ObjectAdapter object,
                               String contextPath)


Copyright © 2010-2012 The Apache Software Foundation. All Rights Reserved.