public class AlarmEventInstance extends java.lang.Object implements AlarmEvent
EMPTY| Constructor and Description |
|---|
AlarmEventInstance(AlarmEvent core) |
AlarmEventInstance(AlarmEvent core,
AlarmStateTransition transition)
Convenience constructor for branching on new state transition *
|
| Modifier and Type | Method and Description |
|---|---|
void |
acknowledge(EventData ackData) |
void |
active(EventData activeData) |
static AlarmEventInstance |
branch(AlarmEvent event)
Creates a new instance, incrementing the BranchDepth property.
|
void |
clear(EventData clearData) |
boolean |
contains(Property<?> prop) |
<T> T |
get(Property<T> prop)
Retrieves the value of the property, or null if this set doesn't contain that property.
|
EventData |
getAckData() |
EventData |
getActiveData() |
EventData |
getClearedData() |
int |
getCount() |
StringPath |
getDisplayPath() |
java.lang.String |
getDisplayPathOrSource() |
java.util.UUID |
getId()
The unique id for this event.
|
java.lang.String |
getLabel()
Returns the "Label" property, or "Name" if not defined.
|
AlarmStateTransition |
getLastEventState()
Returns the most recent transition, or if this event represents a single state, the particular state that it
represents.
|
PropertySet |
getLocals() |
java.lang.String |
getName() |
java.lang.String |
getNotes() |
<T> T |
getOrDefault(Property<T> prop) |
<T> T |
getOrElse(Property<T> property,
T value)
Get the value for a given
Property, or else fall back to value if it's not present. |
AlarmPriority |
getPriority()
Returns the priority of the alarm event.
|
java.util.Collection<Property<?>> |
getProperties() |
QualifiedPath |
getSource()
The path to the alarm that generated this event.
|
AlarmState |
getState()
Returns the current state, as an enum.
|
java.util.List<PropertyValue> |
getValues() |
boolean |
isAcked() |
boolean |
isCleared() |
boolean |
isExtended(Property<?> prop)
Returns whether this property set contains a value for the prop, and the prop was actually inherited.
|
boolean |
isInherited(Property<?> prop)
Indicates whether the property was inherited from a parent type.
|
boolean |
isShelved()
Returns whether this is event is currently shelved, if the ShelfExpiration property is set, or whether the event
was shelved, for journaled events, base on whether the IsShelved property is set.
|
java.util.Iterator<PropertyValue> |
iterator() |
void |
merge(PropertySet other) |
void |
remove(Property<?> prop) |
<T> void |
set(Property<T> prop,
T value) |
void |
set(PropertyValue propValue) |
<T> void |
setGlobal(Property<T> p,
T value) |
java.lang.String |
toString() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitbuilder, extend, getExtension, newDefaultInstance, newExtensionmergepublic AlarmEventInstance(AlarmEvent core)
public AlarmEventInstance(AlarmEvent core, AlarmStateTransition transition)
public static AlarmEventInstance branch(AlarmEvent event)
public PropertySet getLocals()
public AlarmStateTransition getLastEventState()
AlarmEventgetLastEventState in interface AlarmEventpublic boolean contains(Property<?> prop)
contains in interface PropertyValueSourcepublic <T> T getOrDefault(Property<T> prop)
getOrDefault in interface PropertyValueSourceProperty.getDefaultValue() if not present.public <T> T get(Property<T> prop)
PropertyValueSourceget in interface PropertyValueSourcepublic java.util.Iterator<PropertyValue> iterator()
iterator in interface java.lang.Iterable<PropertyValue>public <T> void set(Property<T> prop, T value)
set in interface MutablePropertyValueSourcepublic <T> void setGlobal(Property<T> p, T value)
public <T> T getOrElse(Property<T> property, T value)
PropertyValueSourceProperty, or else fall back to value if it's not present.getOrElse in interface PropertyValueSourceproperty - The Property for which a value is to be retrieved.value - The value to default to if property isn't present.public void set(PropertyValue propValue)
set in interface MutablePropertyValueSourcepublic void remove(Property<?> prop)
remove in interface MutablePropertyValueSourcepublic java.util.Collection<Property<?>> getProperties()
getProperties in interface PropertyValueSourcepublic java.util.List<PropertyValue> getValues()
getValues in interface PropertyValueSourcepublic java.util.UUID getId()
AlarmEventgetId in interface AlarmEventpublic boolean isExtended(Property<?> prop)
PropertySetisExtended in interface PropertySetpublic boolean isInherited(Property<?> prop)
PropertySetisInherited in interface PropertySetpublic void merge(PropertySet other)
merge in interface Mergable<PropertySet>public QualifiedPath getSource()
AlarmEventgetSource in interface AlarmEventpublic java.lang.String getName()
getName in interface AlarmEventpublic AlarmPriority getPriority()
AlarmEventgetPriority in interface AlarmEventpublic StringPath getDisplayPath()
getDisplayPath in interface AlarmEventpublic java.lang.String getDisplayPathOrSource()
getDisplayPathOrSource in interface AlarmEventpublic java.lang.String getLabel()
AlarmEventgetLabel in interface AlarmEventpublic void active(EventData activeData)
active in interface AlarmEventpublic void acknowledge(EventData ackData)
acknowledge in interface AlarmEventpublic void clear(EventData clearData)
clear in interface AlarmEventpublic boolean isCleared()
isCleared in interface AlarmEventpublic boolean isAcked()
isAcked in interface AlarmEventpublic boolean isShelved()
AlarmEventisShelved in interface AlarmEventpublic AlarmState getState()
AlarmEventgetState in interface AlarmEventpublic EventData getActiveData()
getActiveData in interface AlarmEventpublic EventData getClearedData()
getClearedData in interface AlarmEventpublic EventData getAckData()
getAckData in interface AlarmEventpublic java.lang.String toString()
toString in class java.lang.Objectpublic java.lang.String getNotes()
getNotes in interface AlarmEvent