Oracle Fusion Middleware Java API Reference for Oracle Extension SDK Reference
11g Release 1 (11.1.1.1.0)

E13403-02

oracle.jdevimpl.audit.log
Class AuditLogPage

java.lang.Object
  extended by oracle.ide.view.View
      extended by oracle.ide.log.AbstractLogPage
          extended by oracle.jdevimpl.audit.log.AuditLogPage
All Implemented Interfaces:
java.util.EventListener, javax.swing.event.TreeSelectionListener, ContextMenuListener, Controller, ControllerProvider, Helpable, LogPage, AuditModelListener, TransformerListener, AuditTreeTable.RowActionListener

public class AuditLogPage
extends AbstractLogPage
implements AuditModelListener, ContextMenuListener, Controller, javax.swing.event.TreeSelectionListener, AuditTreeTable.RowActionListener, TransformerListener

An Audit results log page.

To release resources when the page is closed, the only straightforward way I've found is to do it from the removeMouseListener(java.awt.event.MouseListener)method.


Field Summary
static int ABOUT_CID
           
static int CANCEL_CID
           
static int COLLAPSE_ALL_CID
           
static int DEFAULT_FIX_CID
           
static int EXPAND_ALL_CID
           
static int EXPORT_CID
           
static int FIX_CID
           
static int GOTO_SOURCE_CID
           
static int GROUP_CID
           
static int HIDE_ISSUES_CID
           
static int REFRESH_CID
           
static int SHOW_ANOMALIES_CID
           
static int UNHIDE_ALL_ISSUES_CID
           
 
Fields inherited from class oracle.ide.view.View
EMPTY_SELECTION, PROJECT_PROP, VISIBLE_PROP, WORKSPACE_PROP
 
Fields inherited from interface oracle.ide.controller.Controller
UPDATE_FROM_ACTION_PERFORMED, UPDATE_FROM_ACTIVE_VIEW_CHANGED, UPDATE_FROM_UNDO, UPDATE_FROM_USER_EXTENSION, UPDATE_FROM_VIEW_SELECTION_CHANGED
 
Method Summary
 void addMouseListener(java.awt.event.MouseListener listener)
          This implemenation does nothing.
 void appliedTransformsChanged(AuditModel model, java.lang.Object row, java.util.List<Transform> appliedTransforms)
          Reports that the transforms applied to this model have changed.
static AuditLogPage auditLogPage(Auditor auditor, AuditModel model, java.lang.String label)
          Creates the log page for an auditor.
 void auditStarted(AuditModel model, java.util.List<Metric> columns, java.lang.Object root)
          Reports that an audit has started on this model.
 void auditStopped(AuditModel model, boolean cancelled)
          Reports that an audit has stopped on this model.
 void clearAll()
          Clear all currently displayed messages.
 void countChanged(AuditModel model, java.lang.Object row, AuditModel.Count count, int oldValue, int newValue)
          Reports that a count of a row changed in a model.
 java.awt.Component getComponent()
           
 ContextMenu getContextMenu()
           
 Controller getController()
          Get the Controller associated with this view.
 java.awt.Component getGUI()
           
 HelpInfo getHelpInfo()
           
 AuditTreeTable getTable()
           
 Toolbar getToolbar()
          Get the toolbar associated with this view.
 java.lang.String getToolTip()
          Get the tooltip to display when this page is tabbed.
 java.awt.Component getTopComponent()
          Gets the component to put in the top component position in the log page display By default returns getLogPageView().getToolbar()
 boolean handleDefaultAction(Context context)
          Called when the user double clicks on an item that has a context menu.
 boolean handleEvent(IdeAction action, Context context)
          This method is called when a user interaction with a View triggers the execution of a command.
static boolean isReady(java.lang.String label)
          Gets whether the log page for an auditor is ready to be reused.
