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.util
Class AuditingUtilities

    java.lang.Object
      oracle.ifs.core.util.AuditingUtilities

    public class AuditingUtilities

extends java.lang.Object

A set of static methods used in support of auditing operations.

Method Summary
`static DefinitionObject` | `createAuditReport(LibrarySession session, java.lang.String description, java.lang.Long expiration, java.util.Map searchOptions, AttributeValue[] sortOptions)` Creates an audit report DefinitionObject as a result of an audit search query.
`static void` | `deleteExpiredAuditFolderPaths(LibrarySession session, java.lang.Long expPeriod)` Delete any expired Audit folder paths, that have expired longer than the specified period.
`static void` | `deleteExpiredGlobalAuditEvents(LibrarySession session, Folder domain, AuditSpecification globalSpec)` Delete any expired global audit events that have expired longer than the specified period.
`static void` | `deleteUnusedAuditFolderPathOverflowEntries(LibrarySession session)` Delete any unused overflow entries for Audit folder paths.
`static void` | `deleteUnusedAuditProperties(LibrarySession session)` Delete any unreferenced Audit event properties.
`static void` | `deleteUnusedAuditTypeLists(LibrarySession session, java.lang.Long expirationPeriod)` Delete any unused audit type lists.
`static java.lang.String` | `generateAuditReportContent(LibrarySession session, java.util.Map searchOptions, AttributeValue[] sortOptions)` Creates audit report content as a result of an audit search query.
`static AuditCertificate[]` | `getAuditCertificates(LibrarySession session, long[] objectIdValues)` Select AuditCertificates for the specified object ID values.
`static AuditTypeEntryValue[]` | `getAuditTypesForClass(LibrarySession session, java.lang.String className, int opSucessMode, boolean includeNested)` Gets the AuditTypeEntryValues for a specified class name, optionally including any types that are applicable to a class that is considered a descendent of the specified class.
`static AuditTypeEntryValue[]` | `getAuditTypesForCreateOperations(LibrarySession session)` Gets the audit operation type values that correspond to "CREATED" operations.
`static AuditTypeEntryValue[]` | `getAuditTypesForFreeOperations(LibrarySession session)` Gets the audit operation type values that correspond to "FREED" operations.
`static java.util.Hashtable` | `getAuditTypesFromAuditTypeList(LibrarySession session, java.lang.Long auditTypeListId)` Gets a resolved view of this AuditTypeList's set of AuditTypeEntries.
`static AuditTypeEntryValue[]` | `getCustomAuditTypes(LibrarySession session)` Gets the custom audit operation type values.
`static AuditTypeList` | `getGlobalAuditTypeList(LibrarySession session)` Gets the AuditTypeList that defines the events saved into the global audit history.
`static long` | `getHighestAuditId(LibrarySession session)` Returns the highest Audit ID in use or potentially in use.
`static AttributeValue[]` | `listAggregateAuditEventColumnValues(LibrarySession session, java.lang.Long specId, java.lang.String aggFunction, java.lang.String[] colNames, java.lang.String[] innerColNames, java.lang.String filterClause, java.lang.String sortClause)` Returns the list of distinct values of the specified AuditEvent columns, along with an optional aggregate function.
`static AttributeValue[]` | `listAggregateAuditEventColumnValues(LibrarySession session, java.lang.String aggFunction, java.lang.String[] columnNames, java.util.Map searchOptions, AttributeValue[] sortOptions)` Returns the list of distinct values of the specified AuditEvent columns, along with an optional aggregate function.
`static void` | `performInternalAuditHandlerProcessing(LibrarySession session, AuditSpecification auditSpec, boolean eventPosted, boolean timerExpired)` Initialize and post a notification for a custom AuditSpecification.
`static void` | `performInternalAuditHandlerProcessing(LibrarySession session, java.lang.String specName, boolean eventPosted, boolean timerExpired)` Initialize and post a notification for a custom AuditSpecification.
`static int` | `processRawAuditEvents(LibrarySession session, int batchSize)` Dispatch events.
`static AuditEvent[]` | `searchAuditHistory(LibrarySession session, java.util.Map searchOptions, AttributeValue[] sortOptions)` Searches the AuditEvent table given a Map of AuditEvent search options and a Map of AuditEvent sort options.
`static void` | `setGlobalAuditTypeList(LibrarySession session, AuditTypeList atl)` Sets the AuditTypeList that defines the events saved into the global audit history.

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

Method Detail

