|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sf.jasperreports.jsf.context.ExternalContextHelper
public abstract class ExternalContextHelper
Helper class that will provide with utility methods related with the treatment of the faces' ExternalContext.
Field Summary | |
---|---|
protected static int |
BUFFER_SIZE
|
Constructor Summary | |
---|---|
protected |
ExternalContextHelper()
Protected constructor to prevent instantiation. |
Method Summary | |
---|---|
abstract Collection<ContentType> |
getAcceptedContentTypes(javax.faces.context.ExternalContext context)
|
static String |
getPortletVersion()
Obtains the current portlet version in use. |
abstract String |
getRequestServerName(javax.faces.context.ExternalContext context)
Obtains the server name of the current request. |
abstract String |
getRequestURI(javax.faces.context.ExternalContext context)
Gets the request uri. |
abstract String |
getResourceRealPath(javax.faces.context.ExternalContext context,
String name)
Obtains the real path name of the resource local to the current context. |
Map<String,String> |
getViewCacheMap(javax.faces.context.ExternalContext context)
Obtains the view chache map used to restore views which contains report references. |
String |
getViewId(javax.faces.context.ExternalContext context)
Obtains the view identifier associated with the current request. |
static boolean |
isFacesBridgeAvailable()
Detects if the faces bridge is available for this application. |
static boolean |
isPortletAvailable()
Detects if the portlet environment is available for this application. |
static boolean |
isServletContext(javax.faces.context.ExternalContext context)
Detects if working with a servlet context. |
protected static ExternalContextHelper |
newInstance(javax.faces.context.ExternalContext context)
Obtains the application local instance of the ExternalContextHelper. |
abstract ReportRenderRequest |
restoreReportRequest(javax.faces.context.ExternalContext context)
Creates a ReportRenderRequest based on the data code in the
current ExternalContext. |
abstract void |
writeHeaders(javax.faces.context.ExternalContext context,
ReportRenderer renderer,
UIReport report)
Writes the report headers into the current response using the report renderer. |
abstract void |
writeResponse(javax.faces.context.ExternalContext context,
ContentType contentType,
InputStream stream)
Writes the report contents into the context response. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static final int BUFFER_SIZE
Constructor Detail |
---|
protected ExternalContextHelper()
Method Detail |
---|
protected static ExternalContextHelper newInstance(javax.faces.context.ExternalContext context) throws InvalidEnvironmentException
context
- the current ExternalContext
InvalidEnvironmentException
public static boolean isFacesBridgeAvailable()
true
if the faces bridge is available -
false
otherwisepublic static boolean isPortletAvailable()
true
if the Portlet environment is available -
false
otherwisepublic static String getPortletVersion()
public static boolean isServletContext(javax.faces.context.ExternalContext context)
context
- the current ExternalContext
true
if the Portlet context is available -
false
otherwisepublic abstract Collection<ContentType> getAcceptedContentTypes(javax.faces.context.ExternalContext context)
public abstract ReportRenderRequest restoreReportRequest(javax.faces.context.ExternalContext context)
ReportRenderRequest
based on the data code in the
current ExternalContext.
context
- the current ExternalContext
public abstract String getRequestURI(javax.faces.context.ExternalContext context)
context
- the context
public abstract String getRequestServerName(javax.faces.context.ExternalContext context)
context
- the current ExternalContext
public abstract String getResourceRealPath(javax.faces.context.ExternalContext context, String name)
context
- the current ExternalContextname
- the resource name
public final Map<String,String> getViewCacheMap(javax.faces.context.ExternalContext context)
context
- the current ExternalContext
public final String getViewId(javax.faces.context.ExternalContext context)
context
- the current ExternalContext
public abstract void writeHeaders(javax.faces.context.ExternalContext context, ReportRenderer renderer, UIReport report) throws IOException
context
- the current ExternalContextrenderer
- the report renderer instancereport
- the report component instance
IOException
- if any input or output error happens when writing
the report headerspublic abstract void writeResponse(javax.faces.context.ExternalContext context, ContentType contentType, InputStream stream) throws IOException
context
- the contextcontentType
- the content typestream
- source from which read the data
IOException
- Signals that an I/O exception has occurred.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |