Oracle® Content Services Web Services Java API Reference
10g Release 1 (10.1.1)

B19047-01


oracle.ifs.fdk
Interface SessionManager


public interface SessionManager

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

 

Method Detail

beginTransaction

public long beginTransaction()
                      throws FdkException
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
Commits a transaction started by calling beginTransaction().
Parameters:
id - The ID of the transaction (returned by beginTransaction()).
Throws:
FdkException

getCurrentUser

public Item getCurrentUser(AttributeRequest[] attributes)
                    throws FdkException
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
Returns the requested session properties. The property names are defined in WebServicesConstants. Examples are LOGIN_USER, SESSION_TIMEOUT, TRANSACTION_TIMEOUT. 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

keepAlive

public void keepAlive()
               throws FdkException
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

rollbackTransaction

public void rollbackTransaction(long id)
                         throws FdkException
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
Switches the current session into one of the administration modes (currently only DOMAIN) or out of administration mode (NORMAL).
Parameters:
mode - The mode to set, defined by one of the constants FdkConstants.SESSION_MODE_
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

Oracle® Content Services Web Services Java API Reference
10g Release 1 (10.1.1)

B19047-01


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