Oracle Fusion Middleware Java API Reference for Oracle ADF Share
11g Release 1 (11.1.1.4.0)

E10686-05

oracle.adf.share.http
Class ServletADFContext

java.lang.Object
  extended by oracle.adf.share.ADFContext
      extended by oracle.adf.share.http.ServletADFContext

public class ServletADFContext
extends ADFContext

Since:
release specific (what release of product did this appear in)

Field Summary
static java.lang.String MDS_COMPONENT_CONFIG
           
static java.lang.String WEBAPP_DT_CONTEXT
           
 
Fields inherited from class oracle.adf.share.ADFContext
ADF_PROPERTY_NS, ADF_SESSIONDEF_PACKAGES, APPLICATION_DATA_KEY, APPLICATION_DATA_SEP, APPLICATION_NAME_SCOPE_KEY, APPLICATION_SCOPE, APPLICATION_UID, ATTRIBUTE_FORMATTER_MAP_KEY, CONNECTIONS_RESOURCE, MDS_CC_VALUES_FOR_EDIT, MDS_PARTITION_APPID, MDS_SESSION_OPTIONS_FACTORY, NAMED_CONTEXT_ENV, ORACLE_MULTITENANT_ENABLED, OVERRIDDEN_RES_BUNDLES, OVERRIDE_RES_BUNDLE_PACKAGE, PERSDEF_BASE_PACKAGE, REQUEST_SCOPE, SESSION_SCOPE, SESSIONDEF_BASE_PACKAGE, TYPE_GENERIC, TYPE_HTTP, TYPE_NAMED, TYPE_PORTLET, USE_ROLE_BASED_CUST_CLASS, USER_CUST_CLASSES, VIEW_SCOPE
 
Method Summary
 java.util.Map createScope(java.lang.String name)
          May be implemented by custom ADFContext classes to create a scope for the specfied name.
protected  java.util.Map createScope(java.lang.String name, boolean concurrent)
           
 oracle.mds.config.MDSComponentConfig createServletMDSComponentConfig()
          Deprecated. should not call anymore. See bug#6473565
protected  java.util.Map<java.lang.String,java.lang.Object> findApplicationScopeMap()
           
protected  java.lang.Object getApplicationScopekey()
          The application scope as defined by the ADFContext environment in which the application is being used.
protected  java.util.Map<java.lang.String,java.lang.Object> getApplicationScopeMap()
           
 int getContextType()
          Returns a type for the context instance.
protected  java.lang.String getDeployedAppName()
          This method should be overriden in sublclasses so that the appropriate application name is returned.
protected  javax.servlet.http.HttpServletRequest getHttpRequest()
           
protected  javax.servlet.http.HttpServletResponse getHttpResponse()
           
 java.util.Map getStateManager(java.lang.String scopeName, java.util.Hashtable env)
          Returns a StateManagerScopeAdapter for the specified scope.
protected  java.security.Principal getUserPrincipal()
           
 boolean hasEnvironment()
           
 boolean hasSession()
          Checks the environment to see if this ADFContext references a native session.
protected  void initialize(javax.servlet.ServletContext servletContext, javax.servlet.ServletRequest request, javax.servlet.ServletResponse response)
           
static void initThreadContext(javax.servlet.ServletContext servletContext, javax.servlet.ServletRequest request, javax.servlet.ServletResponse response)
           
static boolean initThreadContextIfNeeded(javax.servlet.ServletContext servletContext)
          Helper method for use by ServletContextListeners.
 boolean isContextFor(javax.servlet.ServletContext servletContext)
          Checks to see if this ADFServletContext instance represents the pass in servletContext
 boolean isDesignTime()
          This method will try to determine if the operating environment is Design Time.
 boolean isHttpContext()
          Returns true if the ADFContext is running in an http container.
protected  Environment loadEnvironment()
           
protected  void putApplicationScopeMap(java.util.Map<java.lang.String,java.lang.Object> scope)
          The application scope as defined by the ADFContext environment in which the application is being used.
 void removeAsCurrent()
          Disassociates this context from the current thread.
