|
Extension SDK 10.1.2 | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object
oracle.jdeveloper.audit.service.Auditor
The executor of an audit over a particular set of constructs using a particular profile. The profile used is set by setProfile(oracle.jdeveloper.audit.service.Profile)
. The constructs audited are those added to this auditor by addLocation(oracle.jdeveloper.audit.model.Location)
, addElement(oracle.ide.model.Element, oracle.ide.model.Document, oracle.ide.model.Project, oracle.ide.model.Workspace)
, and/or addConstruct(java.lang.Object, java.net.URL, oracle.ide.model.Project, oracle.ide.model.Workspace)
. The audit is executed by run()
, which stores the results in a model
, accessible through getModel()
. When the results are no longer needed, resources held by the auditor (and by the model) are released by clear()
.
An auditor can be reused: locations to be audited can be added and removed.
Constructor Summary | |
Auditor() |
Method Summary | |
abstract void |
addAuditListener(AuditListener listener) Adds an audit listener to this auditor. |
abstract boolean |
addConstruct(java.lang.Object construct, java.net.URL document, Project project, Workspace workspace) Adds the location corresponding to a construct to the set of locations to be audited. |
abstract boolean |
addElement(Element element, Document document, Project project, Workspace workspace) Adds the location corresponding to an Element to the set of locations to be audited. |
abstract int |
addElements(Element[] elements, Document document, Project project, Workspace workspace) Adds the locations corresponding to an array of Element s to the set of locations to be audited. |
protected abstract void |
addLocation(Location location) Adds a location to the set of locations to be audited. |
abstract void |
applyDefaultFixes() Applies default fixes for any violations found by this auditor. |
abstract void |
cancel() Cancel an executing audit. |
abstract void |
clear() Clears the results and locations from this auditor. |
abstract java.util.SortedSet |
getLocations() Gets the set of locations to be audited. |
abstract AuditModel |
getModel() Gets the model for this audit. |
abstract Profile |
getProfile() Gets the profile for this audit. |
abstract AuditType |
getType() Gets the feature type of this audit. |
abstract boolean |
isAuditing() Gets whether an audit is in progress. |
abstract boolean |
isVisitAncestors() Gets whether to visit ancestors of the locations to be audited. |
abstract boolean |
isVisitDescendants() Gets whether to visit descendants of the locations to be audited. |
abstract void |
removeAuditListener(AuditListener listener) Removes an audit listener from this auditor. |
abstract void |
run() Audits the locations of this auditor in the current thread. |
abstract void |
runAsynchronously() Audits the locations of this auditor in a background thread. |
abstract void |
setProfile(Profile profile) Sets the profile for this audit. |
abstract void |
setVisitAncestors(boolean shallow) Sets whether to visit ancestors of the locations to be audited. |
abstract void |
setVisitDescendants(boolean shallow) Sets whether to visit descendants of the locations to be audited. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public Auditor()
Method Detail |
public abstract void addAuditListener(AuditListener listener)
public abstract void removeAuditListener(AuditListener listener)
public abstract void cancel()
public abstract void clear()
public abstract boolean addElement(Element element, Document document, Project project, Workspace workspace)
Element
to the set of locations to be audited. The location will not be added if the document is null, unless the element is a document, project, or workspace; if the project is null, unless the element is a project or workspace; or if the workspace is null, unless the element is a workspace.element
- An Element
corresponding to a construct in the Audit object model.document
- The document containing the element. May be null if the element
is a Workspace
or Project
or implements Locatable
.project
- The project containing the element, or null for the active project. Ignored if element
is a Workspace
or Project
.workspace
- The workpsace containing the element, or null for the active workspace. Ignored if element
is a Workspace
.public abstract int addElements(Element[] elements, Document document, Project project, Workspace workspace)
Element
s to the set of locations to be audited. The locations will not be added if the document is null, unless the elements are documents, projects, or workspaces; if the project is null, unless the elements are projects or workspaces; or if the workspace is null, unless the elements are workspaces.elements
- An array of Element
s each corresponding to a construct in the Audit object model.document
- The URL of the document containing the elements.project
- The project containing the elements, or null for the active project. Ignored for any element
which is a Workspace
or Project
.workspace
- The workpsace containing the elements, or null for the active workspace. Ignored for any element
which is a Workspace
.public abstract boolean addConstruct(java.lang.Object construct, java.net.URL document, Project project, Workspace workspace)
construct
- A construct in the Audit object model (e.g., a JOT object).document
- The URL of the document containing the construct.project
- The project containing the document, or null for the active project. Ignored if construct
is a Workspace
or Project
.workspace
- The workspace containing the document, or null for the active workspace.java.lang.IllegalArgumentException
- if the construct is null.protected abstract void addLocation(Location location)
public abstract java.util.SortedSet getLocations()
public abstract Profile getProfile()
public abstract void setProfile(Profile profile)
java.lang.IllegalStateException
- if a profile has already been set.public abstract AuditType getType()
java.lang.IllegalStateException
- if no profile has been set.public abstract AuditModel getModel()
java.lang.IllegalStateException
- if no profile has been set.public abstract boolean isAuditing()
public abstract void setVisitDescendants(boolean shallow)
visitAncestors
is true.addLocation(oracle.jdeveloper.audit.model.Location)
, setVisitAncestors(boolean)
public abstract boolean isVisitDescendants()
setVisitDescendants(boolean)
public abstract void setVisitAncestors(boolean shallow)
visitAncestors
is true.addLocation(oracle.jdeveloper.audit.model.Location)
, setVisitAncestors(boolean)
public abstract boolean isVisitAncestors()
setVisitAncestors(boolean)
public abstract void run()
addElement(oracle.ide.model.Element, oracle.ide.model.Document, oracle.ide.model.Project, oracle.ide.model.Workspace)
, and addConstruct(java.lang.Object, java.net.URL, oracle.ide.model.Project, oracle.ide.model.Workspace)
. The results of the audit are stored in the model
.java.lang.IllegalStateException
- if no profile has been set or locations added.public abstract void runAsynchronously()
addElement(oracle.ide.model.Element, oracle.ide.model.Document, oracle.ide.model.Project, oracle.ide.model.Workspace)
, and addConstruct(java.lang.Object, java.net.URL, oracle.ide.model.Project, oracle.ide.model.Workspace)
. The results of the audit are stored in the model
.public abstract void applyDefaultFixes()
|
Extension SDK | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Copyright © 1997, 2004, Oracle. All rights reserved.