public interface IssueReport extends ViolationReport
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.| Modifier and Type | Method and Description |
|---|---|
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.
|
void addParameter(java.lang.String name,
java.lang.Object value)
addParameter in interface ViolationReport
void addConstructParameter(java.lang.String name,
java.lang.Object construct)
Locations to track constructs over time. This method is convenience method for:
addParameter(name, context.getModel().getLocation(construct));
Specified by:addConstructParameter in interface ViolationReportname - the name of the parameter.construct - the construct that is the intended parameter value.addParameter(java.lang.String, java.lang.Object)
void addConstructParameter(java.lang.String name,
ModelAdapter model,
java.lang.Object construct)
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);
}
Specified by:addConstructParameter in interface ViolationReportname - the name of the parameter.model - the model containing the constructconstruct - the construct that is the intended parameter value.addParameter(java.lang.String, java.lang.Object)void setFocusLocation(java.lang.Object construct)
Violation.getLocation().setFocusLocation in interface ViolationReportvoid setFocusLocation(Location location)
Violation.getLocation().setFocusLocation in interface ViolationReportvoid setVariation(java.lang.String name)
setVariation in interface ViolationReportname - The name of the variation: one of the names returned by Rule.variations.void hideAllTransforms()
hideAllTransforms in interface ViolationReportvoid showTransform(Transform transform)
showTransform in interface ViolationReportvoid hideTransform(Transform transform)
hideTransform in interface ViolationReportvoid setTransformFocusLocation(Transform transform, java.lang.Object construct)
Violation.getFocusLocation().setTransformFocusLocation in interface ViolationReporttransform - The transform for which to set the focus.construct - The construct in which to focus the transform.void setTransformFocusLocation(Transform transform, Location location)
Violation.getFocusLocation().setTransformFocusLocation in interface ViolationReporttransform - The transform for which to set the focus.location - The location in which to focus the transform.void setDefaultTransform(Transform transform)
setDefaultTransform in interface ViolationReport