static void resetThreadContext()
          Deprecated. Replaced by: resetThreadContext(ServletRequest).
static void resetThreadContext(javax.servlet.ServletRequest request)
           
protected  void setEnvironment(Environment env)
           
 void setSecurityContext(SecurityContext ctx)
          Internal: Applications should not use this method.
 
Methods inherited from class oracle.adf.share.ADFContext
clearCachedLocale, findCurrent, findScope, get, getADFApplicationUID, getADFConfig, getADFConfigEx, getADFContextProperty, getADFFacesViewScopeMap, getADFSettings, getApplication, getApplicationName, getApplicationScope, getConfigSecurityContext, getConnectionsContext, getCurrent, getELContext, getEnterpriseId, getEnterpriseName, getEnvironment, getExpressionEvaluator, getExpressionFactory, getLocale, getMDSConfigHelper, getMDSInstanceAsObject, getMDSLogin, getMDSSessionAsObject, getNativeJdbcConnection, getPageFlowScope, getRequestScope, getScope, getScopeNames, getSecurityContext, getSessionDefPackages, getSessionScope, getSkipLevelIdentifier, getThreadLocalValue, getURL, getVariableResolver, getViewScope, hasCurrent, hasMDSSession, hasSecurityContext, initADFContext, initialize, isJBossRuntime, isJEE, isMultiTenantEnabled, isNamedContextRegistered, isWebsphereRuntime, loadSecurityContext, putScope, registerNamedContext, registerNamedContext, releaseMDSInstance, releaseMDSSession, removeScope, removeThreadLocalValue, resetADFContext, setAsCurrent, setEnterpriseId, setExpressionEvaluator, setExpressionFactory, setLocale, setMDSLogin, setThreadLocalValue, setVariableResolver, unregisterNamedContext
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

MDS_COMPONENT_CONFIG

public static final java.lang.String MDS_COMPONENT_CONFIG
See Also:
Constant Field Values

WEBAPP_DT_CONTEXT

public static final java.lang.String WEBAPP_DT_CONTEXT
See Also:
Constant Field Values
Method Detail

isDesignTime

public boolean isDesignTime()
Description copied from class: ADFContext
This method will try to determine if the operating environment is Design Time.

Overrides:
isDesignTime in class ADFContext

isContextFor

public boolean isContextFor(javax.servlet.ServletContext servletContext)
Checks to see if this ADFServletContext instance represents the pass in servletContext

Parameters:
servletContext -
Returns:
if this instance represents the ServletContext

getDeployedAppName

protected java.lang.String getDeployedAppName()
Description copied from class: ADFContext
This method should be overriden in sublclasses so that the appropriate application name is returned. Default is null.

Overrides:
getDeployedAppName in class ADFContext
Returns:
the deployed application name.

createScope

public java.util.Map createScope(java.lang.String name)
Description copied from class: ADFContext
May be implemented by custom ADFContext classes to create a scope for the specfied name.

ADFContext.getScope(String) will invoke this method if the specified scope has not already been associated with the current ADFContext. The new scope will be associated with the context until removed or until the context is destroyed.

Overrides:
createScope in class ADFContext

createScope

protected java.util.Map createScope(java.lang.String name,
                                    boolean concurrent)
Overrides:
createScope in class ADFContext

getHttpRequest

protected javax.servlet.http.HttpServletRequest getHttpRequest()

getHttpResponse

protected javax.servlet.http.HttpServletResponse getHttpResponse()

setSecurityContext

public void setSecurityContext(SecurityContext ctx)
Description copied from class: ADFContext
Internal: Applications should not use this method.

Overrides:
setSecurityContext in class ADFContext

getUserPrincipal

protected java.security.Principal getUserPrincipal()

setEnvironment

protected void setEnvironment(Environment env)

loadEnvironment

protected Environment loadEnvironment()
Specified by:
loadEnvironment in class ADFContext

