Overview | Package | Class | Tree | Deprecated | Index | Help
| Oracle Application Development Framework Model and Business Components Java API Reference 10g Release 3 (10.1.3) B16005-01
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## oracle.jbo
Interface Session

All Known Implementing Classes:
  ApplicationModuleImpl, 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`
`static java.lang.String` | `JBO_SESSION_LOCALE`

Method Summary
`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.
`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

    public static final java.lang.String JBO_SESSION_COOKIE

  See Also:
    Constant Field Values

### JBO_SESSION_LOCALE

    public static final java.lang.String JBO_SESSION_LOCALE

  See Also:
    Constant Field Values

Method Detail

### getVersion

    public java.lang.String getVersion()

  Gets the middle tier's version information.
  Returns:
    The version information in the form major.minor.patch.bldNum.

### getLocale

    public java.util.Locale getLocale()

  Gets the current `Locale` used for localizing error messages.
  Returns:
    the current `Locale`.

### setLocale

    public void setLocale(java.util.Locale locale)

  Sets a new `Locale` for localizing error messages.
  Parameters:
    `locale` - the new `Locale`.

### getPackageNames

    public java.lang.String[] getPackageNames()

  Gets names of the packages that make up this middle tier application.
  Returns:
    The package names.

### getApplicationModuleDefNames

    public 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

    public java.lang.String[] getAllApplicationModuleDefNames()

  Gets the names of the Application Module definitions contained in all packages.
  Returns:
    an array of `ApplicationModule` definition names.

### getViewDefNames

    public 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

    public java.lang.String[] getAllViewDefNames()

  Gets the names of the View Object definitions available in all packages.
  Returns:
    String[] an array of `ViewDef` names.

### getEntityDefNames

    public 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

    public java.lang.String[] getAllEntityDefNames()

  Gets the names of the Entity Object definitions available in all packages.
  Returns:
    String[] an array of `EntityDef` names.

### getEntityAssociationDefNames

    public 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

    public java.lang.String[] getAllEntityAssociationDefNames()

  Gets the names of the entity association definitions defined in all packages.
  Returns:
    String[] an array of `EntityAssociationDef` names.

### getViewLinkDefNames

    public 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

    public java.lang.String[] getAllViewLinkDefNames()

  Gets the names of the View Link definitions defined in all packages.
  Returns:
    String[] an array of `ViewLinkDef` names.

### loadPackage

    public void loadPackage(java.lang.String packageName)

  Loads a package that may be browsed for defined objects.
  Parameters:
    `packageName` - a fully qualified package name.

### getEnvironment

    public 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

    public LocaleContext getLocaleContext()

  retrieves the locale context for the session

### getUserData

    public 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

    public java.lang.String[] getUserRoles()

  Returns the Roles/Groups for current user principal.
  Returns:
    list of role names.

### isUserInRole

    public boolean isUserInRole(java.lang.String role)

  Parameters:
    `role` - the name of the role.
  Returns:
    `true` if the user is in role; `false` otherwise.

### isClient

    public 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.

Overview | Package | Class | Tree | Deprecated | Index | Help
| Oracle Application Development Framework Model and Business Components Java API Reference 10g Release 3 (10.1.3) B16005-01
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

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