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.beans.lifecycle
Class LifecyclePolicyActionAdapter

    java.lang.Object
      oracle.ifs.beans.lifecycle.LifecyclePolicyActionAdapter

All Implemented Interfaces:
  LifecyclePolicyAction

Direct Known Subclasses:
  FreeLifecyclePolicyAction, StorageChangeLifecyclePolicyAction

    public class LifecyclePolicyActionAdapter

extends java.lang.Object
implements LifecyclePolicyAction

LifecyclePolicyActionAdapter is a default implementation of LifecyclePolicyAction.

Field Summary
`static java.lang.String` | `EVENT_BASED_PROPERTY` The name of the boolean property that indicates whether this action supports event-based processing.
`static java.lang.String` | `TIME_BASED_PROPERTY` The name of the boolean property that indicates whether this action supports time-based processing.

Constructor Summary
`LifecyclePolicyActionAdapter()`

Method Summary
`LifecyclePolicyActionOutcome` | `execute(LifecyclePolicyEntry lpe, Document doc)` Execute the action for the specified document.
`LifecyclePolicySearchCondition` | `getSearchCondition(LifecyclePolicyEntry lpe)` Gets the search condition to be used to select documents eligible for processing.
`void` | `initialize(LifecyclePolicyActionSpecification lpas)` Initialize this instance.
`LifecyclePolicyActionOutcome` | `notify(LifecyclePolicyEntry lpe, Document doc)` Notify action that the specified document has advanced to the lifecycle state as indicated by the specified LifecyclePolicyEntry.

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

Field Detail

### TIME_BASED_PROPERTY

    public static final java.lang.String TIME_BASED_PROPERTY

  Description copied from class: `LifecyclePolicyActionAdapter`
  The name of the boolean property that indicates whether this action supports time-based processing.

  Used as the default way of determining the search condition. If the property is not specified, the corresponding setting defaults to true.

  See Also:
    Constant Field Values

### EVENT_BASED_PROPERTY

    public static final java.lang.String EVENT_BASED_PROPERTY

  Description copied from class: `LifecyclePolicyActionAdapter`
  The name of the boolean property that indicates whether this action supports event-based processing.

  Used as the default way of determining whether or not the action supports the `notify` method. If the property is not specified, the corresponding setting defaults to false.

  See Also:
    Constant Field Values

Constructor Detail

### LifecyclePolicyActionAdapter

    public LifecyclePolicyActionAdapter()

Method Detail

### initialize

    public void initialize(LifecyclePolicyActionSpecification lpas)
                    throws IfsException

  Description copied from class: `LifecyclePolicyActionAdapter`
  Initialize this instance.

  Called immediately after construction (via the default constructor) and used so that the implementation can initialize session-independent state. Subsequent calls on this interface will often be called with a different session context than is specified in this method.

  This instance may be used concurrently by multiple threads. Therefore if any state is sensitive to this, the implementer must properly synchronize.

  Specified by:
    `initialize` in interface `LifecyclePolicyAction`
  Parameters:
    `lpas` - the LifecyclePolicyActionSpecification that references this action
  Throws:
    `IfsException` - if the operation fails

### getSearchCondition

    public LifecyclePolicySearchCondition getSearchCondition(LifecyclePolicyEntry lpe)
                                                      throws IfsException

  Description copied from class: `LifecyclePolicyActionAdapter`
  Gets the search condition to be used to select documents eligible for processing.

  Implementation can return null, in which case the standard default search condition will be used, namely: `where lifecycledate < ? and lifecyclepolicyentryid = ? and lifecyclepolicy = ?`, where the date specified takes into account the time period of the LifecyclePolicyEntry.

  Specified by:
    `getSearchCondition` in interface `LifecyclePolicyAction`
  Parameters:
    `lpe` - the entry that references the LifecyclePolicyActionSpecification that indicates this implementation of LifecyclePolicyAction
  Returns:
    the search condition, or null if the default search condition should be used
  Throws:
    `IfsException` - if the operation fails

### execute

    public LifecyclePolicyActionOutcome execute(LifecyclePolicyEntry lpe,
                                                Document doc)
                                         throws IfsException

  Description copied from class: `LifecyclePolicyActionAdapter`
  Execute the action for the specified document.

  The caller establishes a transaction context for the execution of this action. If the LifecyclePolicyActionOutcome indicates that the execution was successful, the transaction will be committed by the caller. Additionally, the LifecyclePolicyActionOutcome may indicate the nature of the updates performed on the document to indicate the new lifecycle state (if any) for the document. The standard behavior is to perform the following updates:

  - Updates the document to reflectt he lifecycle state of the current LifecyclePolicyEntry.
  - Updates the LifecycleDate to the current date and time.
  - Post an audit event to indicate the lifecycle state change.

  This implementation can decide not to execute the action based on custom logic, and indicates this by returning an appropriately constructed LifecyclePolicyActionOutcome. The caller will then abort the current transaction context. Similarly, if an exception is thrown, the caller will also abort the transaction, and log the exception information.

  Specified by:
    `execute` in interface `LifecyclePolicyAction`
  Parameters:
    `lpe` - the entry that references the LifecyclePolicyActionSpecification that indicates this implementation of LifecyclePolicyAction
    `doc` - the Document to process
  Returns:
    an indication of the execution outcome, including indications as to the updates that to be performed on the document
  Throws:
    `IfsException` - if the operation fails

### notify

    public LifecyclePolicyActionOutcome notify(LifecyclePolicyEntry lpe,
                                               Document doc)
                                        throws IfsException

  Description copied from class: `LifecyclePolicyActionAdapter`
  Notify action that the specified document has advanced to the lifecycle state as indicated by the specified LifecyclePolicyEntry.

  The caller indicates that the specified document will be updated to reflect the new state, as declared by the specified LifecyclePolicyEntry. The caller creates a transaction context before calling this method, and will perform the document lifecycle state update in this transaction.

  The only way this implementation can affect the operation is by throwing an exception.

  Specified by:
    `notify` in interface `LifecyclePolicyAction`
  Parameters:
    `lpe` - the entry that references the LifecyclePolicyActionSpecification that indicates this implementation of LifecyclePolicyAction
    `doc` - the Document that is being updated to the state indicated by the specified LifecyclePolicyEntry
  Returns:
    an indication of the execution outcome, including indications as to the updates that to be performed on the document
  Throws:
    `IfsException` - 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