Oracle Fusion Middleware Java API Reference for Oracle Extension SDK
11g Release 2 (11.1.2.1.0)

E17493-02

oracle.jdeveloper.audit
Class AuditManager

java.lang.Object
  extended by oracle.jdeveloper.audit.AuditManager
Direct Known Subclasses:
DefaultAuditManager

public abstract class AuditManager
extends java.lang.Object

The Audit manager. The singleton Audit manager object is the registry for Audit extensions. An addin defining an Audit extension must create an AuditProvider describing its analyzers, columns, and other extensions, and register it here. The Audit manager is also the factory for the central Auditor class of the Audit service API, used by clients which invoke Audit programmatically.

The indirect registration through providers allows class loading and other initialization to be postponed from IDE initialization until Audit actually needs the classes or objects.

See Also:
AuditProvider

Constructor Summary
AuditManager()
           
 
Method Summary
abstract  Auditor createAuditor(java.lang.Class<? extends Analyzer>... analyzers)
          Creates an Auditor which uses the default model type factory.
abstract  Auditor createAuditor(ModelTypeFactory factory, java.lang.Class<? extends Analyzer>... analyzers)
          Creates an Auditor.
abstract  AuditModel createModel()
          Creates an AuditModel.
abstract  ModelTypeFactory createModelTypeFactory(ModelType... modelTypes)
          Creates a ModelTypeFactory with specific model types and the standard container types (root, workspace, project, and directory).
abstract  Profile createProfile(java.lang.String name)
          Creates a new Profile with all registered beans included and enabled.
abstract  Profile createProfile(java.lang.String name, BeanDefinition... beans)
          Creates a new Profile with beans from specified bean definitions included and enabled.
abstract  Profile createProfile(java.lang.String name, java.lang.String... ids)
          Creates a new Profile with all registered beans included and with beans from specified ids, if any, enabled.
abstract  Transformer createTransformer()
          Creates a Transformer.
static AuditManager getAuditManager()
          Gets the singleton Audit manager.
abstract  java.util.Map<java.lang.Class<?>,BeanCustomizer> getBeanCustomizers()
          Gets the bean customizers registered with this Audit manager.
abstract  ModelTypeFactory getDefaultModelTypeFactory()
          Gets the default ModelTypeFactory which uses all model types registered with Audit.
abstract  AuditPreferences getPreferences()
          Gets the Audit preferences.
abstract  java.util.Collection<java.net.URL> getProfileStyleSheets()
          Gets the profile style sheet URLs registered with this Audit manager.
abstract  java.util.Collection<java.net.URL> getStyleSheets()
          Gets the style sheet URLs registered with this Audit manager.
static boolean isDevelopment()
          Gets whether Audit is running in development mode.
abstract  void register(AuditProvider provider)
          Registers an Audit provider with this Audit manager.
abstract  AuditModel runShowLogPage(Context context, Auditor auditor, java.lang.String label, java.lang.Thread.UncaughtExceptionHandler handler)
          Creates and shows an Audit log page for an Auditor, and runs the audit.
static void setAuditManager(AuditManager manager)
          Sets the singleton Audit manager.
abstract  void showLogPage(Context context, Auditor auditor, AuditModel model, java.lang.String label)
          Creates and shows an Audit log page for an Auditor and model.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AuditManager

public AuditManager()
Method Detail

getAuditManager

public static AuditManager getAuditManager()
Gets the singleton Audit manager.


isDevelopment

public static boolean isDevelopment()
Gets whether Audit is running in development mode.


setAuditManager

public static void setAuditManager(AuditManager manager)
Sets the singleton Audit manager.


register

public abstract void register(AuditProvider provider)
Registers an Audit provider with this Audit manager.


getPreferences

public abstract AuditPreferences getPreferences()
Gets the Audit preferences.


createModelTypeFactory

public abstract ModelTypeFactory createModelTypeFactory(ModelType... modelTypes)
Creates a ModelTypeFactory with specific model types and the standard container types (root, workspace, project, and directory).


getDefaultModelTypeFactory

public abstract ModelTypeFactory getDefaultModelTypeFactory()
Gets the default ModelTypeFactory which uses all model types registered with Audit.


createProfile

public abstract Profile createProfile(java.lang.String name)
Creates a new Profile with all registered beans included and enabled.

Parameters:
name - The name of the profile.

createProfile

public abstract Profile createProfile(java.lang.String name,
                                      BeanDefinition... beans)
Creates a new Profile with beans from specified bean definitions included and enabled.

Parameters:
name - The name of the profile.
beans - The bean definitions for the profile.

createProfile

public abstract Profile createProfile(java.lang.String name,
                                      java.lang.String... ids)
Creates a new Profile with all registered beans included and with beans from specified ids, if any, enabled.

Parameters:
name - The name of the profile.
ids - Beans to enable for the profile.

createAuditor

public abstract Auditor createAuditor(ModelTypeFactory factory,
                                      java.lang.Class<? extends Analyzer>... analyzers)
Creates an Auditor. If no analyzers are specified, then all registered analyzers are included.

Parameters:
factory - The factory for the models to audit.

createAuditor

public abstract Auditor createAuditor(java.lang.Class<? extends Analyzer>... analyzers)
Creates an Auditor which uses the default model type factory. If no analyzers are specified, then all registered analyzers are included.


createModel

public abstract AuditModel createModel()
Creates an AuditModel.


runShowLogPage

public abstract AuditModel runShowLogPage(Context context,
                                          Auditor auditor,
                                          java.lang.String label,
                                          java.lang.Thread.UncaughtExceptionHandler handler)
Creates and shows an Audit log page for an Auditor, and runs the audit. If a log page already exists for the label and the associated auditor is still auditing, that audit is cancelled, and that auditor is replaced by the auditor passed to this method.

Parameters:
context - The current IDE context.
auditor - The auditor to run the audit.
label - The label for the log page.
handler - A handler for uncaught exceptions, or null for a default.
Returns:
the AuditModel, attached to the auditor, shown in the page.
Throws:
java.lang.IllegalStateException - if the auditor is already running.

showLogPage

public abstract void showLogPage(Context context,
                                 Auditor auditor,
                                 AuditModel model,
                                 java.lang.String label)
Creates and shows an Audit log page for an Auditor and model. The caller is responsible for attaching the model to the auditor and for running the audit.

Parameters:
context - The current IDE context.
auditor - The auditor running the audit.
model - The AuditModel, attached to the auditor, to be shown.
label - The label for the log page.

createTransformer

public abstract Transformer createTransformer()
Creates a Transformer.


getStyleSheets

public abstract java.util.Collection<java.net.URL> getStyleSheets()
Gets the style sheet URLs registered with this Audit manager.


getProfileStyleSheets

public abstract java.util.Collection<java.net.URL> getProfileStyleSheets()
Gets the profile style sheet URLs registered with this Audit manager.


getBeanCustomizers

public abstract java.util.Map<java.lang.Class<?>,BeanCustomizer> getBeanCustomizers()
Gets the bean customizers registered with this Audit manager.


Oracle Fusion Middleware Java API Reference for Oracle Extension SDK
11g Release 2 (11.1.2.1.0)

E17493-02

Copyright © 1997, 2011, Oracle. All rights reserved.