Skip navigation links

Oracle Fusion Middleware Java API Reference for Oracle Extension SDK
11g Release 2 (11.1.2.3.0)

E17493-04


oracle.jdeveloper.audit.analyzer
Interface ViolationReport


public interface ViolationReport

An interface for setting additional properties of a reported Audit violation. The violation reporting methods in AuditContext only allow a client to specify the rule and location properties of a violation. To allow a client to specify additional properties--variation, parameters, transforms, recommended transforms, focus location, and related location--the AuditContext report methods return an instance of this interface to the client.


Method Summary
 void addConstructParameter(java.lang.String name, ModelAdapter model, java.lang.Object construct)
          Adds a construct in a model as a parameter to the violation.
 void addConstructParameter(java.lang.String name, java.lang.Object construct)
          Adds a construct as a parameter to the violation.
 void addParameter(java.lang.String name, java.lang.Object value)
          Adds a parameter to the violation.
 void hideAllTransforms()
          Hides all the tranforms for this violation.
 void hideTransform(Transform transform)
          Hides a transform for this violation.
 void setDefaultTransform(Transform transform)
          Sets the default transform for this violation.
 void setFocusLocation(Location location)
          Sets the location at the focus of the violation.
 void setFocusLocation(java.lang.Object construct)
          Sets the construct at the focus of the violation.
 void setTransformFocusLocation(Transform transform, Location location)
          Sets the focus location of a transform for this violation.
 void setTransformFocusLocation(Transform transform, java.lang.Object construct)
          Sets the focus location of a transform for this violation.
 void setVariation(java.lang.String name)
          Sets the name of the rule variation which applies to this violation.
 void showTransform(Transform transform)
          Shows a transform for this violation.

 

Method Detail

addParameter

void addParameter(java.lang.String name,
                  java.lang.Object value)
Adds a parameter to the violation. Parameters are numbered in the order they are added, starting at 0. In the message template string associated with the rule, a parameter can be referred to by index or by name.

addConstructParameter

void addConstructParameter(java.lang.String name,
                           java.lang.Object construct)
Adds a construct as a parameter to the violation. Adding constructs directly as a parameter to a violation typically pins the entire model in memory so Audit uses Locations to track constructs over time. This method is convenience method for:
 addParameter(name, context.getModelAdapter().getLocation(construct));


Parameters:
name - the name of the parameter.
construct - the construct that is the intended parameter value.
See Also:
addParameter(java.lang.String, java.lang.Object)


addConstructParameter

void addConstructParameter(java.lang.String name,
                           ModelAdapter model,
                           java.lang.Object construct)
Adds a construct in a model as a parameter to the violation. Adding constructs directly as a parameter to a violation typically pins the entire model in memory so Audit uses Locations to track constructs over time. This method is convenience method for:
 
 model.beginRead(true);
 try
 {
   addParameter(name, model.getLocation(construct));
 }
 finally
 {
   model.endRead(true);
 }
 

 

Parameters:
name - the name of the parameter.
model - the model containing the construct that is the intended parameter value.
construct - the construct that is the intended parameter value.
See Also:
addParameter(java.lang.String, java.lang.Object)


setFocusLocation

void setFocusLocation(java.lang.Object construct)
Sets the construct at the focus of the violation. This should be contained by the location of the violation, and typically should not span a line boundary. If not specified, the framework uses Violation.getLocation().

setFocusLocation

void setFocusLocation(Location location)
Sets the location at the focus of the violation. This should be contained by the location of the violation, and typically should not span a line boundary. If not specified, the framework uses Violation.getLocation().

setVariation

void setVariation(java.lang.String name)
Sets the name of the rule variation which applies to this violation. If not specified, the framework uses the default variation.
Parameters:
name - The name of the variation: one of the names returned by Rule.variations.

hideAllTransforms

void hideAllTransforms()
Hides all the tranforms for this violation.

showTransform

void showTransform(Transform transform)
Shows a transform for this violation.

hideTransform

void hideTransform(Transform transform)
Hides a transform for this violation.

setTransformFocusLocation

void setTransformFocusLocation(Transform transform,
                               java.lang.Object construct)
Sets the focus location of a transform for this violation. This should contain the focus location of this violation. If not specified, the framework uses Violation.getFocusLocation().
Parameters:
transform - The transform for which to set the applicability.
construct - The construct in which to focus the transform.

setTransformFocusLocation

void setTransformFocusLocation(Transform transform,
                               Location location)
Sets the focus location of a transform for this violation. This should contain the focus location of this violation. If not specified, the framework uses Violation.getFocusLocation().
Parameters:
transform - The transform for which to set the applicability.
location - The location in which to focus the transform.

setDefaultTransform

void setDefaultTransform(Transform transform)
Sets the default transform for this violation. This overrides the default fix set by the user and inherited from the rule, so the rule help should make clear that this will happen.

Skip navigation links

Oracle Fusion Middleware Java API Reference for Oracle Extension SDK
11g Release 2 (11.1.2.3.0)

E17493-04


Copyright © 1997, 2012, Oracle. All rights reserved.