org.apache.myfaces.custom.stylesheet
Class TextResourceFilter

java.lang.Object
  extended by org.apache.myfaces.custom.stylesheet.TextResourceFilter
All Implemented Interfaces:
java.io.Serializable

public class TextResourceFilter
extends java.lang.Object
implements java.io.Serializable

filters a stylesheet

This will replace any el expressing of the original stylesheet with its evaluated string form

Author:
imario
See Also:
Serialized Form

Nested Class Summary
static class TextResourceFilter.ResourceInfo
           
 
Constructor Summary
protected TextResourceFilter()
           
 
Method Summary
protected static TextResourceFilter create()
           
 TextResourceFilter.ResourceInfo getFilteredResource(java.lang.String path)
          gets the filtered content of the resource pointing to with path This will not filter the resource if its not already done before.
static TextResourceFilter getInstance(javax.faces.context.FacesContext context)
          get the application stylesheet filter
static TextResourceFilter getInstance(javax.servlet.ServletContext context)
          get the application stylesheet filter
 TextResourceFilter.ResourceInfo getOrCreateFilteredResource(javax.faces.context.FacesContext context, java.lang.String path)
           filteres the resource
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TextResourceFilter

protected TextResourceFilter()
Method Detail

create

protected static TextResourceFilter create()

getInstance

public static TextResourceFilter getInstance(javax.servlet.ServletContext context)
get the application stylesheet filter


getInstance

public static TextResourceFilter getInstance(javax.faces.context.FacesContext context)
get the application stylesheet filter


getFilteredResource

public TextResourceFilter.ResourceInfo getFilteredResource(java.lang.String path)
gets the filtered content of the resource pointing to with path This will not filter the resource if its not already done before.


getOrCreateFilteredResource

public TextResourceFilter.ResourceInfo getOrCreateFilteredResource(javax.faces.context.FacesContext context,
                                                                   java.lang.String path)
                                                            throws java.io.IOException

filteres the resource

Notice: This method is not synchronized for performance reasons (the map is) the worst case is that we filter a resource twice the first time wich is not a problem

Throws:
java.io.IOException


Copyright © 2009. All Rights Reserved.