getStateManager

public java.util.Map getStateManager(java.lang.String scopeName,
                                     java.util.Hashtable env)
Description copied from class: ADFContext
Returns a StateManagerScopeAdapter for the specified scope.

Overrides:
getStateManager in class ADFContext

hasSession

public boolean hasSession()
Description copied from class: ADFContext
Checks the environment to see if this ADFContext references a native session. The implementation should not create an session if one has not already been created.

Overrides:
hasSession in class ADFContext

getContextType

public int getContextType()
Description copied from class: ADFContext
Returns a type for the context instance. Current types include:
  • TYPE_GENERIC
  • TYPE_HTTP
  • TYPE_PORTLET
  • the type may be checked to implement logic specific to a platform.

    Specified by:
    getContextType in class ADFContext

    isHttpContext

    public boolean isHttpContext()
    Description copied from class: ADFContext
    Returns true if the ADFContext is running in an http container.

    Applications may use this to determine if it is okay to reference Http classes.

    Overrides:
    isHttpContext in class ADFContext

    initThreadContextIfNeeded

    public static boolean initThreadContextIfNeeded(javax.servlet.ServletContext servletContext)
    Helper method for use by ServletContextListeners. It will only initialize the context if the current context is not an ADFServletContext that represents the passed in servletContext.

    Parameters:
    servletContext -
    Returns:
    true if it was initialized

    getApplicationScopekey

    protected java.lang.Object getApplicationScopekey()
    Description copied from class: ADFContext
    The application scope as defined by the ADFContext environment in which the application is being used. For instance the ApplicationScope is the ServletContextListener in case of a web application.

    Overrides:
    getApplicationScopekey in class ADFContext
    Returns:
    the key that defines the application scope.

    getApplicationScopeMap

    protected java.util.Map<java.lang.String,java.lang.Object> getApplicationScopeMap()
    Overrides:
    getApplicationScopeMap in class ADFContext

    putApplicationScopeMap

    protected void putApplicationScopeMap(java.util.Map<java.lang.String,java.lang.Object> scope)
    Description copied from class: ADFContext
    The application scope as defined by the ADFContext environment in which the application is being used. This should be overriden to manage the lifecycle as defined in that ADFContext. The aim of this method is to cache the application scope, this may not be necessary in a ServletEnvironment.

    Overrides:
    putApplicationScopeMap in class ADFContext
    Parameters:
    scope - - The application scope.

    findApplicationScopeMap

    protected java.util.Map<java.lang.String,java.lang.Object> findApplicationScopeMap()
    Overrides:
    findApplicationScopeMap in class ADFContext

    initThreadContext

    public static void initThreadContext(javax.servlet.ServletContext servletContext,
                                         javax.servlet.ServletRequest request,
                                         javax.servlet.ServletResponse response)

    initialize

    protected void initialize(javax.servlet.ServletContext servletContext,
                              javax.servlet.ServletRequest request,
                              javax.servlet.ServletResponse response)

    resetThreadContext

    public static void resetThreadContext(javax.servlet.ServletRequest request)

    resetThreadContext

    public static void resetThreadContext()
    Deprecated. Replaced by: resetThreadContext(ServletRequest).

    Since:
    11.0

    removeAsCurrent

    public void removeAsCurrent()
    Description copied from class: ADFContext
    Disassociates this context from the current thread.

    Overrides:
    removeAsCurrent in class ADFContext

    hasEnvironment

    public boolean hasEnvironment()
    Overrides:
    hasEnvironment in class ADFContext

    createServletMDSComponentConfig

    public oracle.mds.config.MDSComponentConfig createServletMDSComponentConfig()
    Deprecated. should not call anymore. See bug#6473565

    Returns:

    Oracle Fusion Middleware Java API Reference for Oracle ADF Share
    11g Release 1 (11.1.1.4.0)

    E10686-05

    Copyright © 1997, 2011, Oracle. All rights reserved.