protected  void logMsg(java.lang.Object message)
          Display the specified msg.
 void menuWillHide(ContextMenu menu)
          This method is called just before a showing context menu is dismissed.
 void menuWillShow(ContextMenu menu)
          Called just before the context menu is shown.
 void modelResorted(AuditModel model)
          Reports that the model has been resorted.
 void modelSaved(ModelAdapter model)
          Notifies the listener that a model was saved.
 void removeMouseListener(java.awt.event.MouseListener listener)
          This implemenation does nothing.
 void rowActionPerformed(AuditTreeTable table, int row)
           
 void rowsHidden(AuditModel model, java.util.List<?> rows, java.lang.Object visibleParent, int visibleIndex)
          Reports that rows were shown in a model.
 void rowsInserted(AuditModel model, java.util.List<?> rows, java.lang.Object parent, int index)
          Reports that rows were inserted into a model.
 void rowsRemoved(AuditModel model, java.util.List<?> rows, java.lang.Object parent, int index)
          Reports that rows were removed from a model.
 void rowsRestructureBegin(AuditModel model, java.lang.Object parent, java.lang.Object visibleParent)
          Reports that a restructure of the descendants of a row has begun.
 void rowsRestructureEnd(AuditModel model, java.lang.Object parent, java.lang.Object visibleParent)
          Reports that a restructure of the descendants of a row has ended.
 void rowsShown(AuditModel model, java.util.List<?> rows, java.lang.Object visibleParent, int visibleIndex)
          Reports that rows were shown in a model.
 boolean saveFailed(java.lang.Throwable exception, ModelAdapter model, java.lang.String label)
          Notifies the listener that saving a model failed.
 void setLocationRelativeTo(javax.swing.JDialog dialog, java.awt.Component c)
           
 void show()
          Shows the view if hidden.
 java.lang.String toString()
           
 boolean transformFailed(java.lang.Throwable exception, Violation violation, Transform transform, java.lang.String label)
          Notifies the listener that a transform failed.
 boolean update(IdeAction action, Context context)
          This method updates the enabled status of the specified action within the specified context.
 void valueChanged(AuditModel model, java.lang.Object row, int column, java.lang.Object oldValue, java.lang.Object newValue)
          Reports that a column value of a row changed in a model.
 void valueChanged(javax.swing.event.TreeSelectionEvent e)
           
 
Methods inherited from class oracle.ide.log.AbstractLogPage
close, getBottomComponent, getLogPageView, getTabIcon, getTabName, getTitleName, isDisplayComponentScrollable, isVisible, log, log, logQuietly, requestShow, requestShow, setOwner, tabNameUpdated
 
Methods inherited from class oracle.ide.view.View
activate, addViewListener, addViewSelectionListener, addViewStateListener, deactivate, fireViewCollapsed, fireViewExpanded, fireViewSelectionChanged, getContext, getContext, getId, getSelection, getSelectionFromUI, getViewWithoutDecoration, loadLayout, loadManifestToolbar, loadManifestToolbar, newId, owner, removeViewListener, removeViewSelectionListener, removeViewStateListener, saveLayout, scheduleUpdateSelection, setId, setOwner, setToolbarVisible, updateSelection, updateSelectionImpl, updateTitle, updateToolbarActions, updateVisibleActions, updateVisibleActions
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

REFRESH_CID

public static final int REFRESH_CID

CANCEL_CID

public static final int CANCEL_CID

EXPORT_CID

public static final int EXPORT_CID

EXPAND_ALL_CID

public static final int EXPAND_ALL_CID

COLLAPSE_ALL_CID

public static final int COLLAPSE_ALL_CID

GROUP_CID

public static final int GROUP_CID

SHOW_ANOMALIES_CID

public static final int SHOW_ANOMALIES_CID

GOTO_SOURCE_CID

public static final int GOTO_SOURCE_CID

ABOUT_CID

public static final int ABOUT_CID

FIX_CID

public static final int FIX_CID

DEFAULT_FIX_CID

public static final int DEFAULT_FIX_CID

HIDE_ISSUES_CID

public static final int HIDE_ISSUES_CID

UNHIDE_ALL_ISSUES_CID

public static final int UNHIDE_ALL_ISSUES_CID
Method Detail

isReady

public static boolean isReady(java.lang.String label)
Gets whether the log page for an auditor is ready to be reused.

Parameters:
label - the label of the log page to test.
Returns:
whether the log page is read to be reused.

auditLogPage

public static AuditLogPage auditLogPage(Auditor auditor,
                                        AuditModel model,
                                        java.lang.String label)
Creates the log page for an auditor. If an appropriate log page already exists, that page is reused. If the page did not exist, it will be added to the log manager by the auditStarted(oracle.jdeveloper.audit.service.AuditModel, java.util.List, java.lang.Object) method.

Parameters:
auditor - The auditor running the audit to be logged.
model - The model attached to the auditor.
label - The label of the log page.
Returns:
The log page for the auditor.

getToolTip

public java.lang.String getToolTip()
Description copied from interface: LogPage
Get the tooltip to display when this page is tabbed.

Specified by:
getToolTip in interface LogPage
Overrides:
getToolTip in class AbstractLogPage
Returns:
the tooltip to display when tabbed.

getHelpInfo