### getHighestAuditId

    public static long getHighestAuditId(LibrarySession session)
                                  throws IfsException

  Description copied from class: `AuditingUtilities`
  Returns the highest Audit ID in use or potentially in use.

  Used mostly for testing purposes to get the highest auditing ID in use, so that canonical auditing searching can be performed.

  The caller will typically use the value returned to subsequently search an audit history using a filter criteria of "ID > [value]", so that the results are limited to the operations performed by that test.

  Parameters:
    `session` - session context
  Returns:
    the highest ID for an Audit Event
  Throws:
    `IfsException` - if the operation fails

### createAuditReport

    public static DefinitionObject createAuditReport(LibrarySession session,
                                                     java.lang.String description,
                                                     java.lang.Long expiration,
                                                     java.util.Map searchOptions,
                                                     AttributeValue[] sortOptions)
                                              throws IfsException

  Description copied from class: `AuditingUtilities`
  Creates an audit report DefinitionObject as a result of an audit search query.

  Parameters:
    `session` - session context
    `description` - description for the audit report DocumentDefinition
    `expiration` - expiration time for the audit report DefinitionObject
    `searchOptions` - options to construct the AuditEvent search query
    `sortOptions` - options to specify how to sort the result of the query
  Returns:
    a DefinitionObject containing the audit report
  Throws:
    `IfsException` - if the operation fails

### generateAuditReportContent

    public static java.lang.String generateAuditReportContent(LibrarySession session,
                                                              java.util.Map searchOptions,
                                                              AttributeValue[] sortOptions)
                                                       throws IfsException

  Description copied from class: `AuditingUtilities`
  Creates audit report content as a result of an audit search query.

  Parameters:
    `session` - session context
    `searchOptions` - options to construct the AuditEvent search query
    `sortOptions` - options to specify how to sort the result of the query
  Returns:
    a String containing the audit report content
  Throws:
    `IfsException` - if the operation fails

### searchAuditHistory

    public static AuditEvent[] searchAuditHistory(LibrarySession session,
                                                  java.util.Map searchOptions,
                                                  AttributeValue[] sortOptions)
                                           throws IfsException

  Description copied from class: `AuditingUtilities`
  Searches the AuditEvent table given a Map of AuditEvent search options and a Map of AuditEvent sort options.

  Parameters:
    `session` - session context
    `searchOptions` - options to construct the AuditEvent search query
    `sortOptions` - options to specify how to sort the result of the query
  Returns:
    the set of AuditEvent instances matching the query
  Throws:
    `IfsException` - if the operation fails

### listAggregateAuditEventColumnValues

    public static AttributeValue[] listAggregateAuditEventColumnValues(LibrarySession session,
                                                                       java.lang.String aggFunction,
                                                                       java.lang.String[] columnNames,
                                                                       java.util.Map searchOptions,
                                                                       AttributeValue[] sortOptions)
                                                                throws IfsException

  Description copied from class: `AuditingUtilities`
  Returns the list of distinct values of the specified AuditEvent columns, along with an optional aggregate function.

  Parameters:
    `session` - session context
    `aggFunction` - the aggregate function; can be null.
    `columnNames` - AuditEvent columns for which to list distinct values
    `searchOptions` - options to construct the AuditEvent search query
    `sortOptions` - options to specify how to sort the result of the query
  Returns:
    the AttributeValues corresponding to the list of values of the specified aggregate function and the distinct values of the Event columns. The name of each AttributeValue corresponds to the aggregate function or specified AuditEvent column name; the value of the AttributeValue is an array of the appropriate datatype.
  Throws:
    `IfsException` - if the operation fails

### listAggregateAuditEventColumnValues

    public static AttributeValue[] listAggregateAuditEventColumnValues(LibrarySession session,
                                                                       java.lang.Long specId,
                                                                       java.lang.String aggFunction,
                                                                       java.lang.String[] colNames,
                                                                       java.lang.String[] innerColNames,
                                                                       java.lang.String filterClause,
                                                                       java.lang.String sortClause)
                                                                throws IfsException

  Description copied from class: `AuditingUtilities`
  Returns the list of distinct values of the specified AuditEvent columns, along with an optional aggregate function.

  Parameters:
    `session` - session context
    `specId` - the AuditSpecification ID
    `aggFunction` - the aggregate function; can be null.
    `colNames` - AuditEvent columns for which to list distinct values
    `innerColNames` - the audit table column names to use in the inner select; if null, no inner select is used
    `filterClause` - the filter criteria (where clause)
    `sortClause` - the sort criteria (order by clause)
  Returns:
    the AttributeValues corresponding to the list of values of the specified aggregate function and the distinct values of the Event columns. The name of each AttributeValue corresponds to the aggregate function or specified AuditEvent column name; the value of the AttributeValue is an array of the appropriate datatype.
  Throws:
    `IfsException` - if the operation fails

### processRawAuditEvents

    public static int processRawAuditEvents(LibrarySession session,
                                            int batchSize)
                                     throws IfsException

  Description copied from class: `AuditingUtilities`
  Dispatch events.

  Constructs a new dispatcher and delegates to it.

  Parameters:
    `session` - session context
    `batchSize` - number of events to process in a single batch
  Returns:
    number of events processed
  Throws:
    `IfsException` - if the operation fails

### performInternalAuditHandlerProcessing

    public static void performInternalAuditHandlerProcessing(LibrarySession session,
                                                             java.lang.String specName,
                                                             boolean eventPosted,
                                                             boolean timerExpired)
                                                      throws IfsException

  Description copied from class: `AuditingUtilities`
  Initialize and post a notification for a custom AuditSpecification.

  Notification can be for either a "event posted", "timer expired", or both. This mimics what the EventHandlerAgent does for processing a custom AuditSpecification. Only works for INTERNAL handlers; takes no action if the specified AuditSpecification does not reference an internal handler.

  Parameters:
    `session` - the session context
    `specName` - the name of the AuditSpecification
    `eventPosted` - whether to perform "event posted" processing
    `timerExpired` - whether to perform "timer expired" processing
  Throws:
    `IfsException` - if the operation fails

### performInternalAuditHandlerProcessing

    public static void performInternalAuditHandlerProcessing(LibrarySession session,
                                                             AuditSpecification auditSpec,
                                                             boolean eventPosted,
                                                             boolean timerExpired)
                                                      throws IfsException

  Description copied from class: `AuditingUtilities`
  Initialize and post a notification for a custom AuditSpecification.

  Notification can be for either a "event posted", "timer expired", or both. This mimics what the EventHandlerAgent does for processing a custom AuditSpecification. Only works for INTERNAL handlers; takes no action if the specified AuditSpecification does not reference an internal handler.

  Parameters:
    `session` - the session context
    `auditSpec` - the AuditSpecification
    `eventPosted` - whether to perform "event posted" processing
    `timerExpired` - whether to perform "timer expired" processing
  Throws:
    `IfsException` - if the operation fails

### getAuditTypesForClass

    public static AuditTypeEntryValue[] getAuditTypesForClass(LibrarySession session,
                                                              java.lang.String className,
                                                              int opSucessMode,
                                                              boolean includeNested)
                                                       throws IfsException

  Description copied from class: `AuditingUtilities`
  Gets the AuditTypeEntryValues for a specified class name, optionally including any types that are applicable to a class that is considered a descendent of the specified class.

  The AuditTypeEntryValues returned are all constructed with the same operation success mode that is specified.

  Parameters:
    `session` - the session context
    `className` - the class name of interest, force to upper case (e.g. FOLDER)
    `opSucessMode` - the success mode to use for each AuditTypeEntryValue
    `includeNested` - whether or not to include operations for classes that are descendents of the specified class
  Returns:
    the operation types that match
  Throws:
    `IfsException` - if the operation fails

### getAuditTypesForCreateOperations

    public static AuditTypeEntryValue[] getAuditTypesForCreateOperations(LibrarySession session)
                                                                  throws IfsException

  Description copied from class: `AuditingUtilities`
  Gets the audit operation type values that correspond to "CREATED" operations.

  Used to indicate when an object has been created simply by inspecting event types.

  Parameters:
    `session` - the session context
  Returns:
    the operation types for create operations
  Throws:
    `IfsException` - if the operation fails

### getAuditTypesForFreeOperations

    public static AuditTypeEntryValue[] getAuditTypesForFreeOperations(LibrarySession session)
                                                                throws IfsException

  Description copied from class: `AuditingUtilities`
  Gets the audit operation type values that correspond to "FREED" operations.

  Used to indicate when an object has been freed simply by inspecting event types.

  Parameters:
    `session` - the session context
  Returns:
    the operation types for free operations
  Throws:
    `IfsException` - if the operation fails

