|
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.Attribute
An attribute of constructs of the Audit object model. An attribute can be thought of as supplying data for one column of a table (or tree table) in which the rows are constructs from the Audit object model. Rows can also be violations, for which an attribute can (less commonly) also supply data.
The configurable state of an attribute is exposed through
JavaBeans properties. Every attribute has five default properties:
name
, type
, enabled
, category
,
and threshold
. category
, name
, and
enabled
are inherited from Profileable
);
category
, name
, 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 some attributes, the values for all constructs may computed and
and stored to the AuditModel
during the traversal of the construct
hierarchy. For other attributes, however, the values are computed by
querying an external source or by aggregating other, already computed,
values. For these attributes, a couple of approaches are supported:
AuditModel
for which it is a column.
getEvaluator(Class)
, it can supply
the Evaluator
used by the AuditModel
to evaluate the
attribute for specific construct types. The evaluator is only invoked for
values which are actually displayed.
Field Summary | |
protected java.util.Comparator |
comparator
|
protected java.lang.Object |
threshold
|
protected java.lang.Class |
type
|
Constructor Summary | |
protected |
Attribute(java.lang.String name,
Category category,
java.lang.Class type,
java.lang.Object threshold)
Creates a metric. |
Method Summary | |
java.util.Comparator |
comparator()
Gets a comparator for values of this attribute, or null if the values are not comparable. |
Category |
getCategory()
Gets the category of this profileable. |
Evaluator |
getEvaluator(java.lang.Class type)
Gets the evaluator of this attribute for a construct type or Violation.class . |
java.lang.Object |
getThreshold()
Gets the error 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. |
void |
setEnabled(boolean newValue)
Sets whether this rule is enabled. |
void |
setThreshold(java.lang.Object newValue)
Sets the error threshold of this metric. |
Methods inherited from class oracle.jdeveloper.audit.analyzer.Profileable |
addPropertyChangeListener, addPropertyChangeListener, context, context, description, equals, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, hashCode, label, name, removePropertyChangeListener, removePropertyChangeListener, tip |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected java.lang.Class type
protected java.lang.Object threshold
protected java.util.Comparator comparator
Constructor Detail |
protected Attribute(java.lang.String name, Category category, java.lang.Class type, java.lang.Object threshold)
name
- The name of this metric.type
- The type of this metric.category
- The category of this metric.threshold
- The threshold of this metric.
java.lang.IllegalArgumentException
- if the threshold is not null and not of
the attribute type.Method Detail |
public java.lang.Object getThreshold()
public void setThreshold(java.lang.Object newValue)
newValue
- The value at which a measurement is considered an error,
or null if none.public java.lang.Class getType()
public Evaluator getEvaluator(java.lang.Class type)
Violation.class
. The default implementation supplied by
Attribute
returns an evaluator which always returns null, which is
adequate for attributes for which all values are computed by an analyzer
or by AuditModelListener methods.
public java.util.Comparator comparator()
Attribute
implementation returns a
default comparator if the attribute type is naturally ordered (i.e.,
implements Comparable
) and returns null otherwise.
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.