|
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.jdevimpl.audit.core.DefaultAuditContext
public final class DefaultAuditContext
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface oracle.jdeveloper.audit.analyzer.AuditContext |
|---|
AuditContext.Key |
| Field Summary |
|---|
| Fields inherited from interface oracle.jdeveloper.audit.analyzer.AuditContext |
|---|
INTENTIONAL_NULL |
| Constructor Summary | |
|---|---|
DefaultAuditContext(DefaultAuditor auditor, DefaultAuditContext enclosingContext) |
|
| Method Summary | ||
|---|---|---|
void |
addDependency(Dependency dependency) |
|
void |
addOptionalAnalysis(Issue issue) |
|
void |
beginVisit() |
|
void |
cancelReport() |
|
void |
clearContext() |
|
void |
enableGetChildAttribute()Enables the enclosing context to use AuditContext.getChildAttribute(java.lang.Object, oracle.jdeveloper.audit.analyzer.AuditContext.Key) to get the the value of an attribute set in this context. |
|
void |
endReport() |
|
void |
endVisit() |
|
boolean |
enteringApplicationContent() |
|
Analyzer |
getAnalyzer(java.lang.Class<? extends Analyzer> analyzerClass)Gets the instance of an analyzer class used for the current audit. |
|
java.lang.Object[] |
getArguments() |
|
java.lang.Object |
getAttribute(AuditContext.Key key)Gets the value of an attribute in this or an enclosing context, or null if none. |
|
float |
getAttribute(AuditContext.Key key, float defaultValue)Gets the float value of an attribute in this or an enclosing context. |
|
int |
getAttribute(AuditContext.Key key, int defaultValue)Gets the int value of an attribute in this or an enclosing context. |
|
Auditor |
getAuditor()Gets the auditor running this traversal. |
|
java.lang.Object |
getChildAttribute(java.lang.Object child, AuditContext.Key key)Gets the value of an attribute in the context of a child of the current construct. |
|
int |
getDepth()Gets the depth (distance from root) of the construct currently being traversed. |
|
java.util.List<Analyzer> |
getDisabledAnalyzers() |
|
AuditContext |
getEnclosingContext()Gets the context of the enclosing construct of this context. |
|
Context |
getIdeContext()Gets an IDE context for the model currently being traversed. |
|
int |
getLength()Gets the length of the construct currently being traversed. |
|
int |
getLineOffset()Gets the line offset (zero-based) of the first character of the construct currently being traversed, or 0 if the construct currently being traversed is not text-based. |
|
Location |
getLocation()Gets the location of the construct currently being traversed. |
|
Location |
getLocation(java.lang.Object construct)Gets the location of a construct in the model currently being traversed. |
|
ModelAdapter |
getModel()Gets the model adapter for the model currently being traversed. |
|
|
getModel(java.lang.Class<T> type, java.net.URL url)Gets the model adapter for the model corresponding to a URL in the workspace and project currently being traversed. |
|
|
getModel(java.lang.Class<T> type, java.net.URL url, Project project, Workspace workspace)Gets the model adapter for the model corresponding to a workspace, project, and url. |
|
ModelAdapter |
getModelAdapter()Gets the adapter for the model currently being traversed. |
|
|
getModelAdapter(java.lang.Class<T> type, java.net.URL url)Gets the adapter for the model corresponding to a URL in the workspace and project currently being traversed. |
|
|
getModelAdapter(java.lang.Class<T> type, java.net.URL url, Project project, Workspace workspace)Gets the adapter for the model corresponding to a workspace, project, and url. |
|
int |
getOffset()Gets the character offset of the construct currently being traversed, or 0 if the construct currently being traversed is not text-based. |
|
Project |
getProject()Gets the project currently being traversed, or null if the root or a workspace is currently being traversed. |
|
java.lang.String |
getText()Gets the text of the construct currently being traversed, or null if the construct currently being traversed is not text-based.. |
|
java.lang.String |
getText(java.lang.Object construct)Gets the text of a construct in the model currently being traversed. |
|
java.net.URL |
getUrl()Gets the non-null URL for the model currently being traversed. |
|
Workspace |
getWorkspace()Gets the workspace currently being traversed, or null if the root is currently being traversed. |
|
boolean |
isCancelled()Gets whether the current traversal has been cancelled. |
|
AuditContext.Key |
key(java.lang.Object object)Gets a key for an attribute visible only to this analyzer. |
|
void |
produceFragment(java.lang.Class<? extends ModelType> fragmentType)Produces a fragment of another model type from the construct currently being traversed. |
|
void |
produceFragment(java.lang.Class<? extends ModelType> fragmentType, Location location)Produces a fragment of another model type from a construct in the model currently being traversed. |
|
void |
produceFragment(java.lang.Class<? extends ModelType> fragmentType, java.lang.Object construct)Produces a fragment of another model type from a construct in the model currently being traversed. |
|
void |
report(Metric metric, float measurement)Reports a float-valued measurement for the current construct. |
|
void |
report(Metric metric, int measurement)Reports an int-valued measurement for the current construct. |
|
void |
report(Metric metric, java.lang.Object measurement)Reports a measurement for the current construct. |
|
ViolationReport |
report(Rule rule)Reports a rule violation for the current construct. |
|
ViolationReport |
report(Rule rule, Location location)Reports a rule violation for a construct. |
|
ViolationReport |
report(Rule rule, ModelAdapter model, java.lang.Object construct)Reports a rule violation for a construct. |
|
ViolationReport |
report(Rule rule, java.lang.Object construct)Reports a rule violation for a construct in the current node. |
|
void |
setAttribute(AuditContext.Key key, float value)Sets the value of a Float attribute in this context and in its enclosed contexts. |
|
void |
setAttribute(AuditContext.Key key, int value)Sets the value of an Integer attribute in this context and in its enclosed contexts. |
|
void |
setAttribute(AuditContext.Key key, java.lang.Object value)Sets the value of an attribute in this context and in its enclosed contexts. |
|
void |
setChildAttribute(java.lang.Object child, AuditContext.Key key, java.lang.Object value)Sets the value of an attribute in the context of a child of the current construct and in the enclosed contexts of the child. |
|
void |
setContext(Location location, java.lang.Object construct) |
|
void |
setContext(ModelAdapter model, Location location, java.lang.Object construct, boolean isRoot) |
|
void |
setParentAttribute(AuditContext.Key key, java.lang.Object value)Sets the value of an attribute in the context of the construct enclosing the current construct, and in its enclosed contexts. |
|
AuditContext.Key |
sharedKey(java.lang.Object object)Gets a key for an attribute visible to all analyzers. |
|
void |
throwIfCancelled()Throw CancellationException if the current traversal has been cancelled. |
|
java.lang.String |
toString() |
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public DefaultAuditContext(DefaultAuditor auditor,
DefaultAuditContext enclosingContext)
| Method Detail |
|---|
public void setContext(ModelAdapter model,
Location location,
java.lang.Object construct,
boolean isRoot)
public void setContext(Location location,
java.lang.Object construct)
public void beginVisit()
public void endVisit()
public void clearContext()
public java.util.List<Analyzer> getDisabledAnalyzers()
public boolean enteringApplicationContent()
public java.lang.Object[] getArguments()
public Auditor getAuditor()
AuditContextgetAuditor in interface AuditContextpublic AuditContext getEnclosingContext()
AuditContextgetEnclosingContext in interface AuditContextpublic int getDepth()
AuditContextgetDepth in interface AuditContextpublic Workspace getWorkspace()
AuditContextgetWorkspace in interface AuditContextpublic Project getProject()
AuditContextgetProject in interface AuditContextpublic Context getIdeContext()
AuditContextIDE context for the model currently being traversed.getIdeContext in interface AuditContextpublic java.net.URL getUrl()
AuditContextgetUrl in interface AuditContextpublic ModelAdapter getModel()
AuditContextgetModel in interface AuditContextpublic Location getLocation()
AuditContextgetLocation in interface AuditContextpublic java.lang.String getText()
AuditContextgetText in interface AuditContextpublic int getLineOffset()
AuditContextgetLineOffset in interface AuditContextpublic int getOffset()
AuditContextgetOffset in interface AuditContextpublic int getLength()
AuditContextgetLength in interface AuditContextpublic boolean isCancelled()
AuditContextisCancelled in interface AuditContextpublic void throwIfCancelled()
AuditContextthrowIfCancelled in interface AuditContextpublic Location getLocation(java.lang.Object construct)
AuditContextgetLocation in interface AuditContextpublic java.lang.String getText(java.lang.Object construct)
AuditContextgetText in interface AuditContext
public <T extends ModelAdapter> ModelAdapter getModel(java.lang.Class<T> type,
java.net.URL url,
Project project,
Workspace workspace)
AuditContextgetModel in interface AuditContext
public <T extends ModelAdapter> ModelAdapter getModel(java.lang.Class<T> type,
java.net.URL url)
AuditContextgetModel in interface AuditContextpublic Analyzer getAnalyzer(java.lang.Class<? extends Analyzer> analyzerClass)
AuditContextgetAnalyzer in interface AuditContextpublic AuditContext.Key key(java.lang.Object object)
AuditContextkey in interface AuditContextobject - An object which identifies the attribute.AuditContext.Key for use with the set and get attribute methods.public AuditContext.Key sharedKey(java.lang.Object object)
AuditContextClass as the object is typical.sharedKey in interface AuditContextobject - An object which uniquely identifies the attribute.AuditContext.Key corresponding to the object for use with the set and get attribute methods.
public void setAttribute(AuditContext.Key key,
java.lang.Object value)
AuditContextsetAttribute in interface AuditContextkey - A key identifying the attribute to set.value - The possibly null new value of the attribute.AuditContext.key(java.lang.Object), AuditContext.sharedKey(java.lang.Object), AuditContext.getAttribute(oracle.jdeveloper.audit.analyzer.AuditContext.Key)
public void setAttribute(AuditContext.Key key,
int value)
AuditContextsetAttribute in interface AuditContextkey - A key identifying the attribute to set.value - The new value of the attribute.AuditContext.key(java.lang.Object), AuditContext.sharedKey(java.lang.Object), AuditContext.getAttribute(oracle.jdeveloper.audit.analyzer.AuditContext.Key)
public void setAttribute(AuditContext.Key key,
float value)
AuditContextsetAttribute in interface AuditContextkey - A key identifying the attribute to set.value - The new value of the attribute.AuditContext.key(java.lang.Object), AuditContext.sharedKey(java.lang.Object), AuditContext.getAttribute(oracle.jdeveloper.audit.analyzer.AuditContext.Key)public java.lang.Object getAttribute(AuditContext.Key key)
AuditContextgetAttribute in interface AuditContextkey - A key identifying the attribute to get.
public int getAttribute(AuditContext.Key key,
int defaultValue)
AuditContextgetAttribute in interface AuditContextkey - A key identifying the attribute to get.defaultValue - The value to return if none set.
public float getAttribute(AuditContext.Key key,
float defaultValue)
AuditContextgetAttribute in interface AuditContextkey - A key identifying the attribute to get.defaultValue - The value to return if none set.
public void setChildAttribute(java.lang.Object child,
AuditContext.Key key,
java.lang.Object value)
AuditContextsetChildAttribute in interface AuditContextchild - A child of the current construct.key - A key identifying the attribute to set.value - The new value of the attribute.AuditContext.key(java.lang.Object), AuditContext.sharedKey(java.lang.Object), AuditContext.getAttribute(oracle.jdeveloper.audit.analyzer.AuditContext.Key)
public void setParentAttribute(AuditContext.Key key,
java.lang.Object value)
AuditContextsetParentAttribute in interface AuditContextkey - A key identifying the attribute to set.value - The possibly null new value of the attribute.AuditContext.key(java.lang.Object), AuditContext.sharedKey(java.lang.Object), AuditContext.getAttribute(oracle.jdeveloper.audit.analyzer.AuditContext.Key)
public java.lang.Object getChildAttribute(java.lang.Object child,
AuditContext.Key key)
AuditContextAuditContext.enableGetChildAttribute() method must have been invoked on the context of the child. This method does not search enclosing contexts.getChildAttribute in interface AuditContextchild - A child of the current construct.key - A key identifying the attribute to set.AuditContext.key(java.lang.Object), AuditContext.sharedKey(java.lang.Object), AuditContext.enableGetChildAttribute(), AuditContext.setAttribute(oracle.jdeveloper.audit.analyzer.AuditContext.Key, java.lang.Object)public void enableGetChildAttribute()
AuditContextAuditContext.getChildAttribute(java.lang.Object, oracle.jdeveloper.audit.analyzer.AuditContext.Key) to get the the value of an attribute set in this context.enableGetChildAttribute in interface AuditContextAuditContext.getChildAttribute(java.lang.Object, oracle.jdeveloper.audit.analyzer.AuditContext.Key), AuditContext.setAttribute(oracle.jdeveloper.audit.analyzer.AuditContext.Key, java.lang.Object)public void addDependency(Dependency dependency)
addDependency in interface AuditContextpublic void addOptionalAnalysis(Issue issue)
addOptionalAnalysis in interface AuditContextpublic ViolationReport report(Rule rule)
AuditContextreport returns a ViolationReport which allows parameters and other attributes to be added to the violation. This variant is only applicable when the violating construct is the one currently being visited by Audit.
See the class overview for more information.
report in interface AuditContextrule - The rule violated.ViolationReport which allows the violation to be modified.
public ViolationReport report(Rule rule,
java.lang.Object construct)
AuditContextreport returns a ViolationReport which allows parameters and other attributes to be added to the violation. This variant is applicable when the violating construct is in the node currently being visited by Audit.
See the class overview for more information.
report in interface AuditContextrule - The rule violated.construct - The violating construct.
public ViolationReport report(Rule rule,
ModelAdapter model,
java.lang.Object construct)
AuditContextreport returns a ViolationReport which allows parameters and other attributes to be added to the violation. This variant is applicable for any violating construct. See AuditContext.getModelAdapter(), AuditContext.getModelAdapter(Class,java.net.URL,oracle.ide.model.Project,oracle.ide.model.Workspace), and Location.getModel() for ways to obtain a model.
See the class overview for more information.
report in interface AuditContextrule - The rule violated.model - The model containing the violationg construct.construct - The violating construct.
public ViolationReport report(Rule rule,
Location location)
AuditContextreport returns a ViolationReport which allows parameters and other attributes to be added to the violation. See the class overview for more information.report in interface AuditContextrule - The rule violated.location - The Location of the the violating construct.
public void report(Metric metric,
java.lang.Object measurement)
AuditContextreport in interface AuditContextmeasurement - The value that was measured.
public void report(Metric metric,
int measurement)
AuditContextreport in interface AuditContextmeasurement - The value that was measured.
public void report(Metric metric,
float measurement)
AuditContextreport in interface AuditContextmeasurement - The value that was measured.public void endReport()
public void cancelReport()
public void produceFragment(java.lang.Class<? extends ModelType> fragmentType)
AuditContextproduceFragment in interface AuditContext
public void produceFragment(java.lang.Class<? extends ModelType> fragmentType,
java.lang.Object construct)
AuditContextproduceFragment in interface AuditContext
public void produceFragment(java.lang.Class<? extends ModelType> fragmentType,
Location location)
AuditContextproduceFragment in interface AuditContextpublic java.lang.String toString()
toString in class java.lang.Objectpublic ModelAdapter getModelAdapter()
AuditContextgetModelAdapter in interface AuditContext
public <T extends ModelAdapter> ModelAdapter getModelAdapter(java.lang.Class<T> type,
java.net.URL url,
Project project,
Workspace workspace)
AuditContextgetModelAdapter in interface AuditContext
public <T extends ModelAdapter> ModelAdapter getModelAdapter(java.lang.Class<T> type,
java.net.URL url)
AuditContextgetModelAdapter in interface AuditContext
|
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 | |||||||||