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.core
Class CoreSessionManager

    java.lang.Object
      oracle.ifs.fdk.impl.SessionManagerImpl
          oracle.ifs.fdk.core.CoreSessionManager

All Implemented Interfaces:
  java.rmi.Remote, SessionManager

    public class CoreSessionManager

extends SessionManagerImpl

Implementation of the sesison manager interface. See the documentation for `SessionManager`.

Constructor Summary
`CoreSessionManager()` Constructor required for web services.
`CoreSessionManager(FdkSession session)` Constructor required for in-process clients.

Method Summary
`long` | `beginTransaction()` Begins a transaction on this session.
`void` | `commitTransaction(long id)` Commits a transaction started by calling `beginTransaction()`.
`protected FdkSessionImpl` | `getConnectedSession()` Return the web service session.
`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.
`protected boolean` | `isWebServiceCall()` Returns `true` if the current call was made from a web services client.
`void` | `keepAlive()` Keeps a long running transaction that spans multiple requests alive.
`protected NamedValue[]` | `login(FdkCredential c, NamedValue[] options, AttributeRequest[] userAttributes)` Internal login method used by web services login managers.
`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` | `referenceTypes(TypeReference ref)` Dummy web service method to create a reference to data types used in the web services to insure that they are defined in the WSDL.
`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.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### CoreSessionManager

    public CoreSessionManager()

  Constructor required for web services.

### CoreSessionManager

    public CoreSessionManager(FdkSession session)

  Constructor required for in-process clients.

Method Detail

### getCurrentUser

    public Item getCurrentUser(AttributeRequest[] attributes)
                        throws FdkException

  Description copied from class: `CoreSessionManager`
  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

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

  Description copied from class: `CoreSessionManager`
  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

    public void setSessionProperties(NamedValue[] properties)
                              throws FdkException

  Description copied from class: `CoreSessionManager`
  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

    public void keepAlive()
                   throws FdkException

  Description copied from class: `CoreSessionManager`
  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

    public long beginTransaction()
                          throws FdkException

  Description copied from class: `CoreSessionManager`
  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

    public void commitTransaction(long id)
                           throws FdkException

  Description copied from class: `CoreSessionManager`
  Commits a transaction started by calling `beginTransaction()`.

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

### rollbackTransaction

    public void rollbackTransaction(long id)
                             throws FdkException

  Description copied from class: `CoreSessionManager`
  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

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

  Description copied from class: `CoreSessionManager`
  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

    public void pushSessionMode(int mode)
                         throws FdkException

  Description copied from class: `CoreSessionManager`
  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

    public void popSessionMode(int mode)
                        throws FdkException

  Description copied from class: `CoreSessionManager`
  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.

### isWebServiceCall

    protected final boolean isWebServiceCall()

  Returns `true` if the current call was made from a web services client. This check can be made by any subclasses in order to determine functionality and restrictions based on the originating call. This feature should be used lightly and only where really necessary as this is not an idea way of implementing business logic.

### referenceTypes

    public void referenceTypes(TypeReference ref)

  Dummy web service method to create a reference to data types used in the web services to insure that they are defined in the WSDL.

### login

    protected final NamedValue[] login(FdkCredential c,
                                       NamedValue[] options,
                                       AttributeRequest[] userAttributes)
                                throws FdkException

  Internal login method used by web services login managers.

  Throws:
    `FdkException`

### getConnectedSession

    protected final FdkSessionImpl getConnectedSession()
                                                throws FdkException

  Return the web service session. The return value is guaranteed to be non-null and to represent a connected session. If the client is not authenticated an FdkException is thrown.

  Throws:
    `FdkException`

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