AP&C API Reference
Public Member Functions | Properties | Events | List of all members
Apac.Data.ISettingsStore Interface Reference

The contract required by all concrete setting stores. More...

Inheritance diagram for Apac.Data.ISettingsStore:
Apac.Data.DatabaseStore Apac.Data.XmlFileStore Apac.Data.FirebirdStore

Public Member Functions

void ActivateCurrentConfiguration ()
 Should promote configuration changes that have been persisted to the runtime environment. This allows simple edits by the user to result in atomic commits of each change without reloading the entire system before all edits are complete. More...
 
bool PersistManagedElement (Apac.Monitoring.ManagedElement element)
 Should create or update the given element in the datastore for use in setting up mappings to incoming data. More...
 
void DeleteManagedElement (Apac.Monitoring.ManagedElement element)
 Should remove the given element from the datastore. More...
 
Apac.Monitoring.ManagedElement GetManagedElement (uint id)
 Should return the managed element specified by id . More...
 
List< Apac.Monitoring.ManagedElementGetManagedElements ()
 Should return a list of all managed elements in the system. More...
 
bool PersistMeasurementMappings (Apac.Collections.MeasurementMappingCollection mappings)
 Should write the given mappings to a location where they will remain pending until they are promoted. More...
 
bool PersistMeasurementMapping (Apac.Monitoring.MeasurementMapping mapping, Apac.Monitoring.MeasurementMapping oldmapping)
 Should write the given mapping to the store. More...
 
void DeleteMeasurementMapping (Apac.Monitoring.MeasurementMapping mapping)
 Should delete the given mapping from the store. More...
 
bool ChangeActiveConfiguration (string name)
 Should promote the mapping settings with the given name to be the active mappings. More...
 
Apac.Collections.MeasurementMappingCollection GetMeasurementMappings (string name)
 Retrieves the mappings with the given name. More...
 
Apac.Settings.Configuration GetConfiguration (string name)
 
Apac.Settings.Configuration GetConfiguration (short id)
 
List< Monitoring.MeasurementMappingLookupMappings (uint elementId)
 Should perform a store-specific lookup for a mapping (regardless of state) for the given element identifier. More...
 
List< Monitoring.MeasurementMappingLookupMappings (Apac.Monitoring.MeasurementSource source)
 Looks up the mapping by sensor. More...
 
void DeleteConfiguration (string name)
 Should delete the specified mappings unless they are the active mappings. Then an InvalidOperationException is thrown. More...
 
void SaveConfiguration (Settings.Configuration config, bool activate)
 Should save the given configuration to the data store. More...
 
Apac.Collections.MeasurementMappingCollection CloneMeasurementMappings (string origName, string copyName)
 Should make a copy of the mappings with origName giving the copy the name of copyName . More...
 
List< Monitoring.ThresholdGetThresholds (uint elementId)
 Gets the thresholds. More...
 
bool PersistThreshold (Monitoring.Threshold threshold)
 Perists the threshold. More...
 
Monitoring.EventDef GetEventDef (uint eventId)
 Gets the event def. More...
 
List< Monitoring.EventDefGetEventDefs ()
 Gets all event defs. More...
 
bool PersistEventDef (Monitoring.EventDef eventDef)
 Persistes the event def. More...
 
void DeleteEventDef (Monitoring.EventDef eventDef)
 Deletes the event def. More...
 
List< Monitoring.ActionDefGetActions (uint elementId, uint eventId)
 Gets the actions. More...
 
List< Monitoring.ActionDefGetActions ()
 Gets all actions. More...
 
bool PersistAction (Monitoring.ActionDef action)
 Persists the action. More...
 
void DeleteAction (Monitoring.ActionDef action)
 Deletes the action. More...
 
void DeleteActions (Monitoring.EventDef eventDef)
 Deletes the actions associated with the event def. More...
 
Monitoring.Sensor GetSensor (uint id)
 Gets the sensor with the specified ID. More...
 
List< Monitoring.SensorGetSensors (short configId, bool activeOnly)
 Gets all sensors. More...
 
void PersistSensor (Monitoring.Sensor sensor)
 Persists the sensor. More...
 
void DeleteSensor (Monitoring.Sensor sensor)
 Deletes the sensor. More...
 

Properties

Settings.Configuration CurrentConfiguration [get]
 Should get the currently held settings. More...
 

Events

SettingsChangedHandler SettingsChanged
 Occurs when any settings have changed. More...
 

Detailed Description

The contract required by all concrete setting stores.

Member Function Documentation

◆ ActivateCurrentConfiguration()

void Apac.Data.ISettingsStore.ActivateCurrentConfiguration ( )

Should promote configuration changes that have been persisted to the runtime environment. This allows simple edits by the user to result in atomic commits of each change without reloading the entire system before all edits are complete.

Implemented in Apac.Data.XmlFileStore, and Apac.Data.DatabaseStore.

◆ ChangeActiveConfiguration()

