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

E13403-04

oracle.jdevimpl.audit.core
Class DefaultAuditModel

java.lang.Object
  extended by oracle.jdevimpl.audit.core.AbstractAuditModel
      extended by oracle.jdevimpl.audit.core.DefaultAuditModel
All Implemented Interfaces:
java.util.EventListener, AuditListener, AuditModel

public class DefaultAuditModel
extends AbstractAuditModel
implements AuditListener

The default implementation of a model of an audit.

See Also:
AuditModel, AuditModelListener

Nested Class Summary
 
Nested classes/interfaces inherited from interface oracle.jdeveloper.audit.service.AuditModel
AuditModel.Count
 
Constructor Summary
DefaultAuditModel()
           
 
Method Summary
 void addFilter(AuditModelFilter filter)
          Adds a filter to this model.
 void auditorCleared(Auditor auditor)
          Reports an auditor cleared event.
 void auditStarted(Auditor auditor, java.util.List<Metric> columns, java.util.List<Location> locations, Location root, java.lang.Class type)
          Reports an Auditor audit started event.
 void auditStopped(Auditor auditor, boolean cancelled)
          Reports an Auditor audit stopped event.
 void clear()
          Clears all rows from the model.
<T extends AuditModelFilter>
T
findFilter(java.lang.Class<T> type)
          Finds a filter of this model of a specified type.
 java.util.Comparator<java.lang.Object> getChildComparator()
          Gets the comparator used to sort the children of row of this model.
 int getChildCount(java.lang.Object row)
          Gets the number of children of a row of this model.
 java.util.List<?> getChildren(java.lang.Object row)
          Gets the children of a row of this model.
 Metric getColumn(int index)
          Gets the column at an index.
 int getColumnCount()
          Gets the number of columns in this model.
 int getColumnIndex(Metric column)
          Gets the index of a column.
 int getCount(java.lang.Object row, AuditModel.Count count)
          Gets the value of a count of a row of this model.
 Displayable getDisplayable(java.lang.Object row)
          Gets a Displayable describing a row of this model.
 Location getFocusLocation(java.lang.Object row)
          Gets the focus Location of an object represented by a row in this model.
 int getIndexOf(java.lang.Object row)
          Gets the index of a row of this model in the children of its parent, 0 for the root row.
 Location getLocation(java.lang.Object row)
          Gets the Location of an object represented by a row of this model.
 java.util.List<Location> getLocations()
          Gets the locations audited to create this model.
 java.lang.Object getParent(java.lang.Object row)
          Gets the parent row of a row of this model, null for the root row.
 Profile getProfile()
          Gets the profile used to create this model.
 java.lang.Object getRoot()
          Gets the root row of this model, null if none.
 Severity getSeverity(java.lang.Object row)
          Gets the worst severity of the issues contained by a row of this model, or null if none.
 int getSortColumn()
          Gets the selected primary sort column.
 int getSortDirection()
          Gets the sort direction of the primary sort column, 1 for ascending, -1 for descending.
 java.util.List<Transform> getTransformsApplied(Violation violation)
          Gets the transforms applied to a violation of this model, in application order.
 java.lang.Class getType(java.lang.Object row)
          Gets the type of an object of this model.
 java.lang.Object getValue(java.lang.Object row, int columnIndex)
          Gets the value of a column of a row of this model.
 Violation getViolation(java.lang.Object row)
          Gets the violation represented by a row of this model, or null if the row does not represent a violation.
 int getVisibleChildCount(java.lang.Object row)
          Gets the number of visible children of a row of this model.
 java.util.List<?> getVisibleChildren(java.lang.Object row)
          Gets the visible children of a row of this model.
 int getVisibleIndexOf(java.lang.Object row)
          Gets the index of a row of this model in the visible children of its visible parent, 0 for the root row.
 java.lang.Object getVisibleParent(java.lang.Object row)
          Gets the visible parent row of a row of this model, null for the root row.
 boolean hasChildren(java.lang.Object row)
          Gets whether a row of this model has children.
 boolean hasVisibleChildren(java.lang.Object row)
          Gets whether a row of this model has visible children.
 boolean isLeaf(java.lang.Object row)
          Gets whether a row of this model ,i>can have children.
 boolean isOutOfBand(java.lang.Object row)
          Gets whether the value of any column of a row of this model is out-of-band.
 boolean isOutOfBand(java.lang.Object row, int columnIndex)
          Gets whether the value of a column of a row of this model is out-of-band.
 void issueReported(Auditor auditor, Violation issue, int transformMask)
          Reports an Auditor violation reported event.
 boolean isViolation(java.lang.Object row)
          Gets whether the object represented by a row of this model is a violation.
 boolean isVisible(java.lang.Object row)
          Gets whether a row of this model is visible.
 java.lang.Object iterateChildren(java.lang.Object row, Iteration iteration)
          Iterates the children of a row of this model.
 Violation iterateViolations(java.lang.Object row, Iteration iteration)
          Iterates the violations contained by a row of this model.
 void locationEntered(Auditor auditor, Location location, java.lang.Class type)
          Reports an Auditor location entered event.
 void locationExited(Auditor auditor, Location location)
          Reports an Auditor location exited event.
 void modelEntered(Auditor auditor, ModelAdapter model)
          Reports an Auditor model entered event.
 void modelExited(Auditor auditor, ModelAdapter model)
          Reports an Auditor model exited event.
 void phaseStarted(Auditor auditor, java.lang.String phaseName)
          Reports an Auditor phase started event.
 void removeFilter(AuditModelFilter filter)
          Removes a filter from this model.
 void setSortColumn(int column)
          Sets the primary sort column for children of a row of this model, or null to sort by AuditModel.getLocation(java.lang.Object).
 void setTransformDone(Transform transform, Violation violation)
          Sets a transform done for a violation of this model.
 void setTransformUndone(Transform transform, Violation violation)
          Sets a transform undone for a violation of this model.
 void setValue(java.lang.Object row, int columnIndex, java.lang.Object value)
          Sets the value of an column of a row of this model.
 java.lang.String toString()
           
 void valueReported(Auditor auditor, Location location, Metric metric, java.lang.Object newValue)
          Reports an Auditor value reported event.
 
