|
Extension SDK 9.0.5 | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectoracle.jdeveloper.audit.analyzer.Profileable
oracle.jdeveloper.audit.analyzer.Rule
An Audit rule. The configurable state of an Audit rule is exposed through JavaBeans properties. Every rule has category, enabled, name, priority, and severity properties. The name and severity are read-only properties. The name is not intended for display and is typically used as a resource bundle key. Rules can expose additional properties which the Audit framework will discover by introspection and add to the appropriate Audit preferences panel. The properties should be bound properties, which in practice means that the setters should invoke the firePropertyChange method.
Localized label, tool tip, violation message, and description strings are
returned by this class using the Localizer
supplied to the constructor
and the following keys:
The bean context for label, tip, and description messages is a Rule
instance; the bean context for a message is a
"rule." + name() + ".label"
"rule." + name() + ".tip"
"rule." + name() + ".message"
"rule." + name() + ".description"
Violation
instance.
Localizer
Constructor Summary | |
Rule(java.lang.String name,
Category category,
Severity severity,
Localizer localizer)
Creates a rule with no fixes |
|
Rule(java.lang.String name,
Category category,
Severity severity,
Localizer localizer,
Transform defaultTransform)
Creates a rule with one, default, fix. |
|
Rule(java.lang.String name,
Category category,
Severity severity,
Localizer localizer,
Transform[] transforms,
Transform defaultTransform)
Creates a rule. |
Method Summary | |
java.lang.String |
description()
Gets the localized description text for this rule from its localizer using the key "rule." + getName() + ".label" . |
Category |
getCategory()
Gets the category of this profileable. |
Transform |
getDefaultTransform()
Gets the default transform for this rule, or null if none. |
java.lang.String |
getDefaultTransformName()
Gets the name of the default transform of this rule, or null if none. |
Priority |
getPriority()
Gets the priority of this rule. |
Severity |
getSeverity()
Gets the severity of this rule. |
Transform[] |
getTransforms()
Gets the transforms which can be applied to violations of this rule. |
boolean |
isEnabled()
Gets whether this rule is enabled. |
java.lang.String |
label()
Gets the localized label text for this rule from its localizer using the key "rule." + getName() + ".label" . |
java.lang.String |
message(Violation violation)
Gets the localized violation message for a violation of this rule from its localizer using the key "rule." + getName() + ".message" . |
void |
setDefaultTransformName(java.lang.String newName)
Sets the default transform for this rule by its name. |
void |
setEnabled(boolean newValue)
Sets whether this rule is enabled. |
void |
setPriority(Priority newValue)
Sets the priority of this rule. |
protected void |
setTransforms(Transform[] transforms)
Sets the transforms which can be applied to violations of this rule. |
java.lang.String |
tip()
Gets the localized tool tip text for this rule from its localizer using the key "rule." + getName() + ".tip" . |
java.lang.String |
toString()
|
Methods inherited from class oracle.jdeveloper.audit.analyzer.Profileable |
addPropertyChangeListener, addPropertyChangeListener, context, context, equals, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, hashCode, name, removePropertyChangeListener, removePropertyChangeListener |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public Rule(java.lang.String name, Category category, Severity severity, Localizer localizer)
category
- The category of this rule.name
- The name of this rule.severity
- The severity of this rule.localizer
- The localizer which supplies localized strings for this
rule.public Rule(java.lang.String name, Category category, Severity severity, Localizer localizer, Transform defaultTransform)
category
- The category of this rule.name
- The name of this rule.severity
- The severity of this rule.localizer
- The localizer which supplies localized strings
for this rule.defaultTransform
- The name of the default, and only available,
tranform for this rule.public Rule(java.lang.String name, Category category, Severity severity, Localizer localizer, Transform[] transforms, Transform defaultTransform)
category
- The category of this rule.name
- The name of this rule.severity
- The severity of this rule.localizer
- The localizer for this rule.transforms
- An array of names of available fixes for this rule.defaultTransform
- The name of the default fix for this rule, or null
if None.
java.lang.IllegalArgumentException
- if the default fix is not in fixes
.Method Detail |
public Severity getSeverity()
public java.lang.String label()
"rule." + getName() + ".label"
.
label
in class Profileable
Localizer
public java.lang.String tip()
"rule." + getName() + ".tip"
.
tip
in class Profileable
Localizer
public java.lang.String description()
"rule." + getName() + ".label"
.
description
in class Profileable
Localizer
public java.lang.String message(Violation violation)
"rule." + getName() + ".message"
.
violation
- The violation for which to get a message.Localizer
public Transform getDefaultTransform()
public void setDefaultTransformName(java.lang.String newName)
newName
- The name of a transform of this rule, or null.public java.lang.String getDefaultTransformName()
public Transform[] getTransforms()
Transform
s.getDefaultTransform()
protected void setTransforms(Transform[] transforms)
public Priority getPriority()
public void setPriority(Priority newValue)
newValue
- The new priority of this rule.public java.lang.String toString()
public Category getCategory()
public boolean isEnabled()
public void setEnabled(boolean newValue)
|
Extension SDK | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Copyright © 1997, 2004, Oracle. All rights reserved.