bool Apac.Data.ISettingsStore.ChangeActiveConfiguration ( string  name)

Should promote the mapping settings with the given name to be the active mappings.

Returns
Returns true if successful, false otherwise. If no configuration changes are pending the implementation should indicate success.

Implemented in Apac.Data.XmlFileStore, and Apac.Data.DatabaseStore.

◆ CloneMeasurementMappings()

Apac.Collections.MeasurementMappingCollection Apac.Data.ISettingsStore.CloneMeasurementMappings ( string  origName,
string  copyName 
)

Should make a copy of the mappings with origName giving the copy the name of copyName .

Parameters
copyName
Returns

Implemented in Apac.Data.XmlFileStore, and Apac.Data.DatabaseStore.

◆ DeleteAction()

void Apac.Data.ISettingsStore.DeleteAction ( Monitoring.ActionDef  action)

Deletes the action.

Parameters
actionThe action.

◆ DeleteActions()

void Apac.Data.ISettingsStore.DeleteActions ( Monitoring.EventDef  eventDef)

Deletes the actions associated with the event def.

Parameters
eventDefThe event def.

◆ DeleteConfiguration()

void Apac.Data.ISettingsStore.DeleteConfiguration ( string  name)

Should delete the specified mappings unless they are the active mappings. Then an InvalidOperationException is thrown.

Parameters
name

Implemented in Apac.Data.XmlFileStore, and Apac.Data.DatabaseStore.

◆ DeleteEventDef()

void Apac.Data.ISettingsStore.DeleteEventDef ( Monitoring.EventDef  eventDef)

Deletes the event def.

Parameters
eventDefThe event def.

◆ DeleteManagedElement()

void Apac.Data.ISettingsStore.DeleteManagedElement ( Apac.Monitoring.ManagedElement  element)

Should remove the given element from the datastore.

Parameters
elementThe Apac.Monitoring.ManagedElement to be removed.

◆ DeleteMeasurementMapping()

void Apac.Data.ISettingsStore.DeleteMeasurementMapping ( Apac.Monitoring.MeasurementMapping  mapping)

Should delete the given mapping from the store.

Parameters
mappingThe MeasurementMapping to be deleted.
Returns
Returns true if the delete was successfull.

Implemented in Apac.Data.XmlFileStore, and Apac.Data.DatabaseStore.

◆ DeleteSensor()

void Apac.Data.ISettingsStore.DeleteSensor ( Monitoring.Sensor  sensor)

Deletes the sensor.

Parameters
sensorThe sensor.

◆ GetActions() [1/2]

List<Monitoring.ActionDef> Apac.Data.ISettingsStore.GetActions ( )

Gets all actions.

Returns
Returns a List<Monitoring.Action> .

Implemented in Apac.Data.XmlFileStore, and Apac.Data.DatabaseStore.

◆ GetActions() [2/2]

List<Monitoring.ActionDef> Apac.Data.ISettingsStore.GetActions ( uint  elementId,
uint  eventId 
)

Gets the actions.

Parameters
elementIdThe element id.
eventIdThe event id.
Returns
Returns a List<Monitoring.Action> for the requested element and event def.

Implemented in Apac.Data.XmlFileStore, and Apac.Data.DatabaseStore.

◆ GetEventDef()

Monitoring.EventDef Apac.Data.ISettingsStore.GetEventDef ( uint  eventId)

Gets the event def.

Parameters
eventIdThe event id.
Returns
Returns the Monitoring.EventDef with the requested ID.

Implemented in Apac.Data.XmlFileStore, and Apac.Data.DatabaseStore.

◆ GetEventDefs()

List<Monitoring.EventDef> Apac.Data.ISettingsStore.GetEventDefs ( )

Gets all event defs.

Returns
Returns a List<Monitoring.EventDef>.

Implemented in Apac.Data.XmlFileStore, and Apac.Data.DatabaseStore.

◆ GetManagedElement()

Apac.Monitoring.ManagedElement Apac.Data.ISettingsStore.GetManagedElement ( uint  id)

Should return the managed element specified by id .

Parameters
idThe datastore identifier for the required Apac.Monitoring.ManagedElement.
Returns
Returns the Apac.Monitoring.ManagedElement or null.

Implemented in Apac.Data.XmlFileStore, and Apac.Data.DatabaseStore.

◆ GetManagedElements()

List<Apac.Monitoring.ManagedElement> Apac.Data.ISettingsStore.GetManagedElements ( )

Should return a list of all managed elements in the system.

Returns
Returns the List<Apac.Monitoring.ManagedElement>.

Implemented in Apac.Data.XmlFileStore, and Apac.Data.DatabaseStore.

◆ GetMeasurementMappings()

Apac.Collections.MeasurementMappingCollection Apac.Data.ISettingsStore.GetMeasurementMappings ( string  name)

Retrieves the mappings with the given name.

Parameters
nameThe name given to the mappings.
Returns
Returns the collection of mappings if they exist by the given name, or null.