Methods inherited from class oracle.jdevimpl.audit.core.AbstractAuditModel
addAuditModelListener, fireAppliedTransformsChanged, fireAuditStarted, fireAuditStopped, fireCountChanged, fireModelResorted, fireRowsHidden, fireRowsInserted, fireRowsRemoved, fireRowsRestructureBegin, fireRowsRestructureEnd, fireRowsShown, fireValueChanged, removeAuditModelListener
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DefaultAuditModel

public DefaultAuditModel()
Method Detail

getProfile

public Profile getProfile()
Description copied from interface: AuditModel
Gets the profile used to create this model.

Specified by:
getProfile in interface AuditModel

getLocations

public java.util.List<Location> getLocations()
Description copied from interface: AuditModel
Gets the locations audited to create this model.

Specified by:
getLocations in interface AuditModel

getColumnCount

public int getColumnCount()
Description copied from interface: AuditModel
Gets the number of columns in this model.

Specified by:
getColumnCount in interface AuditModel

getColumn

public Metric getColumn(int index)
Description copied from interface: AuditModel
Gets the column at an index.

Specified by:
getColumn in interface AuditModel

getColumnIndex

public int getColumnIndex(Metric column)
Description copied from interface: AuditModel
Gets the index of a column.

Specified by:
getColumnIndex in interface AuditModel

setSortColumn

public void setSortColumn(int column)
Description copied from interface: AuditModel
Sets the primary sort column for children of a row of this model, or null to sort by AuditModel.getLocation(java.lang.Object). If the specified column is already the primary sort column, toggles the sort direction.

Specified by:
setSortColumn in interface AuditModel

getSortColumn

public int getSortColumn()
Description copied from interface: AuditModel
Gets the selected primary sort column. If null, natural row order

Specified by:
getSortColumn in interface AuditModel

getSortDirection

public int getSortDirection()
Description copied from interface: AuditModel
Gets the sort direction of the primary sort column, 1 for ascending, -1 for descending.

Specified by:
getSortDirection in interface AuditModel

clear

public void clear()
Description copied from interface: AuditModel
Clears all rows from the model.

Specified by:
clear in interface AuditModel

getRoot

public java.lang.Object getRoot()
Description copied from interface: AuditModel
Gets the root row of this model, null if none.

Specified by:
getRoot in interface AuditModel

getParent

public java.lang.Object getParent(java.lang.Object row)
Description copied from interface: AuditModel
Gets the parent row of a row of this model, null for the root row.

Specified by:
getParent in interface AuditModel

getIndexOf

public int getIndexOf(java.lang.Object row)
Description copied from interface: AuditModel
Gets the index of a row of this model in the children of its parent, 0 for the root row.

Specified by:
getIndexOf in interface AuditModel

isLeaf

public boolean isLeaf(java.lang.Object row)
Description copied from interface: AuditModel
Gets whether a row of this model ,i>can have children.

