com.sun.n1.sps.model.rule
Interface CriteriaMetaData


public interface CriteriaMetaData

A meta data object describing a criteria. A criteria meta data object is a data bean that contains criteria used by a rule to determine whether an event is interesting. An event is interesting if all of the criteria property in this object consider the event interesting.

This representation of an a criteria is intended for use by a UI, and is suitable for transport over RPC and eventual persistent storage. A criteria meta data is stored within the criteria property of a rule meta data.

CriteriaMetaData is always indirectly specified through the //CriteriaShorthand .

See Also:
RuleMetaData.getCriteria(), //CriteriaShorthand

Method Summary
 java.lang.String[] getEventTypes()
          The event types that are interesting to this criteria.
 HostID[] getHosts()
          The hosts that are interesting to this criteria.
 HostSetID getHostSet()
          The host set that is interesting to this criteria.
 HostStatus getHostStatusCode()
          The status of hosts that are considered interesting to this criteria.
 java.lang.String getMessagePattern()
          The message pattern that is interesting to this criteria.
 int[] getSeverities()
          The event severities that are interesting to this criteria.
 TaskType getTaskEventTypeCode()
          The type of task events that are considered interesting to this criteria.
 

Method Detail

getMessagePattern

java.lang.String getMessagePattern()
The message pattern that is interesting to this criteria. If the pattern is null or empty, then all events are considered interesting. Otherwise, only those events whose message property contains a substring that matches the message pattern are considered interesting. The message pattern may include wildcards ('*') to match any number of characters. The pattern match is case-insensitive.

Returns:
The message pattern that is interesting to this criteria.

getHosts

HostID[] getHosts()
The hosts that are interesting to this criteria. This criteria is used in conjunction with the host set and host status criteria to determine if an event is interesting. If the result is non empty, then only those events that originate from a host that has the same ID as one of the hosts listed in this criteria or one of the hosts contained in the host set of this criteria are considered interesting. If both the result and the host set criteria are empty, then all events are considered interesting. Events are further constrained based on the host status criteria, as specified in the getHostStatus method. By default, the empty array is returned.

Returns:
An array of HostID that is interesting to this criteria.
See Also:
getHostSet()

getHostSet

HostSetID getHostSet()
The host set that is interesting to this criteria. This criteria is used in conjunction with the hosts and hostStatus criteria to determine if an event is interesting. If the result is non empty, then only those events that originate from a host contained in the host set identified by this property or one of the hosts listed in the hosts criteria are considered interesting. If both the result and the hosts criteria are empty, then all events are considered interesting. Events are further constrained based on the host status criteria, as specified in the getHostStatus method.

Returns:
The HostSetId that is interesting to this criteria.
See Also:
getHosts()

getHostStatusCode

HostStatus getHostStatusCode()
The status of hosts that are considered interesting to this criteria. This criteria is used to further constrain the events that are considered interesting when the incoming event implements the AffectedHost interface. If the incoming event does not implement the AffectHost interface or this criteria has value HostStatus.IGNORE_HOST_STATUS, this criteria is ignored. Otherwise, the event is considered interesting if any of the affected hosts have a status that is equal to this criteria. If the hosts or hostSet criteria is also specified, then the event is interesting only if at least one of the affected hosts with matching status is also in the hosts or hostSet criteria.

The host status value may be IGNORE_HOST_STATUS, or one of the constants defined on the HostStatus object: SUCCESS, FAILURE, or INPROGRESS.

IGNORE_HOST_STATUS is returned by default.

See Also:
HostStatus.IGNORE_HOST_STATUS, HostStatus.SUCCESS, HostStatus.FAILURE, HostStatus.INPROGRESS

getTaskEventTypeCode

TaskType getTaskEventTypeCode()
The type of task events that are considered interesting to this criteria. This criteria is used to further constrain the events that are considered interesting when the incoming event object is an instance of a ROXTaskParentEvent. If the incoming event is not an instance of ROXTaskParentEvent or this criteria has value TaskType.IGNORE_TASK_TYPE, this criteria is ignored. IGNORE_TASK_TYPE is returned by default.

See Also:
TaskType.IGNORE_TASK_TYPE, TaskType.PREFLIGHT_TASK_TYPE, TaskType.RUN_TASK_TYPE

getSeverities

int[] getSeverities()
The event severities that are interesting to this criteria. If the result is empty, then all events severities are considered interesting. Otherwise, only those events whose severity matches one of the severities in this criteria considered interesting. By default, the empty array is returned.

Returns:
The event severities that are interesting to this criteria.

getEventTypes

java.lang.String[] getEventTypes()
The event types that are interesting to this criteria. If the result is empty, then all events are considered interesting. Otherwise, only those events whose class name exactly matches one of the event types are considered interesting. By default, the empty array is returned.

Returns:
The event types that are interesting to this criteria.