Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## oracle.ifs.fdk
Class SessionManager

All Superinterfaces:
  java.rmi.Remote

All Known Implementing Classes:
  CoreSessionManager, SessionManagerImpl

    public interface class SessionManager

extends java.rmi.Remote

Session management interface.

Method Summary
`long` | `beginTransaction()` Begins a transaction on this session.
`void` | `commitTransaction(long id)` Commits a transaction started by calling `beginTransaction()`.
`Item` | `getCurrentUser(AttributeRequest[] attributes)` Returns the user as an Item for the current session.
`NamedValue[]` | `getSessionProperties(java.lang.String[] properties)` Returns the requested session properties.
`void` | `keepAlive()` Keeps a long running transaction that spans multiple requests alive.
`void` | `popSessionMode(int mode)` Pops the session one level, out of a privileged mode.
`void` | `pushSessionMode(int mode)` Pushes the session into a privileged mode where certain permission checks are ignored, depending on the mode.
`void` | `rollbackTransaction(long id)` Rolls back a transaction started by calling `beginTransaction()` .
`Item` | `setSessionMode(int mode, AttributeRequest[] attributes)` Switches the current session into one of the administration modes (currently only DOMAIN) or out of administration mode (NORMAL).
`void` | `setSessionProperties(NamedValue[] properties)` Set properties on the current session.

Method Detail

### getCurrentUser

    Item getCurrentUser(AttributeRequest[] attributes)
                        throws FdkException

  Description copied from interface: `SessionManager`
  Returns the user as an Item for the current session. Additional attributes about the user can be requested.

  Parameters:
    `attributes` - Optional attributes to return. Can be `null`.
  Throws:
    `FdkException`

### getSessionProperties

    NamedValue[] getSessionProperties(java.lang.String[] properties)
                                      throws FdkException

  Description copied from interface: `SessionManager`
  Returns the requested session properties. The property names are defined in `WebServicesConstants`. Examples are `LOGIN_USER, SESSION_TIMEOUT, TRANSACTION_TIMEOUT` and any properties that start with the public prefix defined by `FdkConstants.PUBLIC_SESSIONSTATE_PREFIX`. This method only works for Web Services clients as it requires the proper context. In-process clients have other means of getting the same values.

  Throws:
    `FdkException`

### setSessionProperties

    void setSessionProperties(NamedValue[] properties)
                              throws FdkException

  Description copied from interface: `SessionManager`
  Set properties on the current session. The names of the properties must start with the public prefix defined by `FdkConstants.PUBLIC_SESSIONSTATE_PREFIX` or the session must be created by a trusted application. Properties for various features are documented elsewhere.

  Parameters:
    `properties` - The properties to set. The names must start with the public prefix defined by `FdkConstants.PUBLIC_SESSIONSTATE_PREFIX`. To remove a property, set its value to `null`.
  Throws:
    `FdkException`

### keepAlive

    void keepAlive()
                   throws FdkException

  Description copied from interface: `SessionManager`
  Keeps a long running transaction that spans multiple requests alive. This is a NO-OP, the only side effect is that the session is also kept alive. This method is useful over Web Services or it an HTTP application uses transactions that span multiple requests.

  Throws:
    `FdkException`

### beginTransaction

    long beginTransaction()
                          throws FdkException

  Description copied from interface: `SessionManager`
  Begins a transaction on this session. The trasaction can be committed by calling `commitTransaction()` or it can be rolled back by calling `rollbackTransaction()` on this session.

  This method returns a transaction ID required to later reference this specific transaction.

  Transactions can be nested but they need to be committed or rolled back in the proper order, most recent transaction first (stack model).

  Throws:
    `FdkException`

### commitTransaction

    void commitTransaction(long id)
                           throws FdkException

  Description copied from interface: `SessionManager`
  Commits a transaction started by calling `beginTransaction()`.

  Parameters:
    `id` - The ID of the transaction (returned by `beginTransaction()`).
  Throws:
    `FdkException`

### rollbackTransaction

    void rollbackTransaction(long id)
                             throws FdkException

  Description copied from interface: `SessionManager`
  Rolls back a transaction started by calling `beginTransaction()` .

  If the ID of the transaction is less than or equal to 0, then the entire transaction stack will be rolled back at once.

  Parameters:
    `id` - The ID of the transaction (returned by `beginTransaction()`). If the ID is less than or equal to 0, then the entire transaction stack will be rolled back at once.
  Throws:
    `FdkException`

### setSessionMode

    Item setSessionMode(int mode,
                        AttributeRequest[] attributes)
                        throws FdkException

  Description copied from interface: `SessionManager`
  Switches the current session into one of the administration modes (currently only DOMAIN) or out of administration mode (NORMAL). Note that an administration mode is different from a privileged mode (see `SessionManager.pushSessionMode(int)`).Once the session is in an administration mode, it can be further pushed into one of the privileged modes if needed.

  Parameters:
    `mode` - The mode to set, defined by one of the constants `FdkConstants.SESSION_MODE_SESSION_MODE_DOMAIN_ADMINISTRATION` or `FdkConstants.SESSION_MODE_SESSION_MODE_NORMAL`
    `attributes` - Optional attributes that can be returned for the user item.
  Returns:
    The item representing the user in one of the administration modes.
  Throws:
    `FdkException`

### pushSessionMode

    void pushSessionMode(int mode)
                         throws FdkException

  Description copied from interface: `SessionManager`
  Pushes the session into a privileged mode where certain permission checks are ignored, depending on the mode. Supported modes:

  - `FdkConstants.SESSION_MODE_DISCOVER_ALL` - the session can discover all objects, regardless of their permissions.
  - `FdkConstants.SESSION_MODE_ADMIN_IGNORE_ALL` - powerfull mode that ignores all permission checks. Use with caution.
  The implementation works on a stack principle. Successive push calls are allowed but they must be followed by the same pop calls, in reverse order, to return the session to normal mode.

  Note that this call requires the following:

  - The session must be created by a trusted application
  - The session must be in a transaction. See `SessionManager.beginTransaction()`

  Parameters:
    `mode` - The mode to switch to.
  Throws:
    `FdkException` - if the operation fails.

### popSessionMode

    void popSessionMode(int mode)
                        throws FdkException

  Description copied from interface: `SessionManager`
  Pops the session one level, out of a privileged mode. The current mode must be passed to the call and it will be validated against the current state of the session. In addition to the modes supported by `SessionManager.pushSessionMode(int)`, `FdkConstants.SESSION_MODE_NORMAL` can be specified which will unwind the entire mode stack, regardless of the current state (useful for cleanup purposes).

  Parameters:
    `mode` - The current mode to pop out of.
  Throws:
    `FdkException` - if the operation fails.

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD