oracle.adf.model.servlet
Class ADFBindingFilter
java.lang.Object
oracle.adf.model.servlet.ADFBindingFilter
- All Implemented Interfaces:
- javax.servlet.Filter
- public class ADFBindingFilter
- extends java.lang.Object
- implements javax.servlet.Filter
The ADFBindingFilter is used to pre-process any http requests to resources that may require access to the ADF runtime. It is responsible for: - Initializing the Binding Context for a user's http session. - Serializing all incoming http requests within a session. - Notifying data control instances that a request is about to be served. - Notifying data control instances after the response has been served to the client.
| Method Summary |
void |
destroy()
Cleans up any applications-specific resources that where allocated. |
void |
doFilter(javax.servlet.ServletRequest request, javax.servlet.ServletResponse response, javax.servlet.FilterChain chain)
The main filter function. |
void |
init(javax.servlet.FilterConfig filterConfig)
initializes the servlet by retrieving the 'encoding' parameter and saving it's value for subsequent use. |
static oracle.adf.model.BindingContext |
initializeBindingContext(javax.servlet.http.HttpServletRequest request)
Initalizes the binding context by reading the CPX file defined by the 'CpxFileName' init parameter. |
protected boolean |
isPageViewable(oracle.adf.model.BindingContext bindingCtx, javax.servlet.http.HttpSession session, javax.servlet.ServletRequest servletRequest)
Return true if there no RegionBinding associated with this page or if the page is viewable based on the RegionBinding info. |
protected void |
processEncoding(javax.servlet.ServletRequest srequest, javax.servlet.ServletResponse sresponse)
Set the character encoding on the request using the value stored in the init param of the web.xml. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
INIT_PARAMETER_NAME
public static final java.lang.String INIT_PARAMETER_NAME
-
- See Also:
- Constant Field Values
INIT_PARAMETER_ENCODING
public static final java.lang.String INIT_PARAMETER_ENCODING
-
- See Also:
- Constant Field Values
INIT_PARAMETER_UNAUTHORIZED_PAGE
public static final java.lang.String INIT_PARAMETER_UNAUTHORIZED_PAGE
-
- See Also:
- Constant Field Values
SESSION_INVALIDATE_BINDINGCONTAINER_DEF
public static final java.lang.String SESSION_INVALIDATE_BINDINGCONTAINER_DEF
-
- See Also:
- Constant Field Values
ADFBindingFilter
public ADFBindingFilter()
init
public void init(javax.servlet.FilterConfig filterConfig)
throws javax.servlet.ServletException
- initializes the servlet by retrieving the 'encoding' parameter and saving it's value for subsequent use. The encoding is important for initalizing http request and response objects to the correct encoding for support of NLS applications.
-
- Specified by:
init in interface javax.servlet.Filter
-
- Parameters:
filterConfig -
- Throws:
javax.servlet.ServletException
destroy
public void destroy()
- Cleans up any applications-specific resources that where allocated.
-
- Specified by:
destroy in interface javax.servlet.Filter
doFilter
public void doFilter(javax.servlet.ServletRequest request,
javax.servlet.ServletResponse response,
javax.servlet.FilterChain chain)
throws java.io.IOException,
javax.servlet.ServletException
- The main filter function. This processes the http request and makes sure that the binding context is initialized for use by the controller and/or any web pages that use data binding.
-
- Specified by:
doFilter in interface javax.servlet.Filter
-
- Parameters:
request -
response -
chain -
- Throws:
java.io.IOException
javax.servlet.ServletException
initializeBindingContext
public static oracle.adf.model.BindingContext initializeBindingContext(javax.servlet.http.HttpServletRequest request)
- Initalizes the binding context by reading the CPX file defined by the 'CpxFileName' init parameter.
-
- Parameters:
request -
- Returns:
- binding context
processEncoding
protected void processEncoding(javax.servlet.ServletRequest srequest,
javax.servlet.ServletResponse sresponse)
throws java.io.UnsupportedEncodingException
- Set the character encoding on the request using the value stored in the init param of the web.xml. If the value is not defined in the web.xml, do not change the character encoding.
-
- Parameters:
srequest - ServletRequest
sresponse - ServletResponse
- Throws:
java.io.UnsupportedEncodingException
isPageViewable
protected boolean isPageViewable(oracle.adf.model.BindingContext bindingCtx,
javax.servlet.http.HttpSession session,
javax.servlet.ServletRequest servletRequest)
- Return true if there no RegionBinding associated with this page or if the page is viewable based on the RegionBinding info.
The session parameter has been deprecated and will no longer be passed. Maintaining this method for backwards compatiblity. Applications that require the HttpSession should use: servletRequest.getSession(boolean)
Copyright © 1997, 2005, Oracle. All rights reserved.