### getCustomAuditTypes

    public static AuditTypeEntryValue[] getCustomAuditTypes(LibrarySession session)
                                                     throws IfsException

  Description copied from class: `AuditingUtilities`
  Gets the custom audit operation type values.

  Parameters:
    `session` - the session context
  Returns:
    the custom operation types
  Throws:
    `IfsException` - if the operation fails

### getAuditCertificates

    public static AuditCertificate[] getAuditCertificates(LibrarySession session,
                                                          long[] objectIdValues)
                                                   throws IfsException

  Description copied from class: `AuditingUtilities`
  Select AuditCertificates for the specified object ID values.

  Parameters:
    `session` - session context
    `objectIdValues` - object ID values
  Returns:
    the requested certificates
  Throws:
    `IfsException` - if the operation fails

### getAuditTypesFromAuditTypeList

    public static java.util.Hashtable getAuditTypesFromAuditTypeList(LibrarySession session,
                                                                     java.lang.Long auditTypeListId)
                                                              throws IfsException

  Description copied from class: `AuditingUtilities`
  Gets a resolved view of this AuditTypeList's set of AuditTypeEntries.

  The Hashtable returned is keyed by operation type (the Integer), and has a value of an AuditTypeEntryValue.

  Parameters:
    `session` - library session
    `auditTypeListId` - id of the audit type list
  Returns:
    table that represents the AuditTypeList
  Throws:
    `IfsException` - if operation fails.
  (Published)

### deleteUnusedAuditProperties

    public static void deleteUnusedAuditProperties(LibrarySession session)
                                            throws IfsException

  Description copied from class: `AuditingUtilities`
  Delete any unreferenced Audit event properties.

  Performed as a periodic cleanup task.

  Parameters:
    `session` - session context
  Throws:
    `IfsException` - if the operation fails

### deleteUnusedAuditTypeLists

    public static void deleteUnusedAuditTypeLists(LibrarySession session,
                                                  java.lang.Long expirationPeriod)
                                           throws IfsException

  Description copied from class: `AuditingUtilities`
  Delete any unused audit type lists.

  Performed as a clenup task.

  Parameters:
    `session` - session context
    `expirationPeriod` - expiration period for AuditTypeLists
  Throws:
    `IfsException` - if the operation fails

### deleteExpiredAuditFolderPaths

    public static void deleteExpiredAuditFolderPaths(LibrarySession session,
                                                     java.lang.Long expPeriod)
                                              throws IfsException

  Description copied from class: `AuditingUtilities`
  Delete any expired Audit folder paths, that have expired longer than the specified period.

  Performed as a periodic cleanup task.

  Parameters:
    `session` - session context
    `expPeriod` - the minimum amount of time, in milliseconds, that the AuditFolderPaths have to be expired in order to be deleted
  Throws:
    `IfsException` - if the operation fails

### deleteExpiredGlobalAuditEvents

    public static void deleteExpiredGlobalAuditEvents(LibrarySession session,
                                                      Folder domain,
                                                      AuditSpecification globalSpec)
                                               throws IfsException

  Description copied from class: `AuditingUtilities`
  Delete any expired global audit events that have expired longer than the specified period.

  Performed as a periodic cleanup task.

  Parameters:
    `session` - session context
    `domain` - audit domain on which we need to act
    `globalSpec` - OOB Global audit specification; if null, this method fetches it
  Throws:
    `IfsException` - if the operation fails

### deleteUnusedAuditFolderPathOverflowEntries

    public static void deleteUnusedAuditFolderPathOverflowEntries(LibrarySession session)
                                                           throws IfsException

  Description copied from class: `AuditingUtilities`
  Delete any unused overflow entries for Audit folder paths.

  Performed as a periodic cleanup task.

  Parameters:
    `session` - session context
  Throws:
    `IfsException` - if the operation fails

### getGlobalAuditTypeList

    public static AuditTypeList getGlobalAuditTypeList(LibrarySession session)
                                                throws IfsException

  Description copied from class: `AuditingUtilities`
  Gets the AuditTypeList that defines the events saved into the global audit history.

  Parameters:
    `session` - session context (must not be null)
  Returns:
    the global AuditTypeList
  Throws:
    `IfsException` - if the operation fails

### setGlobalAuditTypeList

    public static void setGlobalAuditTypeList(LibrarySession session,
                                              AuditTypeList atl)
                                       throws IfsException

  Description copied from class: `AuditingUtilities`
  Sets the AuditTypeList that defines the events saved into the global audit history.

  Parameters:
    `session` - session context (must not be null)
    `atl` - the global AuditTypeList
  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