public class Metric extends ExtensionBean
 The configurable state of a metric is exposed through
 JavaBeans properties. Every metric has five default properties:
 id, type, enabled, category, 
 and threshold. category, id, and
 enabled are inherited from 
 ExtensionBean);
 category, id, and type are read-only. 
 The name is used internally, primarily as a resource key. The type indicates 
 the most-specific type common to the values of the attribute. The category is 
 used to group attributes for presentation purposes. The threshold, if any, 
 indicates the largest acceptable value of the attribute. An attribute can 
 expose additional properties which the Audit framework will discover by 
 introspection and add to the appropriate Audit preferences panel. Attributes
 are registered with the AuditManager at startup by IDE extensions.
 
 For typical metrics, the values for all constructs are computed and
 and stored in an AuditModel 
 during the traversal of the construct hierarchy. It is possible, however, to 
 create a metric that computes the values for some or all constructs from 
 values available from the AuditModel that contains it, or from external 
 sources (e.g., a database or data file). To enable this, Audit will 
 automatically add a metric which implements AuditModelListener as a listener 
 to the AuditModel for 
 which it is a column.
| Modifier and Type | Field and Description | 
|---|---|
protected java.util.Comparator<java.lang.Object> | 
comparator  | 
protected java.lang.Object | 
threshold  | 
protected java.lang.Class<?> | 
type  | 
| Constructor and Description | 
|---|
Metric()
Creates a metric. 
 | 
| Modifier and Type | Method and Description | 
|---|---|
Category | 
category()
Gets the category of this metric. 
 | 
java.util.Comparator<java.lang.Object> | 
comparator()
Gets a comparator for values of this attribute, or null if the values
 are not comparable. 
 | 
protected void | 
copyInternalState(ExtensionBean copy,
                 java.util.Map<java.lang.String,ExtensionBean> context)
Copies internal subclass state as part of creating a copy of this bean. 
 | 
MetricDefinition | 
definition()
Gets the definition of this bean. 
 | 
java.lang.Object | 
getThreshold()
Gets the upper threshold of this metric, or null if none. 
 | 
java.lang.Class<?> | 
getType()
Gets the type of this attribute. 
 | 
boolean | 
isEnabled()
Gets whether this rule is enabled. 
 | 
boolean | 
isOutOfBand(java.lang.Object value)
Gets whether a value is out of band. 
 | 
java.lang.String | 
representation(java.lang.Object value)
Gets the localized text representation of a value of this metric. 
 | 
void | 
setEnabled(boolean newValue)
Sets whether this rule is enabled. 
 | 
void | 
setThreshold(java.lang.Object newValue)
Sets the upper threshold of this metric. 
 | 
java.lang.String | 
shortLabel()
Gets the localized short label of this metric. 
 | 
java.lang.String | 
toString()  | 
addPropertyChangeListener, addPropertyChangeListener, createCopy, description, equals, extensionId, extensionLine, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, formattedString, formattedString, formattedString, hashCode, id, label, logError, logError, logWarning, name, propertyDescription, propertyLabel, removePropertyChangeListener, removePropertyChangeListener, setters, stringprotected java.lang.Class<?> type
protected java.lang.Object threshold
protected java.util.Comparator<java.lang.Object> comparator
public Metric()
ExtensionBean.id(), 
 ExtensionBean.extensionId(), category, and type fields.protected void copyInternalState(ExtensionBean copy, java.util.Map<java.lang.String,ExtensionBean> context) throws java.lang.reflect.InvocationTargetException
ExtensionBeancopyInternalState in class ExtensionBeancopy - The partially initialized copy.context - A map which allows subclasses to preserve object identity
                when copying a graph of extension beans.java.lang.reflect.InvocationTargetExceptionExtensionBean.createCopy(java.util.Map<java.lang.String, oracle.jdeveloper.audit.extension.ExtensionBean>)public MetricDefinition definition()
definition in class ExtensionBeanpublic boolean isEnabled()
public void setEnabled(boolean newValue)
public Category category()
public java.lang.Class<?> getType()
public java.util.Comparator<java.lang.Object> comparator()
Metric implementation returns a
 default comparator if the attribute type is naturally ordered (i.e.,
 implements Comparable) and returns null otherwise.public java.lang.Object getThreshold()
public void setThreshold(java.lang.Object newValue)
newValue - The value at which a measurement is considered out-of-band,
                 or null if none.public boolean isOutOfBand(java.lang.Object value)
public java.lang.String shortLabel()
label.MetricDefinition.SHORT_LABEL_KEYpublic java.lang.String representation(java.lang.Object value)
Metric implementation returns the value.toString()
 if the value is not null, or null otherwise. Note that the typical
 toString() implementation does not return a localized
 representation.public java.lang.String toString()
toString in class java.lang.Object