public HelpInfo getHelpInfo()
Specified by:
getHelpInfo in interface Helpable
Overrides:
getHelpInfo in class View

getTopComponent

public java.awt.Component getTopComponent()
Description copied from class: AbstractLogPage
Gets the component to put in the top component position in the log page display By default returns getLogPageView().getToolbar()

Overrides:
getTopComponent in class AbstractLogPage
Returns:
the component to put in the top component position in the log page display

getToolbar

public Toolbar getToolbar()
Description copied from class: View
Get the toolbar associated with this view.

Overrides:
getToolbar in class View

auditStarted

public void auditStarted(AuditModel model,
                         java.util.List<Metric> columns,
                         java.lang.Object root)
Description copied from interface: AuditModelListener
Reports that an audit has started on this model. Old rows and columns were removed, the new root and columns added. The new root has no children.

Specified by:
auditStarted in interface AuditModelListener
Parameters:
model - the affected model.
columns - the new columns.
root - the new root.

auditStopped

public void auditStopped(AuditModel model,
                         boolean cancelled)
Description copied from interface: AuditModelListener
Reports that an audit has stopped on this model.

Specified by:
auditStopped in interface AuditModelListener
Parameters:
model - the affected model.
cancelled - whether the audit was cancelled.

rowsInserted

public void rowsInserted(AuditModel model,
                         java.util.List<?> rows,
                         java.lang.Object parent,
                         int index)
Description copied from interface: AuditModelListener
Reports that rows were inserted into a model.

The inserted row is childless and not visible.

The model invokes AuditModelListener.rowsShown(oracle.jdeveloper.audit.service.AuditModel, java.util.List, java.lang.Object, int) immediately after this method for any of the rows that are visible.

The model propagates visibility or count changes to the parent row and its ancestors as described in the class comment.

Specified by:
rowsInserted in interface AuditModelListener
Parameters:
model - The changed model.
rows - The shown rows, adjacent if more than one.
parent - The parent of the row.
index - The index of the shown rows in the parent.

rowsRemoved

public void rowsRemoved(AuditModel model,
                        java.util.List<?> rows,
                        java.lang.Object parent,
                        int index)
Description copied from interface: AuditModelListener
Reports that rows were removed from a model.

The model invokes AuditModelListener.rowsHidden(oracle.jdeveloper.audit.service.AuditModel, java.util.List, java.lang.Object, int) immediately before this method for any of the rows that were visible.

The model propagates visibility or count changes to the parent row and its ancestors as described in the class comment.

Specified by:
rowsRemoved in interface AuditModelListener
Parameters:
model - The changed model.
rows - The removed rows, adjacent if more than one.
parent - The parent of the removed rows.
index - The index of the removed rows in the parent.

rowsShown

public void rowsShown(AuditModel model,
                      java.util.List<?> rows,
                      java.lang.Object visibleParent,
                      int visibleIndex)
Description copied from interface: AuditModelListener
Reports that rows were shown in a model. The model invokes AuditModelListener.countChanged(oracle.jdeveloper.audit.service.AuditModel, java.lang.Object, oracle.jdeveloper.audit.service.AuditModel.Count, int, int) immediately after this method for each changed count of the parent row.

The model propagates visibility or count changes to the parent row and its ancestors as described in the class comment.

Specified by:
rowsShown in interface AuditModelListener
Parameters:
model - The changed model.
rows - The shown rows, adjacent if more than one.
visibleParent - The visible parent row of the shown rows.
visibleIndex - The visible index of the shown rows in the visible parent.

rowsHidden

public void rowsHidden(AuditModel model,
                       java.util.List<?> rows,
                       java.lang.Object visibleParent,
                       int visibleIndex)
Description copied from interface: AuditModelListener
Reports that rows were shown in a model. The model invokes AuditModelListener.countChanged(oracle.jdeveloper.audit.service.AuditModel, java.lang.Object, oracle.jdeveloper.audit.service.AuditModel.Count, int, int) immediately after this method for each changed count of the parent row.

The model propagates visibility or count changes to the parent row and its ancestors as described in the class comment.

Specified by:
rowsHidden in interface AuditModelListener
Parameters:
model - The changed model.
rows - The hidden rows, adjacent if more than one.
visibleParent - The visible parent row of the hidden rows.
visibleIndex - The visible index of the hidden rows in the visible parent.

rowsRestructureBegin

public void rowsRestructureBegin(AuditModel model,
                                 java.lang.Object parent,
                                 java.lang.Object visibleParent)
Description copied from interface: AuditModelListener
Reports that a restructure of the descendants of a row has begun.

Specified by:
rowsRestructureBegin in interface AuditModelListener
Parameters:
model - The changed model.
parent - The parent of the restructured rows.
visibleParent - The visible parent row of the restructured rows.

rowsRestructureEnd

public void rowsRestructureEnd(AuditModel model,
                               java.lang.Object parent,
                               java.lang.Object visibleParent)
Description copied from interface: AuditModelListener
Reports that a restructure of the descendants of a row has ended.

Specified by:
rowsRestructureEnd in interface AuditModelListener
Parameters:
model - The changed model.
parent - The parent of the restructured rows.
visibleParent - The visible parent row of the restructured rows.

countChanged

public void countChanged(AuditModel model,
                         java.lang.Object row,
                         AuditModel.Count count,
                         int oldValue,
                         int newValue)
Description copied from interface: AuditModelListener
Reports that a count of a row changed in a model.

The model propagates visibility or count changes to the parent row and its ancestors as described in the class comment.

Specified by:
countChanged in interface AuditModelListener
Parameters:
model - The changed model.
row - The changed row in the model.
count - The count that change.
oldValue - The old value of the count.
newValue - The new value of the count.

valueChanged

public void valueChanged(AuditModel model,
                         java.lang.Object row,
                         int column,
                         java.lang.Object oldValue,
                         java.lang.Object newValue)
Description copied from interface: AuditModelListener
Reports that a column value of a row changed in a model. If the change in value affects the index of the row in its parent, the model immediately invokes AuditModelListener.rowsHidden(oracle.jdeveloper.audit.service.AuditModel, java.util.List, java.lang.Object, int), AuditModelListener.rowsRemoved(oracle.jdeveloper.audit.service.AuditModel, java.util.List, java.lang.Object, int), AuditModelListener.rowsInserted(oracle.jdeveloper.audit.service.AuditModel, java.util.List, java.lang.Object, int), and AuditModelListener.rowsShown(oracle.jdeveloper.audit.service.AuditModel, java.util.List, java.lang.Object, int) as needed.

Specified by:
valueChanged in interface AuditModelListener
Parameters:
model - The changed model.
row - The changed row in the model.
column - The column index of the changed value.
oldValue - The old value.
newValue - The new value.

modelResorted

public void modelResorted(AuditModel model)
Description copied from interface: AuditModelListener
Reports that the model has been resorted.

Specified by:
modelResorted in interface AuditModelListener
Parameters:
model - The resorted model.

appliedTransformsChanged

public void appliedTransformsChanged(AuditModel model,
                                     java.lang.Object row,
                                     java.util.List<Transform> appliedTransforms)
Description copied from interface: AuditModelListener
Reports that the transforms applied to this model have changed.

Specified by:
appliedTransformsChanged in interface AuditModelListener
Parameters:
model - The changed model.
row - The row in the model just restructured.
appliedTransforms - The transforms applied to the row.

valueChanged

public void valueChanged(javax.swing.event.TreeSelectionEvent e)
Specified by:
valueChanged in interface javax.swing.event.TreeSelectionListener

rowActionPerformed

public void rowActionPerformed(AuditTreeTable table,
                               int row)
Specified by:
rowActionPerformed in interface AuditTreeTable.RowActionListener

getGUI

public java.awt.Component getGUI()
Specified by:
getGUI in class View
Returns:
the root graphical user interface component.

clearAll

public void clearAll()
Description copied from interface: LogPage
Clear all currently displayed messages.

Specified by:
clearAll in interface LogPage
Overrides:
clearAll in class AbstractLogPage

logMsg

protected void logMsg(java.lang.Object message)
Description copied from class: AbstractLogPage
Display the specified msg. Subclasses must override this method instead of the log method. The log method makes sure that the page is visible before calling this method.

Overrides:
logMsg in class AbstractLogPage
Parameters:
message - the message to display.

getController

public Controller getController()
Description copied from interface: ControllerProvider
Get the Controller associated with this view.

Specified by:
getController in interface ControllerProvider
Overrides:
getController in class AbstractLogPage
Returns:
the Controller associated with this view.

getContextMenu

public ContextMenu getContextMenu()
Overrides:
getContextMenu in class View
Returns:
the ContextMenu, if any.

show

public void show()
Description copied from class: View
Shows the view if hidden. Raises the view to the top if covered by other windows.

Overrides:
show in class AbstractLogPage

addMouseListener

public void addMouseListener(java.awt.event.MouseListener listener)
Description copied from class: AbstractLogPage
This implemenation does nothing. Subclasses must override this method in order to correctly set the specified listener on the graphical components that receive mouse events.

