|
Oracle Fusion Middleware Java API Reference for Oracle Extension SDK Reference 11g Release 1 (11.1.1.6.0) E13403-07 |
|||||||||
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()
AuditContext
getAuditor
in interface AuditContext
public AuditContext getEnclosingContext()
AuditContext
getEnclosingContext
in interface AuditContext
public int getDepth()
AuditContext
getDepth
in interface AuditContext
public Workspace getWorkspace()
AuditContext
getWorkspace
in interface AuditContext
public Project getProject()
AuditContext
getProject
in interface AuditContext
public Context getIdeContext()
AuditContext
IDE context
for the model currently being
traversed.
getIdeContext
in interface AuditContext
public java.net.URL getUrl()
AuditContext
getUrl
in interface AuditContext
public ModelAdapter getModel()
AuditContext
getModel
in interface AuditContext
public Location getLocation()
AuditContext
getLocation
in interface AuditContext
public java.lang.String getText()
AuditContext
getText
in interface AuditContext
public int getLineOffset()
AuditContext
getLineOffset
in interface AuditContext
public int getOffset()
AuditContext
getOffset
in interface AuditContext
public int getLength()
AuditContext
getLength
in interface AuditContext
public boolean isCancelled()
AuditContext
isCancelled
in interface AuditContext
public void throwIfCancelled()
AuditContext
throwIfCancelled
in interface AuditContext
public Location getLocation(java.lang.Object construct)
AuditContext
getLocation
in interface AuditContext
public java.lang.String getText(java.lang.Object construct)
AuditContext
getText
in interface AuditContext
public <T extends ModelAdapter> ModelAdapter getModel(java.lang.Class<T> type, java.net.URL url, Project project, Workspace workspace)
AuditContext
getModel
in interface AuditContext
public <T extends ModelAdapter> ModelAdapter getModel(java.lang.Class<T> type, java.net.URL url)
AuditContext
getModel
in interface AuditContext
public Analyzer getAnalyzer(java.lang.Class<? extends Analyzer> analyzerClass)
AuditContext
getAnalyzer
in interface AuditContext
public AuditContext.Key key(java.lang.Object object)
AuditContext
key
in interface AuditContext
object
- 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)
AuditContext
Class
as the object is typical.
sharedKey
in interface AuditContext
object
- 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)
AuditContext
setAttribute
in interface AuditContext
key
- 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)
AuditContext
setAttribute
in interface AuditContext
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 setAttribute(AuditContext.Key key, float value)
AuditContext
setAttribute
in interface AuditContext
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 java.lang.Object getAttribute(AuditContext.Key key)
AuditContext
getAttribute
in interface AuditContext
key
- A key identifying the attribute to get.
public int getAttribute(AuditContext.Key key, int defaultValue)
AuditContext
getAttribute
in interface AuditContext
key
- A key identifying the attribute to get.defaultValue
- The value to return if none set.
public float getAttribute(AuditContext.Key key, float defaultValue)
AuditContext
getAttribute
in interface AuditContext
key
- 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)
AuditContext
setChildAttribute
in interface AuditContext
child
- 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)
AuditContext
setParentAttribute
in interface AuditContext
key
- 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)
AuditContext
AuditContext.enableGetChildAttribute()
method must have been invoked
on the context of the child. This method does not search enclosing
contexts.
getChildAttribute
in interface AuditContext
child
- 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()
AuditContext
AuditContext.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 AuditContext
AuditContext.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 AuditContext
public void addOptionalAnalysis(Issue issue)
addOptionalAnalysis
in interface AuditContext
public ViolationReport report(Rule rule)
AuditContext
report
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 AuditContext
rule
- The rule violated.
ViolationReport
which allows the violation to be
modified.public ViolationReport report(Rule rule, java.lang.Object construct)
AuditContext
report
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 AuditContext
rule
- The rule violated.construct
- The violating construct.public ViolationReport report(Rule rule, ModelAdapter model, java.lang.Object construct)
AuditContext
report
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 AuditContext
rule
- The rule violated.model
- The model containing the violationg construct.construct
- The violating construct.public ViolationReport report(Rule rule, Location location)
AuditContext
report
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 AuditContext
rule
- The rule violated.location
- The Location
of the the violating construct.public void report(Metric metric, java.lang.Object measurement)
AuditContext
report
in interface AuditContext
measurement
- The value that was measured.public void report(Metric metric, int measurement)
AuditContext
report
in interface AuditContext
measurement
- The value that was measured.public void report(Metric metric, float measurement)
AuditContext
report
in interface AuditContext
measurement
- The value that was measured.public void endReport()
public void cancelReport()
public void produceFragment(java.lang.Class<? extends ModelType> fragmentType)
AuditContext
produceFragment
in interface AuditContext
public void produceFragment(java.lang.Class<? extends ModelType> fragmentType, java.lang.Object construct)
AuditContext
produceFragment
in interface AuditContext
public void produceFragment(java.lang.Class<? extends ModelType> fragmentType, Location location)
AuditContext
produceFragment
in interface AuditContext
public java.lang.String toString()
toString
in class java.lang.Object
public ModelAdapter getModelAdapter()
AuditContext
getModelAdapter
in interface AuditContext
public <T extends ModelAdapter> ModelAdapter getModelAdapter(java.lang.Class<T> type, java.net.URL url, Project project, Workspace workspace)
AuditContext
getModelAdapter
in interface AuditContext
public <T extends ModelAdapter> ModelAdapter getModelAdapter(java.lang.Class<T> type, java.net.URL url)
AuditContext
getModelAdapter
in interface AuditContext
|
Oracle Fusion Middleware Java API Reference for Oracle Extension SDK Reference 11g Release 1 (11.1.1.6.0) E13403-07 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |