| 
 | Oracle Fusion Middleware Java API Reference for Oracle Extension SDK Reference 11g Release 1 (11.1.1.9.0) E52944-01 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object
   oracle.jdeveloper.audit.service.Auditor
oracle.jdeveloper.audit.service.Auditor
public abstract class Auditor
The executor of an audit over a particular set of constructs using a particular profile. The profile supplies the analyzers for the audit and is set by 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 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 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 Elementto the set of locations to be audited. | 
| abstract  boolean | addElements(Element[] elements, Node node, Project project, Workspace workspace)Adds the locations corresponding to an array of Elements in aNodeto the set of locations to be audited. | 
| abstract  boolean | addNode(Node node, Project project, Workspace workspace)Adds the location corresponding to a Nodeto 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  java.util.Collection<Issue> | getOptionalAnalyses()Gets issues identifying optional analyses that were not performed while computing the status of the described file. | 
| 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 Elementis auditable. | 
| abstract  boolean | isAuditableType(Element element)Gets whether an Elementis of an auditable type. | 
| abstract  boolean | isAuditableType(java.net.URL url)Gets whether the element at an URLis 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 | 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 | setWriteLockRequestListener(WriteLockRequestListener listener)Sets the listener to notify if a thread waits to acquire the write lock. | 
| abstract  void | throwIfCancelled()Throw CancellationException if the last audit to execute was cancelled. | 
| 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 boolean isAuditableType(Element element)
Element is of an auditable type.
public abstract boolean isAuditable(Element element,
                                    Node node,
                                    Project project,
                                    Workspace workspace)
Element is auditable. An element is auditable if is of an auditable type, and if the context represented by the node, project, workspace is adequate.element - the element.node - the Node context of the element, or null if none.project - the Project context of the element, or null if none.workspace - the Workspace context of the element, or null if none.
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 element is not auditable.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 addElements(Element[] elements,
                                    Node node,
                                    Project project,
                                    Workspace workspace)
Elements in a Node to the set of locations to be audited. Locations for elements which are not auditable will not be added.elements - An array of Elements each corresponding to a construct in the Audit object model.node - The Node containing the elements.project - The project containing the elements. Ignored for any element which is a Workspace or Project.workspace - The workpsace containing the elements. Ignored for any element which 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 node is a project or workspace; or if the workspace is null, unless the node is a workspace.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)
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 isAuditableType(java.net.URL url)
URL is of an auditable type.
public abstract boolean addUrl(java.net.URL url,
                               Project project,
                               Workspace workspace)
url - The URL of a file in the Audit object model.project - The project containing the file.workspace - The workspace containing the file.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 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 setWriteLockRequestListener(WriteLockRequestListener listener)
listener - The listener to notify if a thread waits to acquire the write lock, or null if none.public abstract void setDependencyCollector(CompositeDependency collector)
public abstract void setVisitDescendants(boolean shallow)
visitAncestors is true.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, or if no locations remain valid.java.util.concurrent.CancellationException - if the audit is cancelled.public abstract java.util.Collection<Issue> getOptionalAnalyses()
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.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()
| 
 | Oracle Fusion Middleware Java API Reference for Oracle Extension SDK Reference 11g Release 1 (11.1.1.9.0) E52944-01 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||