Specified by:
addMouseListener in interface LogPage
Overrides:
addMouseListener in class AbstractLogPage
Parameters:
listener - mouse listener responsible for displaying a context menu.

removeMouseListener

public void removeMouseListener(java.awt.event.MouseListener listener)
Description copied from class: AbstractLogPage
This implemenation does nothing. Subclasses must override this method in order to correctly remove the specified listener from the graphical components that receive mouse events.

Specified by:
removeMouseListener in interface LogPage
Overrides:
removeMouseListener in class AbstractLogPage
Parameters:
listener - mouse listener responsible for displaying a context menu.

getComponent

public java.awt.Component getComponent()

handleDefaultAction

public boolean handleDefaultAction(Context context)
Description copied from interface: ContextMenuListener
Called when the user double clicks on an item that has a context menu. If the listener handles the action, then it must return true; otherwise it must return false. Processing of handleDefaultAction stops on the first return of true.

Specified by:
handleDefaultAction in interface ContextMenuListener
Parameters:
context - the context on which the default action needs to occur.

menuWillHide

public void menuWillHide(ContextMenu menu)
Description copied from interface: ContextMenuListener
This method is called just before a showing context menu is dismissed. Most implementations should not do anything in this method. In particular, it is not necessary to clean out menu items or submenus that were added during ContextMenuListener.menuWillShow(oracle.ide.controller.ContextMenu), since the IDE takes care of that automatically.

Specified by:
menuWillHide in interface ContextMenuListener
Parameters:
menu - the context menu being hidden

menuWillShow

public void menuWillShow(ContextMenu menu)
Description copied from interface: ContextMenuListener
Called just before the context menu is shown. Implementations should add their items to the context menu here.

Specified by:
menuWillShow in interface ContextMenuListener
Parameters:
menu - the context menu being shown

update

public boolean update(IdeAction action,
                      Context context)
Description copied from interface: Controller
This method updates the enabled status of the specified action within the specified context. It should generally be called on the controller associated with the active view to allow that controller to take the first crack at determining its enabled status. If that controller wants to update its enabled status, it does so and returns true to indicate that further controllers do not need to be consulted. If the controller does not deal with setting the enabled status of an action, it delegates the request to its supervising controller, all the way up to the Ide. The Ide has a special implementation of update(xx) that further delegates the request to root controllers, until one of them returns true indicating the request was handled by the controller.

Specified by:
update in interface Controller
Parameters:
action - action whose command is to be executed.
context - the current context
Returns:
true if the controller handles the specified command.

handleEvent

public boolean handleEvent(IdeAction action,
                           Context context)
Description copied from interface: Controller
This method is called when a user interaction with a View triggers the execution of a command.

Specified by:
handleEvent in interface Controller
Parameters:
action - action whose command is to be executed.
Returns:
true if the controller handles the specified command.

setLocationRelativeTo

public void setLocationRelativeTo(javax.swing.JDialog dialog,
                                  java.awt.Component c)

toString

public java.lang.String toString()
Overrides:
toString in class View

transformFailed

public boolean transformFailed(java.lang.Throwable exception,
                               Violation violation,
                               Transform transform,
                               java.lang.String label)
Description copied from interface: TransformerListener
Notifies the listener that a transform failed. The transformer does not hold a read lock on the model the transform was attempting to modify, but the transform is bound to the violation.

Specified by:
transformFailed in interface TransformerListener
Parameters:
exception - The exception that indicated failure.
violation - The violation being associated with the transform.
transform - The transform that failed.
label - The label for the transform transaction.
Returns:
true to continue the transaction, false to abort it.

modelSaved

public void modelSaved(ModelAdapter model)
Description copied from interface: TransformerListener
Notifies the listener that a model was saved.

Specified by:
modelSaved in interface TransformerListener
Parameters:
model - The model that was saved.

saveFailed

public boolean saveFailed(java.lang.Throwable exception,
                          ModelAdapter model,
                          java.lang.String label)
Description copied from interface: TransformerListener
Notifies the listener that saving a model failed.

Specified by:
saveFailed in interface TransformerListener
Parameters:
exception - The exception that indicated failure.
model - The model which could not be saved.
label - The label for the transform transaction.
Returns:
true to continue the transaction, false to abort it.

getTable

public AuditTreeTable getTable()

Oracle Fusion Middleware Java API Reference for Oracle Extension SDK Reference
11g Release 1 (11.1.1.1.0)

E13403-02

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