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

E10653-05

oracle.jbo
Interface Session

All Known Implementing Classes:
ApplicationModuleImpl, ServiceSessionImpl, SessionImpl, WSApplicationModuleImpl

public interface Session

An interface for session context objects. A session context represents an application's session. An implementation of this interface is instantiated for each root application module when the application module is activated ApplicationModule.activate. The session object is garbage collected when the root application module is garbage collected.

This interface is used by the framework to load/store session context throughout the client application's lifetime.

A default implementation of this interface, SessionImpl is provided with the Business Components for Java framework. Custom implementations may be developed by application developers who are interested in extending the default implementation. For example, an application may extend the init method with logic to load application specific session context like the local currency.

Custom implementations of this interface may be identified to the framework with the SessionClass server property.

Since:
JDeveloper 3.0

Field Summary
static java.lang.String JBO_SESSION_COOKIE
          Deprecated. since 11.0. the SessionCookie is an implementation detail that should not be available on the session. Any context provided by the SessionCookie should be added to the cookie UserData This will then be propogated to the Session UserData.
static java.lang.String JBO_SESSION_LOCALE
           
 
Method Summary
 ApplicationModule findSharedApplicationModule(java.lang.String appModuleName)
          INTERNAL: Applications should not use.
 java.lang.String[] getAllApplicationModuleDefNames()
          Gets the names of the Application Module definitions contained in all packages.
 java.lang.String[] getAllEntityAssociationDefNames()
          Gets the names of the entity association definitions defined in all packages.
 java.lang.String[] getAllEntityDefNames()
          Gets the names of the Entity Object definitions available in all packages.
 java.lang.String[] getAllViewDefNames()
          Gets the names of the View Object definitions available in all packages.
 java.lang.String[] getAllViewLinkDefNames()
          Gets the names of the View Link definitions defined in all packages.
 java.lang.String[] getApplicationModuleDefNames(java.lang.String packageName)
          Gets the names of the Application Module definitions contained in a package.
 java.lang.String[] getEntityAssociationDefNames(java.lang.String packageName)
          Gets the names of the entity association definitions defined in a package.
 java.lang.String[] getEntityDefNames(java.lang.String packageName)
          Gets the names of the Entity Object definitions available in a package.
 java.util.Hashtable getEnvironment()
          Returns the BC4J context for the session.
 java.util.Locale getLocale()
          Gets the current Locale used for localizing error messages.
 LocaleContext getLocaleContext()
          retrieves the locale context for the session
 java.lang.String[] getPackageNames()
          Gets names of the packages that make up this middle tier application.
 java.util.Hashtable getUserData()
          Returns application context for the session.
 java.lang.String[] getUserRoles()
          Returns the Roles/Groups for current user principal.
 java.lang.String getVersion()
          Gets the middle tier's version information.
 java.lang.String[] getViewDefNames(java.lang.String packageName)
          Gets the names of the View Object definitions available in a package.
 java.lang.String[] getViewLinkDefNames(java.lang.String packageName)
          Gets the names of the View Link definitions defined in a package.
 void invalidateSession()
          INTERNAL: Applications should not use.
 boolean isClient()
          Returns whether this session is running as a client in 3 tier or not.
 boolean isUserInRole(java.lang.String role)
           
 void loadPackage(java.lang.String packageName)
          Loads a package that may be browsed for defined objects.
 void setLocale(java.util.Locale locale)
          Sets a new Locale for localizing error messages.
 

Field Detail

JBO_SESSION_COOKIE

static final java.lang.String JBO_SESSION_COOKIE
Deprecated. since 11.0. the SessionCookie is an implementation detail that should not be available on the session. Any context provided by the SessionCookie should be added to the cookie UserData This will then be propogated to the Session UserData.
See Also:
Constant Field Values

JBO_SESSION_LOCALE

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

getVersion

java.lang.String getVersion()
Gets the middle tier's version information.

Returns:
The version information in the form major.minor.patch.bldNum.

getLocale

