public abstract class Auditor
extends java.lang.Object
setProfile(oracle.jdeveloper.audit.service.Profile). The constructs audited are those added to this
 auditor by addElement(oracle.ide.model.Element, oracle.ide.model.Node, 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 invokes the visitor methods of the analyzers
 and delivers the results they produce to the listeners
 registered with addAuditListener(oracle.jdeveloper.audit.service.AuditListener). When the results are no longer
 needed, resources held by the auditor are released by clear().
 An auditor can be reused: locations to be audited can be added and removed.
| Constructor and Description | 
|---|
Auditor()  | 
| Modifier and Type | Method and Description | 
|---|---|
abstract void | 
addAuditListener(AuditListener listener)
Adds an audit listener to this auditor. 
 | 
abstract boolean | 
addConstruct(java.lang.Object construct,
            java.net.URL file,
            Project project,
            Workspace workspace)
Adds the location corresponding to a construct to the set of locations to
 be audited. 
 | 
abstract boolean | 
addElement(Element element,
          Node node,
          Project project,
          Workspace workspace)
Adds the location corresponding to an  
Element to the set of 
 locations to be audited. | 
abstract boolean | 
addNode(Node node,
       Project project,
       Workspace workspace)
Adds the location corresponding to a  
Node to the set of 
 locations to be audited. | 
abstract boolean | 
addUrl(java.net.URL url,
      Project project,
      Workspace workspace)
Adds the location corresponding to a URL to the set of locations to
 be audited. 
 | 
abstract java.lang.Throwable | 
applyDefaultTransforms(java.lang.String label)
Audits the locations of this auditor in the current thread and applies
 all default transforms (see  
Transformer.applyDefaultTransforms(java.lang.String, java.util.Collection<? extends oracle.jdeveloper.audit.service.Violation>, oracle.jdeveloper.audit.service.TransformerListener, oracle.jdeveloper.audit.service.AuditModel). | 
abstract void | 
audit()
Audits the locations of this auditor in the current thread. 
 | 
abstract boolean | 
cancel()
Cancel an executing audit. 
 | 
abstract void | 
clear()
Clears the results and locations from this auditor. 
 | 
abstract ModelFactory | 
getFactory()
Gets the factory used to create the models to be audited. 
 | 
abstract IntersectedFilters | 
getFileFilters()
Gets the supplemental filters to use when filtering application content,
 projects, and project content. 
 | 
abstract long | 
getMaximumFileSize()
Gets the size of the largest file that can be audited, in Mb. 
 | 
abstract Profile | 
getProfile()
Gets the profile for this audit. 
 | 
abstract WorkingSet | 
getWorkingSet()
Gets the working set to use when filtering projects and project content. 
 | 
abstract boolean | 
isAuditable(Element element,
           Node node,
           Project project,
           Workspace workspace)
Gets whether an  
Element is auditable. | 
abstract boolean | 
isAuditableType(java.net.URL url)
Gets whether the element at an  
URL is of an auditable type. | 
abstract boolean | 
isAuditing()
Gets whether an audit is in progress. 
 | 
abstract boolean | 
isCancelled()
Gets whether an audit in progress has been cancelled. 
 | 
abstract boolean | 
isIgnoreAssists()
Gets whether to ignore issues corresponding to assists (severity
  
ASSIST). | 
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 | 
runAsynchronously(java.lang.Thread.UncaughtExceptionHandler handler)
Audits the locations of this auditor in a background thread. 
 | 
abstract void | 
setAttribute(java.lang.Object key,
            java.lang.Object value)
Sets a configuration attribute for this auditor. 
 | 
abstract void | 
setDependencyCollector(CompositeDependency collector)
Sets the collector of dependencies discovered when the audit is run, or
 null. 
 | 
abstract void | 
setFileFilters(IntersectedFilters filters)
Sets the supplemental filters to use when filtering application content,
 projects, and project content. 
 | 
abstract void | 
setIgnoreAssists(boolean enabled)
Sets whether to ignore issues corresponding to assists (severity
  
ASSIST). | 
abstract void | 
setLockPolicy(LockPolicy policy)
Sets the lock policy to use when loking models. 
 | 
abstract void | 
setMaximumFileSize(long size)
Sets the size of the largest auditable file. 
 | 
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. 
 | 
abstract void | 
setWorkingSet(WorkingSet workingSet)
Sets the working set to use when filtering projects and project content. 
 | 
abstract void | 
throwIfCancelled()
Throw CancellationException if the last audit to execute was cancelled. 
 | 
public abstract void addAuditListener(AuditListener listener)
public abstract void removeAuditListener(AuditListener listener)
public abstract boolean isAuditable(Element element, Node node, Project project, Workspace workspace)
Element is auditable. An element is auditable if
 an Audit model for it has been registered with Audit, and if the context
 represented by the node, project, and workspace
 is sufficient: an element contained by a node requires node, project, and
 workspace; an element that is a node or directory requires project and
 workspace or, for application content, just workspace; a element that is a
 project requires just workspace, and an element that is a workspace
 requires nothing.
 If the node is not a Workspace, or Project, then if the
 workspace is not null and not open, it will be opened and if the project is
 not null and not open, it will be scanned for technologies and the
 associated extensions will be loaded.
element - An Element corresponding to a construct in the
                  Audit object model.node - The Node containing the element. Ignored if
                  element is a node or directory.project - The project containing the element. Ignored if
                  element is a Workspace or
                  Project.workspace - The workspace containing the element. Ignored if
                  element is a Workspace.public abstract boolean addElement(Element element, Node node, Project project, Workspace workspace)
Element to the set of 
 locations to be audited.
 
 The location will not be added if the node is null, unless the element is
 a Node or directory; 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.
 The location will not be added if the workspace is not null, and is not
 cached by the NodeFactory or not contained by the
 IDE; or if the project is not null, and is not cached by the NodeFactory or is not contained by the workspace.
 
 If the node is not a Workspace, or Project, then if the
 workspace is not null and not open, it will be opened; and if the project
 is not null and not open, it will be scanned for technologies and the
 associated extensions will be loaded.element - An Element corresponding to a construct in the
                  Audit object model.node - The Node containing the element. Ignored if 
                  element is a node.project - The project containing the element. Ignored if 
                  element is a Workspace or 
                  Project.workspace - The workspace containing the element. Ignored if 
                  element is a Workspace.isAuditable(oracle.ide.model.Element, oracle.ide.model.Node, oracle.ide.model.Project, oracle.ide.model.Workspace)public abstract boolean addNode(Node node, Project project, Workspace workspace)
Node to the set of 
 locations to be audited.
 
 The location will not be added if the project is null, unless the url
 node is a project or workspace; or if the workspace is null, unless the
 node is a workspace. The location will not be added if the workspace is not
 null, and is not cached by the NodeFactory or not
 contained by the IDE; or if the project is not null, and is not cached by
 the NodeFactory or is not contained by the workspace.
 
 If the node is not a Workspace, or Project, then if the
 workspace is not null and not open, it will be opened; and if the project
 is not null and not open, it will be scanned for technologies and the
 associated extensions will be loaded.node - A Node in the Audit object model.project - The project containing the node. Ignored if node
                  is a Workspace or Project.workspace - The workspace containing the node. Ignored if node
                  is a Workspace.public abstract boolean addConstruct(java.lang.Object construct,
                                     java.net.URL file,
                                     Project project,
                                     Workspace workspace)
NodeFactory or not contained by the IDE; or if the
 project is not null, and is not cached by the NodeFactory or is
 not contained by the workspace.
 
 If the workspace is not null and not open, it will be opened. If the
 project is not null and not open, it will be scanned for technologies and
 the associated extensions will be loaded.construct - A construct in the Audit object model (e.g., a Java object).file - The URL of the file containing the construct.project - The project containing the file.workspace - The workspace containing the file.public abstract boolean addUrl(java.net.URL url,
                               Project project,
                               Workspace workspace)
NodeFactory or not contained by the IDE; or if the
 project is not null, and is not cached by the NodeFactory or is
 not contained by the workspace.
 
 If the workspace is not null and not open, it will be opened. If the
 project is not null and not open, it will be scanned for technologies and
 the associated extensions will be loaded.url - The URL of a file or directory in the Audit object model.project - The project containing the file.workspace - The workspace containing the file.public abstract boolean isAuditableType(java.net.URL url)
URL is of an auditable type.public abstract ModelFactory getFactory()
public abstract Profile getProfile()
public abstract void setProfile(Profile profile)
java.lang.IllegalStateException - if a profile has already been set.public abstract void setAttribute(java.lang.Object key,
                                  java.lang.Object value)
ModelFactory.getAttribute method and to analyzers through the 
 AuditContext.getAttribute(oracle.jdeveloper.audit.analyzer.AuditContext.Key) method with a AuditContext.sharedKey(java.lang.Object)
 Typically, configuration attributes are used to allow an IDE command that is implemented using Audit to provide command-specific attributes to a model adapter or analyzer.
key - An object, typically a java.lang.Class, which
              uniquely identifies the attribute, used to create the 
              shared key.value - The possibly null value of the attribute.java.lang.IllegalStateException - if locations to be audited have already been 
         added.AuditContext.sharedKey(java.lang.Object), 
AuditContext.getAttribute(oracle.jdeveloper.audit.analyzer.AuditContext.Key), 
ModelFactory.getAttribute(java.lang.Object)public abstract boolean isAuditing()
public abstract boolean isCancelled()
public abstract void setLockPolicy(LockPolicy policy)
public abstract void setMaximumFileSize(long size)
size - The size, in Mb, of the largest file that can be audited.public abstract long getMaximumFileSize()
public abstract void setWorkingSet(WorkingSet workingSet)
public abstract WorkingSet getWorkingSet()
public abstract void setFileFilters(IntersectedFilters filters)
public abstract IntersectedFilters getFileFilters()
public abstract void setIgnoreAssists(boolean enabled)
ASSIST).public abstract boolean isIgnoreAssists()
ASSIST).public abstract void setDependencyCollector(CompositeDependency collector)
java.lang.IllegalStateException - if the auditor is auditing.public abstract void setVisitDescendants(boolean shallow)
visitAncestors  is true.java.lang.IllegalStateException - if the auditor is auditing.setVisitAncestors(boolean)public abstract boolean isVisitDescendants()
setVisitDescendants(boolean)public abstract void setVisitAncestors(boolean shallow)
visitAncestors  is true.setVisitAncestors(boolean)public abstract boolean isVisitAncestors()
setVisitAncestors(boolean)public abstract void audit()
addElement(oracle.ide.model.Element, oracle.ide.model.Node, 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 passed to the audit
 listeners added by addAuditListener(oracle.jdeveloper.audit.service.AuditListener).java.lang.IllegalStateException - if no profile has been set or locations added, if no locations
         remain valid, or if the auditor is already auditing.ModelAccessError - if the location to be audited or any of its ancestors are
         inaccessible.UnexpectedExceptionError - if the audit is aborted by an unexpected exception.java.util.concurrent.CancellationException - if the audit is cancelled.public abstract java.lang.Throwable applyDefaultTransforms(java.lang.String label)
Transformer.applyDefaultTransforms(java.lang.String, java.util.Collection<? extends oracle.jdeveloper.audit.service.Violation>, oracle.jdeveloper.audit.service.TransformerListener, oracle.jdeveloper.audit.service.AuditModel). 
 The locations audited are those added to this auditor by 
 addElement(oracle.ide.model.Element, oracle.ide.model.Node, 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 passed to the audit listeners added by addAuditListener(oracle.jdeveloper.audit.service.AuditListener).java.lang.IllegalStateException - if no profile has been set or locations added.public abstract void run()
addElement(oracle.ide.model.Element, oracle.ide.model.Node, 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 passed to the audit
 listeners added by addAuditListener(oracle.jdeveloper.audit.service.AuditListener).java.lang.IllegalStateException - if no profile has been set or locations added, if no locations
         remain valid, or if the auditor is already auditing.ModelAccessError - if the location to be audited or any of its ancestors are
         inaccessible.UnexpectedExceptionError - if the audit is aborted by an unexpected exception.public abstract void runAsynchronously()
addElement(oracle.ide.model.Element, oracle.ide.model.Node, 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 passed to the audit
 listeners added by addAuditListener(oracle.jdeveloper.audit.service.AuditListener).public abstract void runAsynchronously(java.lang.Thread.UncaughtExceptionHandler handler)
addElement(oracle.ide.model.Element, oracle.ide.model.Node, 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 passed to the audit
 listeners added by addAuditListener(oracle.jdeveloper.audit.service.AuditListener).public abstract boolean cancel()
public abstract void throwIfCancelled()
java.util.concurrent.CancellationException - if cancelled.public abstract void clear()