|
Oracle Fusion Middleware Java API Reference for Oracle ADF Share 11g Release 1 (11.1.1.6.0) E10686-07 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface JSPProviderHelper
Use this interface to delegate the locating and loading of jsp resources away from the jsp servlet to any arbitrary provider class (one of more). Configuration: Use the webapp context-param name "oracle.adf.jsp.provider.N" (where "N" is an integer, 0-n) and the value is the provider class name, to identify the implementing classes to load at startup. Provider classes are called in "N" order in terms of arbitration for the incoming requestURI. Lifecycle: each provider class will be instantiated once per servlet context, and the init method called, passing the context (and the Hashtable of params from the jsp servlet?). If the servlet context is unloaded the destroy will be called, giving each provider a chance to cleanup. Processing: The main point of this interface is to allow alternate ways to load jsp resources. A provider signifies that it "owns" a resource by returning a non-null string from getProviderURI. Once the providerURI is achieved, it will always be passed back to the provider when either the lastModified time or the inputStream associated with the resource is needed by the jsp servlet. The "transformed" URI returned from the above must either be unchanged from the input value (see explanation below), or it must have a new path element prefix. The caller of getProviderURI will use the first path element to designate the unique prefix supported by the provider. This is similar to the way the servlet container maps servlets. Known prefixes at this time are "/adflib", and "/mdssys". Processing Note: It is possible for a provider to return the input parameter unchanged in getProviderURI. This does two things: it stops the querying of providers; and it indicates that the provider wishes to "get a crack" at handling any request where a specific provider doesn't claim a reqource. In essence the provider becomes a wildcard or fallback provider from that point forward. There is currently no way to reverse that designation, once set. Note: Get the current ADFContext by calling it's getCurrent static method.
Method Summary | |
---|---|
void |
destroy()
Called during the servlet context destroy to allow cleanup. |
java.io.InputStream |
fromStream(java.lang.String providerURI)
Return the input stream for the providerURI. |
long |
getLastModified(java.lang.String providerURI,
javax.servlet.http.HttpServletRequest request)
Return the lastModified time for the providerURI, or 0. |
java.lang.String |
getProviderURI(java.lang.String requestURI)
Allows the provider to take ownership of the requestURI by returning a non-null string. |
void |
init(javax.servlet.ServletContext sc,
java.util.Hashtable initParams)
Called immediately after the constructor when the jsp servlet initializes. |
Method Detail |
---|
void init(javax.servlet.ServletContext sc, java.util.Hashtable initParams)
sc
- The ServletContext for the current webapp.initParams
- The params from the jsp servlet - may remove this?void destroy()
java.lang.String getProviderURI(java.lang.String requestURI)
requestURI
- The UTF-8 decoded value from the incoming request.
long getLastModified(java.lang.String providerURI, javax.servlet.http.HttpServletRequest request) throws java.io.FileNotFoundException, java.io.IOException
providerURI
- The value returned from getProviderURIrequest
- The current servlet request (may be null in rare circumstances)
java.io.FileNotFoundException
java.io.IOException
java.io.File.lastModified()
java.io.InputStream fromStream(java.lang.String providerURI) throws java.io.FileNotFoundException, java.io.IOException
providerURI
-
java.io.FileNotFoundException
java.io.IOException
|
Oracle Fusion Middleware Java API Reference for Oracle ADF Share 11g Release 1 (11.1.1.6.0) E10686-07 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |