Class SystemPropertiesManager
java.lang.Object
com.inductiveautomation.ignition.gateway.model.SystemPropertiesManager
Manages access to the SystemPropertiesRecord. A lot of different systems need access to the data in the record,
 and it is better to consolidate access to the record in a single place. When first loaded, this class will read
 the underlying SystemPropertiesRecord and load all the values into a map. Other systems will then retrieve values
 using properties specified in the GatewaySystemProperties class. Other systems can also write a value through
 this manager, which will propagate the changed value into the underlying SystemPropertiesRecord.
- 
Nested Class SummaryNested ClassesModifier and TypeClassDescriptionstatic classWhenever a SystemPropertiesListener fires, this provides a read-only version of the system properties map that can be safely passed to listeners.
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionvoidAdds a listener that will fire whenever the edge-specific gateway system properties change.voidAdds a listener that will fire whenever the gateway system properties change.<T> TgetEdgePropertyValue(Property<T> property) Retrieves an EdgeSystemPropertiesRecord value.<T> TgetPropertyValue(Property<T> property) Retrieves a SystemPropertiesRecord value.voidvoid<T> voidsetEdgePropertyValue(Property<T> property, T newPropValue, boolean notifyRecordUpdated) Sets a value that will be propagated to the EdgeSystemPropertiesRecord.<T> voidsetLocalPropertyValue(Property<T> property, T newPropValue, boolean notifyRecordUpdated) Sets a value that will be propagated to the *local* SystemPropertiesRecord.voidsetNewEdgeTagProvider(TagProviderSettingsRecord edgeProviderRef) Only use when a new gateway has just been commissioned and started for the first time.<T> voidsetPropertyValue(Property<T> property, T newPropValue, boolean notifyRecordUpdated) Sets a value that will be propagated to the SystemPropertiesRecord.<T> voidsetPropertyValue(Property<T> property, T newPropValue, PersistenceSession session) Sets a value that will be propagated to the SystemPropertiesRecord.voidsetPropertyValues(List<PropertyValue> propValues, boolean notifyRecordUpdated) Sets a collection of PropertyValues that will be propagated to the SystemPropertiesRecord.voidsetup()
- 
Constructor Details- 
SystemPropertiesManager
 
- 
- 
Method Details- 
setuppublic void setup()
- 
addSystemPropsListenerAdds a listener that will fire whenever the gateway system properties change. This is the modern equivalent to adding a listener to the SystemPropertiesRecord.META object.
- 
removeSystemPropsListener
- 
addEdgeSystemPropsListenerAdds a listener that will fire whenever the edge-specific gateway system properties change. This is the modern equivalent to adding a listener to the EdgeSystemPropertiesRecord.META object.
- 
removeEdgeSystemPropsListener
- 
getPropertyValueRetrieves a SystemPropertiesRecord value. This method is safer than accessing the SystemPropertiesRecord directly. Look in the GatewaySystemProperties class to locate the property whose value you need to retrieve. WARNING: this function will return null if the value is null in the SystemPropertiesRecord
- 
getEdgePropertyValueRetrieves an EdgeSystemPropertiesRecord value. This method is safer than accessing the EdgeSystemPropertiesRecord directly. Look in the EdgeSystemProperties class to locate the property whose value you need to retrieve. WARNING: this function will return null if the value is null in the EdgeSystemPropertiesRecord
- 
getPropertyValues- Returns:
- All gateway system properties in a read-only map. Look in the GatewaySystemProperties class to retrieve properties that you need to get out of the map.
 
- 
setPropertyValueSets a value that will be propagated to the SystemPropertiesRecord. Look in the GatewaySystemProperties class to locate the property whose value you need to set. If the notifyRecordUpdated parameter is set to true, all registered SystemPropertiesListener objects will be notified.
- 
setEdgePropertyValuepublic <T> void setEdgePropertyValue(Property<T> property, T newPropValue, boolean notifyRecordUpdated) Sets a value that will be propagated to the EdgeSystemPropertiesRecord. Look in the EdgeSystemProperties class to locate the property whose value you need to set. If the notifyRecordUpdated parameter is set to true, all SystemPropertiesListener objects registered as Edge system properties listeners will be notified.
- 
setNewEdgeTagProviderOnly use when a new gateway has just been commissioned and started for the first time. We have to set a real TagProviderSettingsRecord reference in EdgeSystemPropertiesRecord. This is needed so other systems can look up the reference later for things like the name of the tag provider.
- 
setPropertyValueSets a value that will be propagated to the SystemPropertiesRecord. Look in the GatewaySystemProperties class to locate the property whose value you need to set. This method will use a PersistenceSession that is passed in to update the underlying SystemPropertiesRecord. Use this when you are already have a session open, as you can't open 2 sessions in the same thread. Note: if you use this method, you are responsible for committing the session yourself. You are also responsible for calling PersistenceInterface#notifyRecordUpdated(systemPropertiesRecord) after the session is committed (if calling notifyRecordUpdated() is needed).
- 
setPropertyValuesSets a collection of PropertyValues that will be propagated to the SystemPropertiesRecord. Look in the GatewaySystemProperties class to locate the properties whose values you need to set.
- 
setLocalPropertyValuepublic <T> void setLocalPropertyValue(Property<T> property, T newPropValue, boolean notifyRecordUpdated) Sets a value that will be propagated to the *local* SystemPropertiesRecord. This means that the value will NOT be propagated to the other redundant node in a redundancy setup. In general, do NOT use this method except in specific circumstances where you know the SystemPropertiesRecord change needs to be kept local (one example is the demo timer reset). Instead, use setPropertyValue(). If the notifyRecordUpdated parameter is set to true, all registered SystemPropertiesListener objects will be notified.
- 
getSystemName- Returns:
- the gateway name
 
 
-