Implemented in Apac.Data.XmlFileStore, and Apac.Data.DatabaseStore.

◆ GetSensor()

Monitoring.Sensor Apac.Data.ISettingsStore.GetSensor ( uint  id)

Gets the sensor with the specified ID.

Parameters
idThe sensor id.
Returns
Returns the requested Monitoring.Sensor or null.

Implemented in Apac.Data.XmlFileStore, and Apac.Data.DatabaseStore.

◆ GetSensors()

List<Monitoring.Sensor> Apac.Data.ISettingsStore.GetSensors ( short  configId,
bool  activeOnly 
)

Gets all sensors.

Parameters
configIdThe config id.
activeOnlyif set to true only active sensors are returned.
Returns
Returns a T:List<Sensor> with all existing sensors.

Implemented in Apac.Data.XmlFileStore, and Apac.Data.DatabaseStore.

◆ GetThresholds()

List<Monitoring.Threshold> Apac.Data.ISettingsStore.GetThresholds ( uint  elementId)

Gets the thresholds.

Parameters
elementIdThe element id.
Returns
Returns a List<Monitoring.Threshold> for the requested element.

Implemented in Apac.Data.XmlFileStore, and Apac.Data.DatabaseStore.

◆ LookupMappings() [1/2]

List<Monitoring.MeasurementMapping> Apac.Data.ISettingsStore.LookupMappings ( Apac.Monitoring.MeasurementSource  source)

Looks up the mapping by sensor.

Parameters
sourceThe MeasurementSource describing the supervisable that is reading the sensor.
Returns
Returns a List<Monitoring.MeasurementMapping> which may be empty.

Implemented in Apac.Data.XmlFileStore, and Apac.Data.DatabaseStore.

◆ LookupMappings() [2/2]

List<Monitoring.MeasurementMapping> Apac.Data.ISettingsStore.LookupMappings ( uint  elementId)

Should perform a store-specific lookup for a mapping (regardless of state) for the given element identifier.

Parameters
elementIdThe element for which the mapping is to be found.
Returns
Returns a List<Monitoring.MeasurementMapping> which may be empty.

Implemented in Apac.Data.XmlFileStore, and Apac.Data.DatabaseStore.

◆ PersistAction()

bool Apac.Data.ISettingsStore.PersistAction ( Monitoring.ActionDef  action)

Persists the action.

Parameters
actionThe action.
Returns
Returns true if the write was successfull.

◆ PersistEventDef()

bool Apac.Data.ISettingsStore.PersistEventDef ( Monitoring.EventDef  eventDef)

Persistes the event def.

Parameters
eventDefThe event def.
Returns
Returns true if the write was successfull.

◆ PersistManagedElement()

bool Apac.Data.ISettingsStore.PersistManagedElement ( Apac.Monitoring.ManagedElement  element)

Should create or update the given element in the datastore for use in setting up mappings to incoming data.

Parameters
elementThe Apac.Monitoring.ManagedElement to be persisted.
Returns
Returns true if successful, false otherwise.

◆ PersistMeasurementMapping()

bool Apac.Data.ISettingsStore.PersistMeasurementMapping ( Apac.Monitoring.MeasurementMapping  mapping,
Apac.Monitoring.MeasurementMapping  oldmapping 
)

Should write the given mapping to the store.

Parameters
mappingThe mapping to be written.
oldmappingThe old mapping used to determine what row to update.
Returns
Returns true if the write was successfull.

Implemented in Apac.Data.XmlFileStore, and Apac.Data.DatabaseStore.

◆ PersistMeasurementMappings()

bool Apac.Data.ISettingsStore.PersistMeasurementMappings ( Apac.Collections.MeasurementMappingCollection  mappings)

Should write the given mappings to a location where they will remain pending until they are promoted.

Parameters
mappingsThe mappings to be written.
Returns
Returns true if successful, false otherwise.

Implemented in Apac.Data.XmlFileStore.

◆ PersistSensor()

void Apac.Data.ISettingsStore.PersistSensor ( Monitoring.Sensor  sensor)

Persists the sensor.

Parameters
sensorThe sensor.

◆ PersistThreshold()

bool Apac.Data.ISettingsStore.PersistThreshold ( Monitoring.Threshold  threshold)

Perists the threshold.

Parameters
thresholdThe threshold.
Returns
Returns true if the write was successfull.

◆ SaveConfiguration()

void Apac.Data.ISettingsStore.SaveConfiguration ( Settings.Configuration  config,
bool  activate 
)

Should save the given configuration to the data store.

Parameters
configThe Settings.Configuration to be saved.
activateIndicates if the configuration should be promoted to the runtime system.

Property Documentation

◆ CurrentConfiguration

Settings.Configuration Apac.Data.ISettingsStore.CurrentConfiguration
get

Should get the currently held settings.

Event Documentation

◆ SettingsChanged

SettingsChangedHandler Apac.Data.ISettingsStore.SettingsChanged

Occurs when any settings have changed.


The documentation for this interface was generated from the following file: