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.server
Class OperationState

    java.lang.Object
      oracle.ifs.server.OperationState

    public final class OperationState

extends java.lang.Object

The `OperationState` class is manage the state of a server side operation, specifically to manage the cascading effects for operations such as free(), copy(), etc.

OperationState instances are used in many of the server-side extensibility methods, such as extendedPreInsert(). Currently, none of the methods on this class that are used internally to manage the state of operations are published. Until this changes, this class should be treated as an "opaque" container of operation state.

(Published)

Field Summary
`protected java.util.Vector` | `m_AtomicOperations` The set of inidividual actions that comprise this operation.
`protected java.util.HashMap` | `m_CycleCheckMap` A table used to protect against cycles within the operation.
`protected S_LibraryObject` | `m_Object` The object that was the initial target of the operation.
`protected S_LibrarySession` | `m_Session` The session that is carrying out this operation.
`static int` | `OPERATIONTYPE_COPY` Operation type for Copy operations.
`static int` | `OPERATIONTYPE_DELETE` Operation type for Delete operations.
`static int` | `OPERATIONTYPE_FREE` Operation type for Free operations.
`static int` | `OPERATIONTYPE_INSERT` Operation type for Insert operations.
`static int` | `OPERATIONTYPE_UNDELETE` Operation type for Undelete operations.
`static int` | `OPERATIONTYPE_UPDATE` Operation type for Update operations.

Constructor Summary
`OperationState(S_LibrarySession session, S_LibraryObject obj)` Construct an OperationState on a specified initial object, on behalf of a session.

Method Summary
`void` | `addAtomicOperation(S_LibraryObject obj, int operationType, S_LibraryObjectDefinition sdef)` add an atomic operation to this OperationState.
`void` | `addAtomicOperation(S_LibraryObject obj, int operationType, S_LibraryObjectDefinition sdef, java.lang.Object customObject)` add an atomic operation to this OperationState, specifying a custom object related to the operation.
`protected void` | `executeAtomicOperations()` execute all of the atomic operations in the order in which they were added to this OperationState.
`java.lang.Object` | `getAtomicOperationCustomObject(S_LibraryObject obj, int operationType)` get the custom object specified when an AtomicOperation was added.
`S_LibraryObjectDefinition` | `getAtomicOperationDefinition(S_LibraryObject obj, int operationType)` get the Definition specified when an AtomicOperation was added.
`protected java.lang.Long` | `getClassId()` getClassId - get the initiating object's class Id
`protected java.lang.Long` | `getId()` getId - get the initiating object's Id
`protected java.lang.Object` | `getInitialCustomObject()` getInitialCustomObject - get the initial custom object specified in the first Operation for the initiating object.
`S_LibraryObjectDefinition` | `getInitialDefinition()` getInitialDefinition - get the initial S_LibraryObjectDefinition specified in the first Operation for the initiating object.
`protected S_LibraryObject` | `getInitialLibraryObject()` getInitialLibraryObject - get the initiating object.
`boolean` | `isOperationInProgress(S_LibraryObject obj, int operationType)` Gets whether an atomic operation is in progress
`protected boolean` | `wasInitiatedBy(S_LibraryObject obj)` wasInitiatedBy - return true if the specified object initiated this Operation.

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

Field Detail

### OPERATIONTYPE_INSERT

    public static final int OPERATIONTYPE_INSERT

  Description copied from class: `OperationState`
  Operation type for Insert operations.

  See Also:
    Constant Field Values
  (Published)

### OPERATIONTYPE_FREE

    public static final int OPERATIONTYPE_FREE

  Description copied from class: `OperationState`
  Operation type for Free operations.

  See Also:
    Constant Field Values
  (Published)

### OPERATIONTYPE_UPDATE

    public static final int OPERATIONTYPE_UPDATE

  Description copied from class: `OperationState`
  Operation type for Update operations.

  See Also:
    Constant Field Values
  (Published)

### OPERATIONTYPE_COPY

    public static final int OPERATIONTYPE_COPY

  Description copied from class: `OperationState`
  Operation type for Copy operations.

  See Also:
    Constant Field Values
  (Published)

### OPERATIONTYPE_DELETE

    public static final int OPERATIONTYPE_DELETE

  Description copied from class: `OperationState`
  Operation type for Delete operations.

  See Also:
    Constant Field Values
  (Unpublished)

### OPERATIONTYPE_UNDELETE

    public static final int OPERATIONTYPE_UNDELETE

  Description copied from class: `OperationState`
  Operation type for Undelete operations.

  See Also:
    Constant Field Values
  (Unpublished)

### m_Object

    protected S_LibraryObject m_Object

  Description copied from class: `OperationState`
  The object that was the initial target of the operation. Other objects can become part of this operation if the initial action cascades or otherwise triggers additional atomic operations on other objects.

  (Unpublished)

### m_Session

    protected S_LibrarySession m_Session

  Description copied from class: `OperationState`
  The session that is carrying out this operation.

  (Unpublished)

### m_AtomicOperations

    protected java.util.Vector m_AtomicOperations

  Description copied from class: `OperationState`
  The set of inidividual actions that comprise this operation.

  (Unpublished)

### m_CycleCheckMap

    protected java.util.HashMap m_CycleCheckMap

  Description copied from class: `OperationState`
  A table used to protect against cycles within the operation. For example, if a free of an object triggers a cascade such that the initial object gets freed a second time, this table is used to prevent this cycle from continuing.

  (Unpublished)

