org.benow.web.theme
Class ThemedImagePathHandler

java.lang.Object
  extended by org.benow.web.path.PathHandler
      extended by org.benow.web.path.FileBasedPathHandler
          extended by org.benow.web.theme.ThemedImagePathHandler

public class ThemedImagePathHandler
extends FileBasedPathHandler

Returns the themed image for an image request. ie if /images/title.png is requested, /images/title.blue.ipod.png might be returned if the 'blue' theme is active for the user on an ipod.

Author:
andy

Field Summary
 
Fields inherited from class org.benow.web.path.FileBasedPathHandler
base
 
Fields inherited from class org.benow.web.path.PathHandler
CONTENT_LENGTH_UNKNOWN, LAST_MODIFIED_UNKNOWN, params, request, response
 
Constructor Summary
ThemedImagePathHandler()
           
 
Method Summary
 boolean canHandle(java.lang.String fileName)
          Return true if the handler can handle the given path.
protected  java.lang.Object handle(java.io.OutputStream out)
           
 
Methods inherited from class org.benow.web.path.FileBasedPathHandler
deliverFile, deliverResource
 
Methods inherited from class org.benow.web.path.PathHandler
deliverHTML, deliverStream, deliverStream, deliverStream, handle, handle, handle
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ThemedImagePathHandler

public ThemedImagePathHandler()
Method Detail

canHandle

public boolean canHandle(java.lang.String fileName)
                  throws WebException
Description copied from class: PathHandler
Return true if the handler can handle the given path. Path is in format /dir/childdir/item.ext. It will never be null and will always start with a /.

Specified by:
canHandle in class PathHandler
Returns:
Throws:
WebException

handle

protected java.lang.Object handle(java.io.OutputStream out)
                           throws java.lang.Exception
Overrides:
handle in class PathHandler
Throws:
java.lang.Exception