|
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.jdevimpl.audit.core.DefaultAuditor
public final class DefaultAuditor
The default Auditor implementation.
| Constructor Summary | |
|---|---|
DefaultAuditor(ModelTypeFactory factory) |
|
| Method Summary | |
|---|---|
void |
addAuditListener(AuditListener listener)Adds an audit listener to this auditor. |
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. |
void |
addDependency(Dependency dependency) |
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. |
boolean |
addElements(Element[] elements, Node node, Project project, Workspace workspace)Adds the locations corresponding to an array of Elements in a Node to the set of locations to be audited. |
protected void |
addLocation(Location location) |
boolean |
addNode(Node node, Project project, Workspace workspace)Adds the location corresponding to a Node to the set of locations to be audited. |
void |
addOptionalAnalysis(Issue issue) |
boolean |
addUrl(java.net.URL document, Project project, Workspace workspace)Adds the location corresponding to a URL to the set of locations to be audited. |
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). |
void |
audit()Audits the locations of this auditor in the current thread. |
boolean |
cancel()Cancel an executing audit. |
void |
cancelReport() |
void |
clear()Clears the results and locations from this auditor. |
void |
endReport() |
ProfileBinding |
getBinding() |
ModelFactory |
getFactory()Gets the factory used for this audit. |
IntersectedFilters |
getFileFilters()Gets the supplemental filters to use when filtering application content, projects, and project content. |
long |
getMaximumFileSize()Gets the size of the largest file that can be audited, in Mb. |
java.util.Collection<Issue> |
getOptionalAnalyses()Gets issues identifying optional analyses that were not performed while computing the status of the described file. |
Profile |
getProfile()Gets the profile for this audit. |
WorkingSet |
getWorkingSet()Gets the working set to use when filtering projects and project content. |
boolean |
isAuditable(Element element, Node node, Project project, Workspace workspace)Gets whether an Element is auditable. |
boolean |
isAuditableType(Element element)Gets whether an Element is of an auditable type. |
boolean |
isAuditableType(java.net.URL url)Gets whether the element at an URL is of an auditable type. |
boolean |
isAuditing()Gets whether an audit is in progress. |
boolean |
isCancelled()Gets whether an audit in progress has been cancelled. |
boolean |
isIgnoreAssists()Gets whether to ignore issues corresponding to assists (severity ASSIST). |
boolean |
isVisitAncestors()Gets whether to visit ancestors of the locations to be audited. |
boolean |
isVisitDescendants()Gets whether to visit descendants of the locations to be audited. |
void |
removeAuditListener(AuditListener listener)Removes an audit listener from this auditor. |
ViolationReport |
report(AuditContext context, Rule rule, Location location, java.lang.Object construct) |
void |
report(Metric metric, Location location, java.lang.Object measurement) |
void |
run()Audits the locations of this auditor in the current thread. |
void |
runAsynchronously()Audits the locations of this auditor in a background thread. |
void |
runAsynchronously(java.lang.Thread.UncaughtExceptionHandler handler)Audits the locations of this auditor in a background thread. |
void |
setAttribute(java.lang.Object key, java.lang.Object value)Sets a configuration attribute for this auditor. |
void |
setDependencyCollector(CompositeDependency collector)Sets the collector of dependencies discovered when the audit is run, or null. |
void |
setFileFilters(IntersectedFilters filters)Sets the supplemental filters to use when filtering application content, projects, and project content. |
void |
setIgnoreAssists(boolean ignore)Sets whether to ignore issues corresponding to assists (severity ASSIST). |
void |
setMaximumFileSize(long size)Sets the size of the largest auditable file. |
void |
setProfile(Profile profile)Sets the profile for this audit. |
void |
setVisitAncestors(boolean shallow)Sets whether to visit ancestors of the locations to be audited. |
void |
setVisitDescendants(boolean shallow)Sets whether to visit descendants of the locations to be audited. |
void |
setWorkingSet(WorkingSet workingSet)Sets the working set to use when filtering projects and project content. |
void |
setWriteLockRequestListener(WriteLockRequestListener listener)Sets the listener to notify if a thread waits to acquire the write lock. |
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 DefaultAuditor(ModelTypeFactory factory)
| Method Detail |
|---|
public void addAuditListener(AuditListener listener)
AuditoraddAuditListener in class Auditorpublic void removeAuditListener(AuditListener listener)
AuditorremoveAuditListener in class Auditorpublic boolean isAuditableType(Element element)
AuditorElement is of an auditable type.isAuditableType in class Auditor
public boolean isAuditable(Element element,
Node node,
Project project,
Workspace workspace)
AuditorElement is auditable. An element is auditable if is of an auditable type, and if the context represented by the node, project, workspace is adequate.isAuditable in class Auditorelement - 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 boolean cancel()
Auditorcancel in class Auditorpublic void throwIfCancelled()
AuditorthrowIfCancelled in class Auditorpublic void clear()
Auditorclear in class Auditor
public boolean addElement(Element element,
Node node,
Project project,
Workspace workspace)
AuditorElement to the set of locations to be audited. The location will not be added if the element is not auditable.addElement in class Auditorelement - 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.Auditor.isAuditable(oracle.ide.model.Element, oracle.ide.model.Node, oracle.ide.model.Project, oracle.ide.model.Workspace)
public boolean addElements(Element[] elements,
Node node,
Project project,
Workspace workspace)
AuditorElements in a Node to the set of locations to be audited. Locations for elements which are not auditable will not be added.addElements in class Auditorelements - 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.Auditor.isAuditable(oracle.ide.model.Element, oracle.ide.model.Node, oracle.ide.model.Project, oracle.ide.model.Workspace)
public boolean addNode(Node node,
Project project,
Workspace workspace)
AuditorNode 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.addNode in class Auditornode - 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 boolean addConstruct(java.lang.Object construct,
java.net.URL file,
Project project,
Workspace workspace)
AuditoraddConstruct in class Auditorconstruct - 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 boolean isAuditableType(java.net.URL url)
AuditorURL is of an auditable type.isAuditableType in class Auditor
public boolean addUrl(java.net.URL document,
Project project,
Workspace workspace)
AuditoraddUrl in class Auditordocument - The URL of a file in the Audit object model.project - The project containing the file.workspace - The workspace containing the file.protected void addLocation(Location location)
public ModelFactory getFactory()
getFactory in class Auditorpublic ProfileBinding getBinding()
public Profile getProfile()
AuditorgetProfile in class Auditorpublic void setProfile(Profile profile)
AuditorsetProfile in class Auditor
public void setAttribute(java.lang.Object key,
java.lang.Object value)
AuditorModelFactory.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.
setAttribute in class Auditorkey - 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.AuditContext.sharedKey(java.lang.Object), AuditContext.getAttribute(oracle.jdeveloper.audit.analyzer.AuditContext.Key), ModelFactory.getAttribute(java.lang.Object)public boolean isAuditing()
AuditorisAuditing in class Auditorpublic boolean isCancelled()
AuditorisCancelled in class Auditorpublic long getMaximumFileSize()
AuditorgetMaximumFileSize in class Auditorpublic void setMaximumFileSize(long size)
AuditorsetMaximumFileSize in class Auditorsize - The size, in Mb, of the largest file that can be audited.public void setWorkingSet(WorkingSet workingSet)
AuditorsetWorkingSet in class Auditorpublic WorkingSet getWorkingSet()
AuditorgetWorkingSet in class Auditorpublic IntersectedFilters getFileFilters()
AuditorgetFileFilters in class Auditorpublic void setFileFilters(IntersectedFilters filters)
AuditorsetFileFilters in class Auditorpublic void setIgnoreAssists(boolean ignore)
AuditorASSIST).setIgnoreAssists in class Auditorpublic boolean isIgnoreAssists()
AuditorASSIST).isIgnoreAssists in class Auditorpublic void setWriteLockRequestListener(WriteLockRequestListener listener)
AuditorsetWriteLockRequestListener in class Auditorlistener - The listener to notify if a thread waits to acquire the write lock, or null if none.public void setDependencyCollector(CompositeDependency collector)
AuditorsetDependencyCollector in class Auditorpublic void setVisitDescendants(boolean shallow)
AuditorvisitAncestors is true.setVisitDescendants in class AuditorAuditor.setVisitAncestors(boolean)public boolean isVisitDescendants()
AuditorisVisitDescendants in class AuditorAuditor.setVisitDescendants(boolean)public void setVisitAncestors(boolean shallow)
AuditorvisitAncestors is true.setVisitAncestors in class AuditorAuditor.setVisitAncestors(boolean)public boolean isVisitAncestors()
AuditorisVisitAncestors in class AuditorAuditor.setVisitAncestors(boolean)public void run()
AuditorAuditor.addElement(oracle.ide.model.Element, oracle.ide.model.Node, oracle.ide.model.Project, oracle.ide.model.Workspace), and Auditor.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 Auditor.addAuditListener(oracle.jdeveloper.audit.service.AuditListener).run in interface java.lang.Runnablerun in class Auditorpublic void runAsynchronously()
AuditorAuditor.addElement(oracle.ide.model.Element, oracle.ide.model.Node, oracle.ide.model.Project, oracle.ide.model.Workspace), and Auditor.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 Auditor.addAuditListener(oracle.jdeveloper.audit.service.AuditListener).runAsynchronously in class Auditorpublic void runAsynchronously(java.lang.Thread.UncaughtExceptionHandler handler)
AuditorAuditor.addElement(oracle.ide.model.Element, oracle.ide.model.Node, oracle.ide.model.Project, oracle.ide.model.Workspace), and Auditor.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 Auditor.addAuditListener(oracle.jdeveloper.audit.service.AuditListener).runAsynchronously in class Auditorpublic void audit()
AuditorAuditor.addElement(oracle.ide.model.Element, oracle.ide.model.Node, oracle.ide.model.Project, oracle.ide.model.Workspace), and Auditor.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 Auditor.addAuditListener(oracle.jdeveloper.audit.service.AuditListener).audit in class Auditorpublic java.util.Collection<Issue> getOptionalAnalyses()
AuditorgetOptionalAnalyses in class Auditorpublic java.lang.Throwable applyDefaultTransforms(java.lang.String label)
AuditorTransformer.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 Auditor.addElement(oracle.ide.model.Element, oracle.ide.model.Node, oracle.ide.model.Project, oracle.ide.model.Workspace), and Auditor.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 Auditor.addAuditListener(oracle.jdeveloper.audit.service.AuditListener).applyDefaultTransforms in class Auditorpublic void addDependency(Dependency dependency)
public void addOptionalAnalysis(Issue issue)
public ViolationReport report(AuditContext context,
Rule rule,
Location location,
java.lang.Object construct)
public void endReport()
public void cancelReport()
public void report(Metric metric,
Location location,
java.lang.Object measurement)
|
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 | |||||||||