Constructor Detail

### OperationState

    public OperationState(S_LibrarySession session,
                          S_LibraryObject obj)
                   throws IfsException

  Construct an OperationState on a specified initial object, on behalf of a session.

  Parameters:
    `session` - the session
    `obj` - the initial target object
  Throws:
    `IfsException` - if the operation fails
  (Unpublished)

Method Detail

### getInitialLibraryObject

    protected S_LibraryObject getInitialLibraryObject()
                                               throws IfsException

  Description copied from class: `OperationState`
  getInitialLibraryObject - get the initiating object.

  Returns:
    the initiating object.
  Throws:
    `IfsException` - if the operation fails
  (Unpublished)

### getInitialDefinition

    public S_LibraryObjectDefinition getInitialDefinition()
                                                   throws IfsException

  Description copied from class: `OperationState`
  getInitialDefinition - get the initial S_LibraryObjectDefinition specified in the first Operation for the initiating object.

  Returns:
    the initial S_LibraryObjectDefinition.
  Throws:
    `IfsException` - if the operation fails
  (Published)

### getInitialCustomObject

    protected java.lang.Object getInitialCustomObject()
                                               throws IfsException

  Description copied from class: `OperationState`
  getInitialCustomObject - get the initial custom object specified in the first Operation for the initiating object.

  Returns:
    the initial S_LibraryObjectDefinition.
  Throws:
    `IfsException` - if the operation fails
  (Unpublished)

### getId

    protected java.lang.Long getId()
                            throws IfsException

  Description copied from class: `OperationState`
  getId - get the initiating object's Id

  Returns:
    the object's Id.
  Throws:
    `IfsException` - if the operation fails
  (Unpublished)

### getClassId

    protected java.lang.Long getClassId()
                                 throws IfsException

  Description copied from class: `OperationState`
  getClassId - get the initiating object's class Id

  Returns:
    the object's Id.
  Throws:
    `IfsException` - if the operation fails
  (Unpublished)

### wasInitiatedBy

    protected boolean wasInitiatedBy(S_LibraryObject obj)
                              throws IfsException

  Description copied from class: `OperationState`
  wasInitiatedBy - return true if the specified object initiated this Operation.

  Parameters:
    `obj` - the Object to check for initiation
  Returns:
    true if the specified object initiated this Operation
  Throws:
    `IfsException` - if the operation fails
  (Unpublished)

### addAtomicOperation

    public void addAtomicOperation(S_LibraryObject obj,
                                   int operationType,
                                   S_LibraryObjectDefinition sdef)
                            throws IfsException

  Description copied from class: `OperationState`
  add an atomic operation to this OperationState.

  Parameters:
    `obj` - the target object for this atomic operation
    `operationType` - the operation type
    `sdef` - any options or info related to the atomic operation
  Throws:
    `IfsException` - if the operation fails
  (Published)

### addAtomicOperation

    public void addAtomicOperation(S_LibraryObject obj,
                                   int operationType,
                                   S_LibraryObjectDefinition sdef,
                                   java.lang.Object customObject)
                            throws IfsException

  Description copied from class: `OperationState`
  add an atomic operation to this OperationState, specifying a custom object related to the operation.

  Parameters:
    `obj` - the target object for this atomic operation
    `operationType` - the operation type
    `sdef` - any options or info related to the atomic operation
    `customObject` - the custom object that is related to the operation
  Throws:
    `IfsException` - if the operation fails
  (Published)

### getAtomicOperationDefinition

    public S_LibraryObjectDefinition getAtomicOperationDefinition(S_LibraryObject obj,
                                                                  int operationType)
                                                           throws IfsException

  Description copied from class: `OperationState`
  get the Definition specified when an AtomicOperation was added. Identify by the operation type, as more than one operation could be specified for the same object.

  Parameters:
    `obj` - the target object for this atomic operation
    `operationType` - the operation type
  Returns:
    the definition containing any options or info related to the atomic operation
  Throws:
    `IfsException` - if the operation fails
  (Published)

### getAtomicOperationCustomObject

    public java.lang.Object getAtomicOperationCustomObject(S_LibraryObject obj,
                                                           int operationType)
                                                    throws IfsException

  Description copied from class: `OperationState`
  get the custom object specified when an AtomicOperation was added. Identify by the operation type, as more than one operation could be specified for the same object.

  Parameters:
    `obj` - the target object for this atomic operation
    `operationType` - the operation type
  Returns:
    the custom object that is related to the operation
  Throws:
    `IfsException` - if the operation fails
  (Published)

### isOperationInProgress

    public boolean isOperationInProgress(S_LibraryObject obj,
                                         int operationType)
                                  throws IfsException

  Description copied from class: `OperationState`
  Gets whether an atomic operation is in progress

  Parameters:
    `obj` - the target object for the atomic operation in question
    `operationType` - the operation type
  Returns:
    true if that operation type is in progress for the specified object.
  Throws:
    `IfsException` - if the operation fails
  (Published)

### executeAtomicOperations

    protected void executeAtomicOperations()
                                    throws IfsException

  Description copied from class: `OperationState`
  execute all of the atomic operations in the order in which they were added to this OperationState. After all operations have been executed, the "post" methods (e.g. postFree() for a free operation) are invoked for each in the same order in which they executed.

  Throws:
    `IfsException` - if the operation fails
  (Unpublished)

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