public class AlarmEventInstance extends java.lang.Object implements AlarmEvent
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)
Merges the values from other collection into this one.
|
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() |
public AlarmEventInstance(AlarmEvent core)
public AlarmEventInstance(AlarmEvent core, AlarmStateTransition transition)
public static AlarmEventInstance branch(AlarmEvent event)
public PropertySet getLocals()
public AlarmStateTransition getLastEventState()
AlarmEvent
getLastEventState
in interface AlarmEvent
public boolean contains(Property<?> prop)
contains
in interface PropertyValueSource
public <T> T getOrDefault(Property<T> prop)
getOrDefault
in interface PropertyValueSource
Property.getDefaultValue()
if not present.public <T> T get(Property<T> prop)
PropertyValueSource
get
in interface PropertyValueSource
public java.util.Iterator<PropertyValue> iterator()
iterator
in interface java.lang.Iterable<PropertyValue>
public <T> void set(Property<T> prop, T value)
set
in interface MutablePropertyValueSource
public <T> void setGlobal(Property<T> p, T value)
public <T> T getOrElse(Property<T> property, T value)
PropertyValueSource
Property
, or else fall back to value if it's not present.getOrElse
in interface PropertyValueSource
property
- 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 MutablePropertyValueSource
public void remove(Property<?> prop)
remove
in interface MutablePropertyValueSource
public java.util.Collection<Property<?>> getProperties()
getProperties
in interface PropertySet
public java.util.List<PropertyValue> getValues()
getValues
in interface PropertySet
public java.util.UUID getId()
AlarmEvent
getId
in interface AlarmEvent
public boolean isExtended(Property<?> prop)
PropertyValueSource
isExtended
in interface PropertyValueSource
public boolean isInherited(Property<?> prop)
PropertyValueSource
isInherited
in interface PropertyValueSource
public void merge(PropertySet other)
Mergable
merge
in interface Mergable<PropertySet>
public QualifiedPath getSource()
AlarmEvent
getSource
in interface AlarmEvent
public java.lang.String getName()
getName
in interface AlarmEvent
public AlarmPriority getPriority()
AlarmEvent
getPriority
in interface AlarmEvent
public StringPath getDisplayPath()
getDisplayPath
in interface AlarmEvent
public java.lang.String getDisplayPathOrSource()
getDisplayPathOrSource
in interface AlarmEvent
public java.lang.String getLabel()
AlarmEvent
getLabel
in interface AlarmEvent
public void active(EventData activeData)
active
in interface AlarmEvent
public void acknowledge(EventData ackData)
acknowledge
in interface AlarmEvent
public void clear(EventData clearData)
clear
in interface AlarmEvent
public boolean isCleared()
isCleared
in interface AlarmEvent
public boolean isAcked()
isAcked
in interface AlarmEvent
public boolean isShelved()
AlarmEvent
isShelved
in interface AlarmEvent
public AlarmState getState()
AlarmEvent
getState
in interface AlarmEvent
public EventData getActiveData()
getActiveData
in interface AlarmEvent
public EventData getClearedData()
getClearedData
in interface AlarmEvent
public EventData getAckData()
getAckData
in interface AlarmEvent
public java.lang.String toString()
toString
in class java.lang.Object
public java.lang.String getNotes()
getNotes
in interface AlarmEvent