AP&C API Reference
|
The contract required by all concrete setting stores. More...
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.ManagedElement > | GetManagedElements () |
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.MeasurementMapping > | LookupMappings (uint elementId) |
Should perform a store-specific lookup for a mapping (regardless of state) for the given element identifier. More... | |
List< Monitoring.MeasurementMapping > | LookupMappings (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.Threshold > | GetThresholds (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.EventDef > | GetEventDefs () |
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.ActionDef > | GetActions (uint elementId, uint eventId) |
Gets the actions. More... | |
List< Monitoring.ActionDef > | GetActions () |
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.Sensor > | GetSensors (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... | |
The contract required by all concrete setting stores.
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.
bool Apac.Data.ISettingsStore.ChangeActiveConfiguration | ( | string | name | ) |
Should promote the mapping settings with the given name to be the active mappings.
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.
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 .
copyName |
Implemented in Apac.Data.XmlFileStore, and Apac.Data.DatabaseStore.
void Apac.Data.ISettingsStore.DeleteAction | ( | Monitoring.ActionDef | action | ) |
Deletes the action.
action | The action. |
void Apac.Data.ISettingsStore.DeleteActions | ( | Monitoring.EventDef | eventDef | ) |
Deletes the actions associated with the event def.
eventDef | The event def. |
void Apac.Data.ISettingsStore.DeleteConfiguration | ( | string | name | ) |
Should delete the specified mappings unless they are the active mappings. Then an InvalidOperationException is thrown.
name |
Implemented in Apac.Data.XmlFileStore, and Apac.Data.DatabaseStore.
void Apac.Data.ISettingsStore.DeleteEventDef | ( | Monitoring.EventDef | eventDef | ) |
Deletes the event def.
eventDef | The event def. |
void Apac.Data.ISettingsStore.DeleteManagedElement | ( | Apac.Monitoring.ManagedElement | element | ) |
Should remove the given element from the datastore.
element | The Apac.Monitoring.ManagedElement to be removed. |
void Apac.Data.ISettingsStore.DeleteMeasurementMapping | ( | Apac.Monitoring.MeasurementMapping | mapping | ) |
Should delete the given mapping from the store.
mapping | The MeasurementMapping to be deleted. |
true
if the delete was successfull.Implemented in Apac.Data.XmlFileStore, and Apac.Data.DatabaseStore.
void Apac.Data.ISettingsStore.DeleteSensor | ( | Monitoring.Sensor | sensor | ) |
Deletes the sensor.
sensor | The sensor. |
List<Monitoring.ActionDef> Apac.Data.ISettingsStore.GetActions | ( | ) |
Gets all actions.
Implemented in Apac.Data.XmlFileStore, and Apac.Data.DatabaseStore.
List<Monitoring.ActionDef> Apac.Data.ISettingsStore.GetActions | ( | uint | elementId, |
uint | eventId | ||
) |
Gets the actions.
elementId | The element id. |
eventId | The event id. |
Implemented in Apac.Data.XmlFileStore, and Apac.Data.DatabaseStore.
Monitoring.EventDef Apac.Data.ISettingsStore.GetEventDef | ( | uint | eventId | ) |
Gets the event def.
eventId | The event id. |
Implemented in Apac.Data.XmlFileStore, and Apac.Data.DatabaseStore.
List<Monitoring.EventDef> Apac.Data.ISettingsStore.GetEventDefs | ( | ) |
Gets all event defs.
Implemented in Apac.Data.XmlFileStore, and Apac.Data.DatabaseStore.
Apac.Monitoring.ManagedElement Apac.Data.ISettingsStore.GetManagedElement | ( | uint | id | ) |
Should return the managed element specified by id .
id | The datastore identifier for the required Apac.Monitoring.ManagedElement. |
null
.Implemented in Apac.Data.XmlFileStore, and Apac.Data.DatabaseStore.
List<Apac.Monitoring.ManagedElement> Apac.Data.ISettingsStore.GetManagedElements | ( | ) |
Should return a list of all managed elements in the system.
Implemented in Apac.Data.XmlFileStore, and Apac.Data.DatabaseStore.
Apac.Collections.MeasurementMappingCollection Apac.Data.ISettingsStore.GetMeasurementMappings | ( | string | name | ) |
Retrieves the mappings with the given name.
name | The name given to the mappings. |
null
.Implemented in Apac.Data.XmlFileStore, and Apac.Data.DatabaseStore.
Monitoring.Sensor Apac.Data.ISettingsStore.GetSensor | ( | uint | id | ) |
Gets the sensor with the specified ID.
id | The sensor id. |
null
.Implemented in Apac.Data.XmlFileStore, and Apac.Data.DatabaseStore.
List<Monitoring.Sensor> Apac.Data.ISettingsStore.GetSensors | ( | short | configId, |
bool | activeOnly | ||
) |
Gets all sensors.
configId | The config id. |
activeOnly | if set to true only active sensors are returned. |
Implemented in Apac.Data.XmlFileStore, and Apac.Data.DatabaseStore.
List<Monitoring.Threshold> Apac.Data.ISettingsStore.GetThresholds | ( | uint | elementId | ) |
Gets the thresholds.
elementId | The element id. |
Implemented in Apac.Data.XmlFileStore, and Apac.Data.DatabaseStore.
List<Monitoring.MeasurementMapping> Apac.Data.ISettingsStore.LookupMappings | ( | Apac.Monitoring.MeasurementSource | source | ) |
Looks up the mapping by sensor.
source | The MeasurementSource describing the supervisable that is reading the sensor. |
Implemented in Apac.Data.XmlFileStore, and Apac.Data.DatabaseStore.
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.
elementId | The element for which the mapping is to be found. |
Implemented in Apac.Data.XmlFileStore, and Apac.Data.DatabaseStore.
bool Apac.Data.ISettingsStore.PersistAction | ( | Monitoring.ActionDef | action | ) |
Persists the action.
action | The action. |
true
if the write was successfull.bool Apac.Data.ISettingsStore.PersistEventDef | ( | Monitoring.EventDef | eventDef | ) |
Persistes the event def.
eventDef | The event def. |
true
if the write was successfull.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.
element | The Apac.Monitoring.ManagedElement to be persisted. |
true
if successful, false
otherwise.bool Apac.Data.ISettingsStore.PersistMeasurementMapping | ( | Apac.Monitoring.MeasurementMapping | mapping, |
Apac.Monitoring.MeasurementMapping | oldmapping | ||
) |
Should write the given mapping to the store.
mapping | The mapping to be written. |
oldmapping | The old mapping used to determine what row to update. |
true
if the write was successfull.Implemented in Apac.Data.XmlFileStore, and Apac.Data.DatabaseStore.
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.
mappings | The mappings to be written. |
true
if successful, false
otherwise.Implemented in Apac.Data.XmlFileStore.
void Apac.Data.ISettingsStore.PersistSensor | ( | Monitoring.Sensor | sensor | ) |
Persists the sensor.
sensor | The sensor. |
bool Apac.Data.ISettingsStore.PersistThreshold | ( | Monitoring.Threshold | threshold | ) |
Perists the threshold.
threshold | The threshold. |
true
if the write was successfull.void Apac.Data.ISettingsStore.SaveConfiguration | ( | Settings.Configuration | config, |
bool | activate | ||
) |
Should save the given configuration to the data store.
config | The Settings.Configuration to be saved. |
activate | Indicates if the configuration should be promoted to the runtime system. |
|
get |
Should get the currently held settings.
SettingsChangedHandler Apac.Data.ISettingsStore.SettingsChanged |
Occurs when any settings have changed.