java.util.Locale getLocale()
Gets the current Locale used for localizing error messages.

Returns:
the current Locale.

setLocale

void setLocale(java.util.Locale locale)
Sets a new Locale for localizing error messages.

Parameters:
locale - the new Locale.

getPackageNames

java.lang.String[] getPackageNames()
Gets names of the packages that make up this middle tier application.

Returns:
The package names.

getApplicationModuleDefNames

java.lang.String[] getApplicationModuleDefNames(java.lang.String packageName)
Gets the names of the Application Module definitions contained in a package.

Parameters:
packageName - the name of the package.
Returns:
an array of ApplicationModule definition names.

getAllApplicationModuleDefNames

java.lang.String[] getAllApplicationModuleDefNames()
Gets the names of the Application Module definitions contained in all packages.

Returns:
an array of ApplicationModule definition names.

getViewDefNames

java.lang.String[] getViewDefNames(java.lang.String packageName)
Gets the names of the View Object definitions available in a package.

Parameters:
packageName - the name of the package.
Returns:
String[] an array of ViewDef names.

getAllViewDefNames

java.lang.String[] getAllViewDefNames()
Gets the names of the View Object definitions available in all packages.

Returns:
String[] an array of ViewDef names.

getEntityDefNames

java.lang.String[] getEntityDefNames(java.lang.String packageName)
Gets the names of the Entity Object definitions available in a package.

Parameters:
packageName - the name of the package.
Returns:
String[] an array of EntityDef names.

getAllEntityDefNames

java.lang.String[] getAllEntityDefNames()
Gets the names of the Entity Object definitions available in all packages.

Returns:
String[] an array of EntityDef names.

getEntityAssociationDefNames

java.lang.String[] getEntityAssociationDefNames(java.lang.String packageName)
Gets the names of the entity association definitions defined in a package.

Parameters:
packageName - the name of the package.
Returns:
String[] an array of EntityAssociationDef names.

getAllEntityAssociationDefNames

java.lang.String[] getAllEntityAssociationDefNames()
Gets the names of the entity association definitions defined in all packages.

Returns:
String[] an array of EntityAssociationDef names.

getViewLinkDefNames

java.lang.String[] getViewLinkDefNames(java.lang.String packageName)
Gets the names of the View Link definitions defined in a package.

Parameters:
packageName - the name of the package.
Returns:
String[] an array of ViewLinkDef names.

getAllViewLinkDefNames

java.lang.String[] getAllViewLinkDefNames()
Gets the names of the View Link definitions defined in all packages.

Returns:
String[] an array of ViewLinkDef names.

loadPackage

void loadPackage(java.lang.String packageName)
Loads a package that may be browsed for defined objects.

Parameters:
packageName - a fully qualified package name.

getEnvironment

java.util.Hashtable getEnvironment()
Returns the BC4J context for the session. Examples of BC4J context include the values for the BC4J properties defined in PropertyMetadata. Applications should store custom session context in the Session userdata.

Returns:
a hashtable of BC4J session properties
See Also:
getUserData()

getLocaleContext

LocaleContext getLocaleContext()
retrieves the locale context for the session


getUserData

java.util.Hashtable getUserData()
Returns application context for the session. Applications may store any custom session data in this Hashtable. This hashtable will be reset by ApplicationModuleImpl.prepareSession(Session).


getUserRoles

java.lang.String[] getUserRoles()
Returns the Roles/Groups for current user principal.

Returns:
list of role names.

isUserInRole

boolean isUserInRole(java.lang.String role)
Parameters:
role - the name of the role.
Returns:
true if the user is in role; false otherwise.

isClient

boolean isClient()
Returns whether this session is running as a client in 3 tier or not.

Returns:
true if the session is in 3 tier. false if in 2 tier.

findSharedApplicationModule

ApplicationModule findSharedApplicationModule(java.lang.String appModuleName)
INTERNAL: Applications should not use.


invalidateSession

void invalidateSession()
INTERNAL: Applications should not use.


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

E10653-05

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