Specified by:
isLeaf in interface AuditModel

hasChildren

public boolean hasChildren(java.lang.Object row)
Description copied from interface: AuditModel
Gets whether a row of this model has children.

Specified by:
hasChildren in interface AuditModel

getChildCount

public int getChildCount(java.lang.Object row)
Description copied from interface: AuditModel
Gets the number of children of a row of this model.

Specified by:
getChildCount in interface AuditModel

getChildren

public java.util.List<?> getChildren(java.lang.Object row)
Description copied from interface: AuditModel
Gets the children of a row of this model.

Specified by:
getChildren in interface AuditModel

getChildComparator

public java.util.Comparator<java.lang.Object> getChildComparator()
Description copied from interface: AuditModel
Gets the comparator used to sort the children of row of this model.

The order reflects invocations of AuditModel.setSortColumn(int).

Specified by:
getChildComparator in interface AuditModel

isVisible

public boolean isVisible(java.lang.Object row)
Description copied from interface: AuditModel
Gets whether a row of this model is visible.

Specified by:
isVisible in interface AuditModel

addFilter

public void addFilter(AuditModelFilter filter)
Adds a filter to this model.

The model hides any row for which any filter of the model returns false from AuditModelFilter.isVisible(java.lang.Object).

Specified by:
addFilter in interface AuditModel

removeFilter

public void removeFilter(AuditModelFilter filter)
Removes a filter from this model.

Specified by:
removeFilter in interface AuditModel

findFilter

public <T extends AuditModelFilter> T findFilter(java.lang.Class<T> type)
Finds a filter of this model of a specified type.

Specified by:
findFilter in interface AuditModel

getVisibleParent

public java.lang.Object getVisibleParent(java.lang.Object row)
Description copied from interface: AuditModel
Gets the visible parent row of a row of this model, null for the root row.

Specified by:
getVisibleParent in interface AuditModel

getVisibleIndexOf

public int getVisibleIndexOf(java.lang.Object row)
Description copied from interface: AuditModel
Gets the index of a row of this model in the visible children of its visible parent, 0 for the root row.

Specified by:
getVisibleIndexOf in interface AuditModel

hasVisibleChildren

public boolean hasVisibleChildren(java.lang.Object row)
Description copied from interface: AuditModel
Gets whether a row of this model has visible children.

Specified by:
hasVisibleChildren in interface AuditModel

getVisibleChildCount

public int getVisibleChildCount(java.lang.Object row)
Description copied from interface: AuditModel
Gets the number of visible children of a row of this model.

Specified by:
getVisibleChildCount in interface AuditModel

getVisibleChildren

public java.util.List<?> getVisibleChildren(java.lang.Object row)
Description copied from interface: AuditModel
Gets the visible children of a row of this model.

Specified by:
getVisibleChildren in interface AuditModel

iterateChildren

public java.lang.Object iterateChildren(java.lang.Object row,
                                        Iteration iteration)
Description copied from interface: AuditModel
Iterates the children of a row of this model.

Specified by:
iterateChildren in interface AuditModel
Returns:
null if the iteration completed normally, or the last object processed if the iteration was aborted.

iterateViolations

public Violation iterateViolations(java.lang.Object row,
                                   Iteration iteration)
Description copied from interface: AuditModel
Iterates the violations contained by a row of this model.

Specified by:
iterateViolations in interface AuditModel
Returns:
null if the iteration completed normally, or the last object processed if the iteration was aborted.

getLocation

public Location getLocation(java.lang.Object row)
Description copied from interface: AuditModel
Gets the Location of an object represented by a row of this model.

Specified by:
getLocation in interface AuditModel

getFocusLocation

public Location getFocusLocation(java.lang.Object row)
Description copied from interface: AuditModel
Gets the focus Location of an object represented by a row in this model.

Specified by:
getFocusLocation in interface AuditModel

isViolation

public boolean isViolation(java.lang.Object row)
Description copied from interface: AuditModel
Gets whether the object represented by a row of this model is a violation.

Specified by:
isViolation in interface AuditModel

getViolation

public Violation getViolation(java.lang.Object row)
Description copied from interface: AuditModel
Gets the violation represented by a row of this model, or null if the row does not represent a violation.

Specified by:
getViolation in interface AuditModel

getType

public java.lang.Class getType(java.lang.Object row)
Description copied from interface: AuditModel
Gets the type of an object of this model. If the object represented by the row is a construct, the type is one of the types returned by:
     getLocation(row).getModel().getType().getPresentationTypes()
 
If the object is a violation, the type is Violation.

