net.sf.jasperreports.jsf.resource
Class ContextResource

java.lang.Object
  extended by net.sf.jasperreports.jsf.resource.ContextResource
All Implemented Interfaces:
Resource

public final class ContextResource
extends Object
implements Resource

The Class ContextResourceLoader.


Constructor Summary
protected ContextResource(String name)
          Instantiates a new context resource loader.
 
Method Summary
protected  javax.faces.context.FacesContext getFacesContext()
           
 InputStream getInputStream()
          Obtains an InputStream which can be used to read the resource data.
protected  JRFacesContext getJRFacesContext()
           
 URL getLocation()
          Obtains the URL location of this resource.
 String getName()
          Name of the resource.
 String getPath()
          The path part of the resource.
 String getSimpleName()
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ContextResource

protected ContextResource(String name)
Instantiates a new context resource loader.

Parameters:
name - the resource name
Method Detail

getName

public String getName()
Description copied from interface: Resource
Name of the resource.

Specified by:
getName in interface Resource

getSimpleName

public String getSimpleName()
Specified by:
getSimpleName in interface Resource

getLocation

public URL getLocation()
                throws MalformedURLException
Description copied from interface: Resource
Obtains the URL location of this resource.

Specified by:
getLocation in interface Resource
Returns:
The location of the resource
Throws:
MalformedURLException

getInputStream

public InputStream getInputStream()
Description copied from interface: Resource
Obtains an InputStream which can be used to read the resource data.

Users of this stream are responsible of closing it

Specified by:
getInputStream in interface Resource
Returns:
An InputStream to read the resource data

getPath

public String getPath()
Description copied from interface: Resource
The path part of the resource.

Specified by:
getPath in interface Resource
Returns:
the absolute path to the resource.

toString

public String toString()
Overrides:
toString in class Object

getFacesContext

protected javax.faces.context.FacesContext getFacesContext()

getJRFacesContext

protected JRFacesContext getJRFacesContext()


Copyright © 2011 SourceForge.net. All Rights Reserved.