Class PyAlarmEventImpl

java.lang.Object
org.python.core.PyObject
com.inductiveautomation.ignition.common.alarming.PyAlarmEventImpl
All Implemented Interfaces:
AlarmEvent, PyAlarmEvent, Countable, Extendable<PropertySet>, Mergable<PropertySet>, MutablePropertyValueSource, PropertySet, PropertyValueSource, Serializable, Iterable<PropertyValue>

public class PyAlarmEventImpl extends org.python.core.PyObject implements PyAlarmEvent
See Also:
  • Nested Class Summary

    Nested classes/interfaces inherited from class org.python.core.PyObject

    org.python.core.PyObject.ConversionException
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final org.python.core.PyString
     

    Fields inherited from class org.python.core.PyObject

    attributes, gcMonitorGlobal, objtype, TYPE

    Fields inherited from interface com.inductiveautomation.ignition.common.config.PropertySet

    EMPTY
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
     
     
    protected
    PyAlarmEventImpl(AlarmEvent event, org.python.core.PyType type)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    __delitem__(org.python.core.PyObject key)
     
    org.python.core.PyObject
     
    org.python.core.PyObject
    __finditem__(org.python.core.PyObject key)
     
    int
    Implements the python len() function.
    void
    __setattr__(String name, org.python.core.PyObject value)
     
    void
    __setitem__(org.python.core.PyObject key, org.python.core.PyObject value)
     
    void
     
    void
    active(EventData activeData)
     
    void
    clear(EventData clearData)
     
    boolean
    contains(Property<?> prop)
     
    contains(String property)
     
    boolean
    contains(org.python.core.PyObject prop)
     
    protected Property<?>
    findOrMakeProperty(String propertyName)
     
    <T> T
    get(Property<T> prop)
    Retrieves the value of the property, or null if this set doesn't contain that property.
    get(String propertyName)
     
     
     
     
    int
     
     
     
    The unique id for this event.
    protected Object
     
    Returns the "Label" property, or "Name" if not defined.
    Returns the most recent transition, or if this event represents a single state, the particular state that it represents.
     
     
    <T> T
     
    getOrDefault(String property)
     
    <T> T
    getOrElse(Property<T> prop, T value)
    Get the value for a given Property, or else fall back to value if it's not present.
    getOrElse(String property, Object defaultValue)
     
    Returns the priority of the alarm event.
     
    The path to the alarm that generated this event.
    Returns the current state, as an enum.
    Returns the opaque PropertyValue objects.
    boolean
     
    boolean
     
    boolean
    Returns whether this property set contains a value for the prop, and the prop was actually inherited.
    boolean
    Indicates whether the property was inherited from a parent type.
    boolean
    Returns whether this is event is currently shelved, if the ShelfExpiration property is set, or whether the event was shelved, for journaled events, based on whether the IsShelved property is set.
     
    void
     
    void
    remove(Property<?> prop)
     
    <T> void
    set(Property<T> prop, T value)
     
    void
    set(PropertyValue propValue)
     
    protected void
    set(PropertyValue pv, boolean global)
     
    void
    set(String propertyName, Object value)
     
    protected void
    set(String propertyName, Object value, boolean global)
     
    void
    setGlobal(String propertyName, Object value)
     
    This is only present in order to enable much more advanced scripting.
     

    Methods inherited from class org.python.core.PyObject

    __abs__, __add__, __and__, __call__, __call__, __call__, __call__, __call__, __call__, __call__, __call__, __call__, __call__, __call__, __call__, __call__, __call__, __call__, __call__, __cmp__, __coerce__, __coerce_ex__, __complex__, __contains__, __delattr__, __delattr__, __delete__, __delitem__, __delslice__, __delslice__, __dir__, __div__, __divmod__, __ensure_finalizer__, __eq__, __findattr__, __findattr__, __finditem__, __finditem__, __float__, __floordiv__, __format__, __ge__, __get__, __getattr__, __getattr__, __getitem__, __getitem__, __getnewargs__, __getslice__, __getslice__, __gt__, __hash__, __hex__, __iadd__, __iand__, __idiv__, __idivmod__, __ifloordiv__, __ilshift__, __imod__, __imul__, __index__, __int__, __invert__, __ior__, __ipow__, __irshift__, __isub__, __iter__, __iternext__, __itruediv__, __ixor__, __le__, __long__, __lshift__, __lt__, __mod__, __mul__, __ne__, __neg__, __nonzero__, __not__, __oct__, __or__, __pos__, __pow__, __pow__, __radd__, __rand__, __rawdir__, __rdiv__, __rdivmod__, __reduce__, __reduce_ex__, __reduce_ex__, __repr__, __rfloordiv__, __rlshift__, __rmod__, __rmul__, __ror__, __rpow__, __rrshift__, __rshift__, __rsub__, __rtruediv__, __rxor__, __set__, __setattr__, __setitem__, __setitem__, __setslice__, __setslice__, __str__, __sub__, __tojava__, __truediv__, __trunc__, __unicode__, __xor__, _add, _and, _callextra, _cmp, _div, _divmod, _doget, _doget, _doset, _eq, _floordiv, _ge, _gt, _iadd, _iand, _idiv, _idivmod, _ifloordiv, _ilshift, _imod, _imul, _in, _ior, _ipow, _irshift, _is, _isnot, _isub, _itruediv, _ixor, _jcall, _jcallexc, _jthrow, _le, _lshift, _lt, _mod, _mul, _ne, _notin, _or, _pow, _rshift, _sub, _truediv, _unsupportedop, _xor, adaptToCoerceTuple, asDouble, asIndex, asIndex, asInt, asInt, asIterable, asLong, asLong, asName, asName, asString, asString, asStringOrNull, asStringOrNull, bit_length, conjugate, delDict, delType, dispatch__init__, equals, fastGetClass, fastGetDict, finalize, getDict, getType, hashCode, impAttr, implementsDescrDelete, implementsDescrGet, implementsDescrSet, invoke, invoke, invoke, invoke, invoke, invoke, isCallable, isDataDescr, isIndex, isInteger, isMappingType, isNumberType, isSequenceType, mergeClassDict, mergeDictAttr, mergeListAttr, noAttributeError, object___subclasshook__, readonlyAttributeError, runsupportedopMessage, setDict, setType, unsupportedopMessage

    Methods inherited from class java.lang.Object

    clone, getClass, notify, notifyAll, wait, wait, wait

    Methods inherited from interface java.lang.Iterable

    forEach, spliterator

    Methods inherited from interface com.inductiveautomation.ignition.common.config.MutablePropertyValueSource

    merge

    Methods inherited from interface com.inductiveautomation.ignition.common.config.PropertySet

    extend, getExtension, newDefaultInstance, newExtension

    Methods inherited from interface com.inductiveautomation.ignition.common.config.PropertyValueSource

    getNonNull, getNonNull
  • Field Details

    • __doc__

      public static final org.python.core.PyString __doc__
  • Constructor Details

    • PyAlarmEventImpl

      protected PyAlarmEventImpl(AlarmEvent event, org.python.core.PyType type)
    • PyAlarmEventImpl

      public PyAlarmEventImpl(AlarmEvent event)
  • Method Details

    • sourceEvent

      public AlarmEvent sourceEvent()
      Description copied from interface: PyAlarmEvent
      This is only present in order to enable much more advanced scripting. It should not normally be used. *
      Specified by:
      sourceEvent in interface PyAlarmEvent
    • toString

      public String toString()
      Overrides:
      toString in class org.python.core.PyObject
    • get

      public <T> T get(Property<T> prop)
      Description copied from interface: PropertyValueSource
      Retrieves the value of the property, or null if this set doesn't contain that property.
      Specified by:
      get in interface PropertyValueSource
    • findOrMakeProperty

      protected Property<?> findOrMakeProperty(String propertyName)
    • get

      @Nullable public Object get(String propertyName)
      Specified by:
      get in interface PyAlarmEvent
    • getOrDefault

      @Nullable public Object getOrDefault(String property)
      Specified by:
      getOrDefault in interface PyAlarmEvent
    • getOrElse

      @Nullable public Object getOrElse(String property, Object defaultValue)
      Specified by:
      getOrElse in interface PyAlarmEvent
    • contains

      public Boolean contains(String property)
      Specified by:
      contains in interface PyAlarmEvent
    • set

      public void set(String propertyName, Object value)
      Specified by:
      set in interface PyAlarmEvent
    • setGlobal

      public void setGlobal(String propertyName, Object value)
      Specified by:
      setGlobal in interface PyAlarmEvent
    • set

      protected void set(String propertyName, Object value, boolean global)
    • set

      protected void set(PropertyValue pv, boolean global)
    • set

      public <T> void set(Property<T> prop, T value)
      Specified by:
      set in interface MutablePropertyValueSource
    • set

      public void set(PropertyValue propValue)
      Specified by:
      set in interface MutablePropertyValueSource
    • remove

      public void remove(Property<?> prop)
      Specified by:
      remove in interface MutablePropertyValueSource
    • getCount

      public int getCount()
      Specified by:
      getCount in interface Countable
    • getProperties

      public Collection<Property<?>> getProperties()
      Specified by:
      getProperties in interface PropertyValueSource
    • getValues

      public List<PropertyValue> getValues()
      Description copied from interface: PropertyValueSource
      Returns the opaque PropertyValue objects. This can be useful when you want to avoid the strict type checking of the value, and it's important to note that if the property is bound, the value will be a BoundValue. Be very careful about overriding, and make sure to maintain the methodology of using getProperties to iterate and get (or getOrDefault), to get the value, because those are all handled differently by BoundPropertySets, ExtendedPropertySets, etc.
      Specified by:
      getValues in interface PropertyValueSource
    • isExtended

      public boolean isExtended(Property<?> prop)
      Description copied from interface: PropertySet
      Returns whether this property set contains a value for the prop, and the prop was actually inherited. In other words, this is true if the property is inherited, and an override value is present.
      Specified by:
      isExtended in interface PropertySet
    • isInherited

      public boolean isInherited(Property<?> prop)
      Description copied from interface: PropertySet
      Indicates whether the property was inherited from a parent type.
      Specified by:
      isInherited in interface PropertySet
    • merge

      public void merge(PropertySet other)
      Specified by:
      merge in interface Mergable<PropertySet>
    • iterator

      public Iterator<PropertyValue> iterator()
      Specified by:
      iterator in interface Iterable<PropertyValue>
    • contains

      public boolean contains(Property<?> prop)
      Specified by:
      contains in interface PropertyValueSource
      Returns:
      True if the source contains a value for prop.
    • contains

      public boolean contains(org.python.core.PyObject prop)
    • getOrDefault

      public <T> T getOrDefault(Property<T> prop)
      Specified by:
      getOrDefault in interface PropertyValueSource
      Returns:
      The value for prop or Property.getDefaultValue() if not present. Can return null if the value is null.
    • getOrElse

      public <T> T getOrElse(Property<T> prop, T value)
      Description copied from interface: PropertyValueSource
      Get the value for a given Property, or else fall back to value if it's not present.
      Specified by:
      getOrElse in interface PropertyValueSource
      Parameters:
      prop - The Property for which a value is to be retrieved.
      value - The value to default to if property isn't present.
      Returns:
      The value of property if present, value if not. Can return null if the value is null.
    • getId

      public UUID getId()
      Description copied from interface: AlarmEvent
      The unique id for this event. Generated when the alarm is first generated, and then maintained for the life of the alarm event cycle.
      Specified by:
      getId in interface AlarmEvent
    • getSource

      public QualifiedPath getSource()
      Description copied from interface: AlarmEvent
      The path to the alarm that generated this event.
      Specified by:
      getSource in interface AlarmEvent
    • getName

      public String getName()
      Specified by:
      getName in interface AlarmEvent
    • getPriority

      public AlarmPriority getPriority()
      Description copied from interface: AlarmEvent
      Returns the priority of the alarm event.
      Specified by:
      getPriority in interface AlarmEvent
    • getDisplayPath

      public StringPath getDisplayPath()
      Specified by:
      getDisplayPath in interface AlarmEvent
    • getDisplayPathOrSource

      public String getDisplayPathOrSource()
      Specified by:
      getDisplayPathOrSource in interface AlarmEvent
    • getLabel

      public String getLabel()
      Description copied from interface: AlarmEvent
      Returns the "Label" property, or "Name" if not defined.
      Specified by:
      getLabel in interface AlarmEvent
    • active

      public void active(EventData activeData)
      Specified by:
      active in interface AlarmEvent
    • acknowledge

      public void acknowledge(EventData ackData)
      Specified by:
      acknowledge in interface AlarmEvent
    • clear

      public void clear(EventData clearData)
      Specified by:
      clear in interface AlarmEvent
    • isCleared

      public boolean isCleared()
      Specified by:
      isCleared in interface AlarmEvent
    • isAcked

      public boolean isAcked()
      Specified by:
      isAcked in interface AlarmEvent
    • isShelved

      public boolean isShelved()
      Description copied from interface: AlarmEvent
      Returns whether this is event is currently shelved, if the ShelfExpiration property is set, or whether the event was shelved, for journaled events, based on whether the IsShelved property is set.
      Specified by:
      isShelved in interface AlarmEvent
    • getState

      public AlarmState getState()
      Description copied from interface: AlarmEvent
      Returns the current state, as an enum. If this event represents a single state, such as the result from a journal query, this value will be misleading. In that case, getLastEventState() is the more accurate state function to use.
      Specified by:
      getState in interface AlarmEvent
    • getLastEventState

      public AlarmStateTransition getLastEventState()
      Description copied from interface: AlarmEvent
      Returns the most recent transition, or if this event represents a single state, the particular state that it represents.
      Specified by:
      getLastEventState in interface AlarmEvent
    • getActiveData

      public EventData getActiveData()
      Specified by:
      getActiveData in interface AlarmEvent
    • getClearedData

      public EventData getClearedData()
      Specified by:
      getClearedData in interface AlarmEvent
    • getAckData

      public EventData getAckData()
      Specified by:
      getAckData in interface AlarmEvent
    • getNotes

      public String getNotes()
      Specified by:
      getNotes in interface AlarmEvent
    • __len__

      public int __len__()
      Implements the python len() function. Can this be made more useful?
      Overrides:
      __len__ in class org.python.core.PyObject
    • __finditem__

      public org.python.core.PyObject __finditem__(org.python.core.PyObject key)
      Overrides:
      __finditem__ in class org.python.core.PyObject
    • __findattr_ex__

      @Nullable public org.python.core.PyObject __findattr_ex__(String name)
      Overrides:
      __findattr_ex__ in class org.python.core.PyObject
    • __setattr__

      public void __setattr__(String name, org.python.core.PyObject value)
      Overrides:
      __setattr__ in class org.python.core.PyObject
    • __setitem__

      public void __setitem__(org.python.core.PyObject key, org.python.core.PyObject value)
      Overrides:
      __setitem__ in class org.python.core.PyObject
    • __delitem__

      public void __delitem__(org.python.core.PyObject key)
      Overrides:
      __delitem__ in class org.python.core.PyObject
    • getJavaProxy

      protected Object getJavaProxy()
      Overrides:
      getJavaProxy in class org.python.core.PyObject