Specified by:
getType in interface AuditModel
See Also:
ModelType.getPresentationTypes()

getDisplayable

public Displayable getDisplayable(java.lang.Object row)
Description copied from interface: AuditModel
Gets a Displayable describing a row of this model.

Specified by:
getDisplayable in interface AuditModel

getValue

public java.lang.Object getValue(java.lang.Object row,
                                 int columnIndex)
Description copied from interface: AuditModel
Gets the value of a column of a row of this model.

Specified by:
getValue in interface AuditModel

setValue

public void setValue(java.lang.Object row,
                     int columnIndex,
                     java.lang.Object value)
Description copied from interface: AuditModel
Sets the value of an column of a row of this model.

Specified by:
setValue in interface AuditModel

getCount

public int getCount(java.lang.Object row,
                    AuditModel.Count count)
Description copied from interface: AuditModel
Gets the value of a count of a row of this model.

Specified by:
getCount in interface AuditModel

getSeverity

public Severity getSeverity(java.lang.Object row)
Description copied from interface: AuditModel
Gets the worst severity of the issues contained by a row of this model, or null if none.

Specified by:
getSeverity in interface AuditModel

isOutOfBand

public boolean isOutOfBand(java.lang.Object row,
                           int columnIndex)
Description copied from interface: AuditModel
Gets whether the value of a column of a row of this model is out-of-band.

Specified by:
isOutOfBand in interface AuditModel

isOutOfBand

public boolean isOutOfBand(java.lang.Object row)
Description copied from interface: AuditModel
Gets whether the value of any column of a row of this model is out-of-band.

Specified by:
isOutOfBand in interface AuditModel

getTransformsApplied

public java.util.List<Transform> getTransformsApplied(Violation violation)
Description copied from interface: AuditModel
Gets the transforms applied to a violation of this model, in application order. Transforms done and then undone are not included.

Specified by:
getTransformsApplied in interface AuditModel

setTransformDone

public void setTransformDone(Transform transform,
                             Violation violation)
Description copied from interface: AuditModel
Sets a transform done for a violation of this model.

Specified by:
setTransformDone in interface AuditModel

setTransformUndone

public void setTransformUndone(Transform transform,
                               Violation violation)
Description copied from interface: AuditModel
Sets a transform undone for a violation of this model.

Specified by:
setTransformUndone in interface AuditModel

auditStarted

public void auditStarted(Auditor auditor,
                         java.util.List<Metric> columns,
                         java.util.List<Location> locations,
                         Location root,
                         java.lang.Class type)
Description copied from interface: AuditListener
Reports an Auditor audit started event.

Specified by:
auditStarted in interface AuditListener

modelEntered

public void modelEntered(Auditor auditor,
                         ModelAdapter model)
Description copied from interface: AuditListener
Reports an Auditor model entered event.

Specified by:
modelEntered in interface AuditListener

modelExited

public void modelExited(Auditor auditor,
                        ModelAdapter model)
Description copied from interface: AuditListener
Reports an Auditor model exited event.

Specified by:
modelExited in interface AuditListener

locationEntered

public void locationEntered(Auditor auditor,
                            Location location,
                            java.lang.Class type)
Description copied from interface: AuditListener
Reports an Auditor location entered event.

Specified by:
locationEntered in interface AuditListener

locationExited

public void locationExited(Auditor auditor,
                           Location location)
Description copied from interface: AuditListener
Reports an Auditor location exited event.

Specified by:
locationExited in interface AuditListener

issueReported

public void issueReported(Auditor auditor,
                          Violation issue,
                          int transformMask)
Description copied from interface: AuditListener
Reports an Auditor violation reported event.

Specified by:
issueReported in interface AuditListener

valueReported

public void valueReported(Auditor auditor,
                          Location location,
                          Metric metric,
                          java.lang.Object newValue)
Description copied from interface: AuditListener
Reports an Auditor value reported event.

Specified by:
valueReported in interface AuditListener

phaseStarted

public void phaseStarted(Auditor auditor,
                         java.lang.String phaseName)
Description copied from interface: AuditListener
Reports an Auditor phase started event.

Specified by:
phaseStarted in interface AuditListener

auditStopped

public void auditStopped(Auditor auditor,
                         boolean cancelled)
Description copied from interface: AuditListener
Reports an Auditor audit stopped event.

Specified by:
auditStopped in interface AuditListener

auditorCleared

public void auditorCleared(Auditor auditor)
Description copied from interface: AuditListener
Reports an auditor cleared event.

Specified by:
auditorCleared in interface AuditListener

toString

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

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

E13403-04

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