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.core.handlers
Class ScriptHandler

    java.lang.Object
      oracle.ifs.core.handlers.AuditEventHandlerAdapter
          oracle.ifs.core.handlers.ScriptHandler

All Implemented Interfaces:
  AuditEventHandler

    public class ScriptHandler

extends AuditEventHandlerAdapter

ScriptHandler implements the AuditEventHandler interface, and handles a special event used to execute a set of ScriptOperations on behalf of the system user.

Nested Class Summary
`class` | `ScriptHandler.LocalScriptDriver` LocalScriptDriver extends EcmScriptDriver to capture the log output, so that a result document can be created to show the results.

Field Summary
`static java.lang.String` | `SYSTEM__SCRIPT_OPERATIONS_REQUESTED` Custom event type for a script operations request.

Constructor Summary
`ScriptHandler()`

Method Summary
`protected void` | `createScriptResultDocument(LibrarySession session, java.lang.String path, java.lang.StringBuffer result)` Create a document with the script results, as indicated by the specified path.
`protected java.lang.String` | `getDefaultScriptOperationsClass()` Returns the fully qualified operations class name to use by default in executing the script operations, or null if the default shouldbe used.
`void` | `handleEventPosted(AuditEventHandlerContext context)` Called when at least one registered event is posted.
`void` | `handleInitialize(AuditEventHandlerContext context)` Initializes this handler.
`protected void` | `handleScriptRequests(AuditEventHandlerContext context, LibrarySession session)` Handle events by performing the requested operations.
`void` | `handleTimerExpired(AuditEventHandlerContext context)` Called when the timer for this AuditEventHandler expires.
`protected boolean` | `isValidEvent(AuditEventHandlerContext context, LibrarySession session, AuditEvent event)` Verify that the event represents a valid request by a valid user.

Methods inherited from class oracle.ifs.core.handlers.AuditEventHandlerAdapter
`deleteEvents, handleDispose, selectEvents, selectMaximumEventId`

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

Field Detail

### SYSTEM__SCRIPT_OPERATIONS_REQUESTED

    public static final java.lang.String SYSTEM__SCRIPT_OPERATIONS_REQUESTED

  Description copied from class: `ScriptHandler`
  Custom event type for a script operations request.

  Double underscore is intentional, as this is the name of this custom event.

  See Also:
    Constant Field Values

Constructor Detail

### ScriptHandler

    public ScriptHandler()

Method Detail

### handleInitialize

    public void handleInitialize(AuditEventHandlerContext context)
                          throws java.lang.Exception

  Description copied from class: `AuditEventHandlerAdapter`
  Initializes this handler.

  Called immediately after construction.

  Specified by:
    `handleInitialize` in interface `AuditEventHandler`
  Overrides:
    `handleInitialize` in class `AuditEventHandlerAdapter`
  Parameters:
    `context` - the AuditEventHandlerContext to use for processing
  Throws:
    `java.lang.Exception` - if the operation fails

### handleEventPosted

    public void handleEventPosted(AuditEventHandlerContext context)
                           throws java.lang.Exception

  Description copied from class: `AuditEventHandlerAdapter`
  Called when at least one registered event is posted.

  Specified by:
    `handleEventPosted` in interface `AuditEventHandler`
  Overrides:
    `handleEventPosted` in class `AuditEventHandlerAdapter`
  Parameters:
    `context` - the AuditEventHandlerContext to use for processing
  Throws:
    `java.lang.Exception` - if the operation fails

### handleTimerExpired

    public void handleTimerExpired(AuditEventHandlerContext context)
                            throws java.lang.Exception

  Description copied from class: `AuditEventHandlerAdapter`
  Called when the timer for this AuditEventHandler expires.

  Specified by:
    `handleTimerExpired` in interface `AuditEventHandler`
  Overrides:
    `handleTimerExpired` in class `AuditEventHandlerAdapter`
  Parameters:
    `context` - the AuditEventHandlerContext to use for processing
  Throws:
    `java.lang.Exception` - if the operation fails

### handleScriptRequests

    protected void handleScriptRequests(AuditEventHandlerContext context,
                                        LibrarySession session)
                                 throws IfsException

  Description copied from class: `ScriptHandler`
  Handle events by performing the requested operations.

  Parameters:
    `context` - the AuditEventHandlerContext to use for processing
    `session` - the session context
  Throws:
    `IfsException` - if the operation fails

### isValidEvent

    protected boolean isValidEvent(AuditEventHandlerContext context,
                                   LibrarySession session,
                                   AuditEvent event)
                            throws IfsException

  Description copied from class: `ScriptHandler`
  Verify that the event represents a valid request by a valid user.

  Parameters:
    `context` - the AuditEventHandlerContext to use for processing
    `session` - the session context
    `event` - the event to process
  Throws:
    `IfsException` - if the operation fails

### getDefaultScriptOperationsClass

    protected java.lang.String getDefaultScriptOperationsClass()

  Description copied from class: `ScriptHandler`
  Returns the fully qualified operations class name to use by default in executing the script operations, or null if the default shouldbe used.

  Returns:
    the fully qualified operations class name
  Throws:
    `IfsException` - if the operation fails

### createScriptResultDocument

    protected void createScriptResultDocument(LibrarySession session,
                                              java.lang.String path,
                                              java.lang.StringBuffer result)
                                       throws IfsException

  Description copied from class: `ScriptHandler`
  Create a document with the script results, as indicated by the specified path.

  Parameters:
    `session` - the session context
    `path` - the path to the document to create
    `result` - the script results that should be the content of 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