Configuration provides access to all configuration objects within the Milestone Platform.
This covers well known Milestone objects like Cameras, Servers, Presets events etc, but also 3rd party plug-in objects can be accessed though this interface.
Access to this class is done via Configuration.Instance.
More...
Classes | |
class | RegistrationServiceEndpoint |
Defines one individual endpoint, contained within some service. Multiple Endpoints are relevant for e.g. support of multiple Authentication types or multiple Uri's. More... | |
struct | ServiceURIInfo |
The information stored for each services. More... | |
Public Member Functions | |||||||
virtual void | BeginMassUpdate () | ||||||
Calling this method will suspend updating the UI for every change done to the configuration. When issuing many SaveItemConfiguration or DeleteItemConfiguration, this method can be called to speed up the changes. Always call the EndMassUpdate() when complete to get the UI updated. This method is only relevant when executing in one of the administrator environments. | |||||||
virtual void | DeleteItemConfiguration (Guid platformDefinitionId, Item item) | ||||||
Delete configuration for one Item. | |||||||
virtual void | DeleteItemConfiguration (ServerId serverId, Guid platformDefinitionId, Item item) | ||||||
Delete configuration for one Item. | |||||||
virtual void | EndMassUpdate () | ||||||
Is called when updated of many items is complete. The UI will be refreshed to reflect the changes been done while the BeginMassUpdate has been called. | |||||||
virtual VideoOS.Platform.Admin.AssociatedProperties | GetAssociatedProperties (Item item, Guid pluginId) | ||||||
Get the properties that is associated with item, for the pluginId. | |||||||
Item | GetItem (FQID fqid) | ||||||
Get one specific item by its fully-Qualified ID. | |||||||
Item | GetItem (Guid objectId, Guid kind) | ||||||
Get one specific Item, based on its ObjectId (the Guid), and the Kind of Item. The Kind is supplied to speedup the lookup method. | |||||||
Item | GetItem (ServerId serverId, Guid objectId, Guid kind) | ||||||
Get one specific Item, based on its ObjectId (the Guid), the Kind of Item, and the Server it is located on. The Kind and ServerId is supplied to speedup the lookup method. | |||||||
virtual void | GetItemAsync (FQID fqid, AsyncItemHandler asyncItemHandler, Control control, object callerReference) | ||||||
Lookup one specific item by its fully-Qualified ID. | |||||||
virtual Item | GetItemConfiguration (Guid pluginDefinitionId, Guid itemKind, Guid objectId) | ||||||
Retrieve one item of a specific Kind and with a specific objectId. Also see comment on GetItemConfiguration about converting to own class. | |||||||
virtual Item | GetItemConfiguration (ServerId serverId, Guid pluginDefinitionId, Guid itemKind, Guid objectId) | ||||||
Retrieve one item of a specific Kind and with a specific objectId. Also see comment on GetItemConfiguration about converting to own class. | |||||||
virtual long | GetItemConfigurationDataVersion (Guid itemKind) | ||||||
Return the DataVersion of the currently loaded configuration for a given Kind. If it is not loaded, then 0 is returned. | |||||||
virtual long | GetItemConfigurationDataVersion (ServerId serverId, Guid itemKind) | ||||||
Return the DataVersion of the currently loaded configuration for a given Kind. If it is not loaded, then 0 is returned. | |||||||
virtual DateTime | GetItemConfigurationLastModified (ServerId serverId, Guid kind) | ||||||
Get the DateTime for the latest update to a given kind. | |||||||
virtual List< Item > | GetItemConfigurations (Guid pluginDefinitionId, Item parentItem, Guid itemKind) | ||||||
Retrieve a list of items with a specific Kind and located under a specific parentItem. If the parentItem is null, then all Items of this Kind is returned. It should be noted that the returned Items are constructed from the base Item class. If your implementation needs its own Item classes, you need to convert the result to your type of class. For example: | |||||||
virtual List< Item > | GetItemConfigurations (ServerId serverId, Guid pluginDefinitionId, Item parentItem, Guid itemKind) | ||||||
Retrieve a list of items with a specific Kind and located under a specific parentItem. This overloaded method loads the configuration from a specific server as identified by the ServerId. | |||||||
List< Item > | GetItems () | ||||||
All Items configured on this server. Only top nodes are returned initially. All the top level Items can be retrieved through the GetItem and GetItemAsync methods. | |||||||
virtual List< Item > | GetItems (ItemHierarchy itemHierarchy) | ||||||
All Items configured on this server. Only top nodes are returned initially. This method may take some time to perform, and should not be called from a UI thread. | |||||||
virtual void | GetItemsAsync (AsyncItemsHandler asyncItemsHandler, Control control, object callerReference) | ||||||
All Items configured on this server. Only top nodes are returned initially, with items matching ItemHierarchy.UserDefined. If the control parameter is supplied, the asyncItemsHandler is Invoked on that control, ensuring that the called method is executing on the correct Thread.
| |||||||
List< Item > | GetItemsByKind (Guid kind) | ||||||
Return the top level list of items having the specified Kind. The returned list will often contain Server Items or folder type Items, as they in turn contain Items of the specified Kind. | |||||||
virtual List< Item > | GetItemsByKind (Guid kind, ItemHierarchy itemHierarchy) | ||||||
Return the top level list of items having the specified Kind. the ItemHierarchy specify which hierarchy to return, user defined groups or physical hierarchy. | |||||||
List< Item > | GetItemsByKindSorted (Guid kind) | ||||||
As GetItemsByKind(kind) sorted by item.Name;. | |||||||
List< Item > | GetItemsByKindSorted (Guid kind, ItemHierarchy itemHierarchy) | ||||||
As GetItemsByKind(kind,itemHierarchy) sorted by item.Name;. | |||||||
virtual List< Item > | GetItemsBySearch (String searchText, int maxCount, int maxSeconds, out SearchResult searchResult) | ||||||
Initiates a search for Items that can match a text. Generally the name and properties will be searched. These methods will perform a slow search through all Items to identify the ones matching the search text. If the number of matches exceeds the specified limit, or if the elapsed time is exceeded the return handler will be called with a result indicating the reason for stopping. If a successful number of Items are found within a reasonable time, the handler is called with a result of OK. This method may take some time to perform, and should not be called from a UI thread. | |||||||
virtual void | GetItemsBySearchAsync (String searchText, int maxCount, int maxSeconds, AsyncItemsSearchHandler asyncItemsHandler, Control control, object callerReference) | ||||||
Initiates a search for Items that can match a text. Generally the name will be searched. These methods will perform a slow search through all Items to identify the ones matching the search text. If the number of matches exceeds the specified limit, or if the elapsed time is exceeded the return handler will be called with a result indicating the reason for stopping. If a successful number of Items are found within a reasonable time, the handler is called with a result of OK. | |||||||
List< Item > | GetItemsSorted () | ||||||
As GetItems() sorted by item.Name;. | |||||||
List< Item > | GetItemsSorted (ItemHierarchy itemHierarchy) | ||||||
As GetItems(itemHierarchy) sorted by item.Name;. | |||||||
virtual XmlNode | GetOptionsConfiguration (Guid optionsDialogId, bool userPrivate) | ||||||
This method returns the configuration created in the Smart Client’s options dialog. It is intended to be used together with Client.OptionsDialogPlugin class to get previous defined configuration. The configuration can be saved for use by all users or be saved for each user. One plug-in can store as many sets of configuration as it needs by defining and using multiple guid’s. The actual configuration is stored on the server the smart client or the SDK, is currently logged into. Note that option dialogs are now supported with MIP v3 in the administrators, and that these dialogs can choose to use the GetOptionsConfiguration and SaveOptionsConfiguration methods. When doing so, please ALSO add the guids used in this call on the PluginDefinition.OptionDialogGuids to define what Guids to pre-load in the administrator. | |||||||
virtual List< Configuration.ServiceURIInfo > | GetRegisteredServiceUriInfo (Guid serviceType, ServerId serverId) | ||||||
Get all Registered services on from server identified by ServerId, that has a specific serviceType. Built in service types are: MAPServiceType LogServiceType. | |||||||
virtual List< Configuration.ServiceURIInfo > | GetRegisteredServiceUriInfo (ServerId serverId) | ||||||
Get all Registered services on from server identified by ServerId. | |||||||
virtual Client.ViewGroup | GetViewGroup (Guid groupId) | ||||||
Returns the content of one ViewGroup. | |||||||
virtual ReadOnlyCollection< ViewGroupInfo > | GetViewGroups () | ||||||
Returns the list of available viewgroups designed for Smart Client usage. | |||||||
virtual void | RefreshConfiguration (Guid kind) | ||||||
This call will clear current cache and next Get operation will request a new copy from the server. | |||||||
virtual void | RefreshConfiguration (ServerId serverId, Guid kind) | ||||||
This call will clear current cache of items from a specific server, and next Get operation will request a new copy from the server. | |||||||
virtual void | RegisterServiceUri (Guid serviceType, ServerId serverId, Guid instance, Uri uri, String name, string description, string customData) | ||||||
Register own service on a login server. Can be used when your have multiple servers involved in performing a CPU heavy task, and still want to access all servers from the different plug-ins. | |||||||
virtual void | RegisterServiceUri (Guid serviceType, ServerId serverId, Guid instance, Uri uri, String name, string description, string customData, List< RegistrationServiceEndpoint > endpoints) | ||||||
Register own service on a login server. Can be used when your have multiple servers involved in performing a CPU heavy task, and still want to access all servers from the different plug-ins. | |||||||
virtual void | SaveAssociatedProperties (VideoOS.Platform.Admin.AssociatedProperties associatedProperties) | ||||||
Will save the associated properties on the VMS server, for use by any relevant application. | |||||||
virtual void | SaveItemConfiguration (Guid pluginDefinitionId, Item item) | ||||||
Call this to notify the system that there is configuration to be saved for the Item. | |||||||
virtual void | SaveItemConfiguration (ServerId serverId, Guid pluginDefinitionId, Item item) | ||||||
Save one Item's configuration. Note that the serialization method serializes the Item base class, make sure that any fields that need to be saved are stored in the Properties Dictionary. | |||||||
virtual void | SaveOptionsConfiguration (Guid optionsDialogId, bool userPrivate, XmlNode xmlNode) | ||||||
This method works in conjunction with the GetOptionsConfiguration method, to save a configuration. The Client.OptionsDialogPlugin class has built-in methods that use these two methods. Even though these methods are designed to support saving configuration defined on the Smart Client’s option dialog, a plugin could utilize these methods for saving any relevant configuration or settings that the plug-in may need to share with other users or have common for the same user – no matter where that user connects from. | |||||||
virtual void | UnRegisterServiceUri (ServerId serverId, Guid instance) | ||||||
UnRegister own service from a server. | |||||||
Static Public Attributes | |
static readonly Guid | LogServiceId = new Guid("3D6F1153-92AD-43F1-B467-9482FFD291B2") |
The id for the Log service. | |
static readonly Guid | LogServiceType = new Guid("3D6F1153-92AD-43F1-B467-9482FFD291B2") |
The type for the Log service. | |
static readonly Guid | MAPServiceId = new Guid("08AB8F23-9AEF-4298-9CAA-F39259FE7CDA") |
The type for the Event and MAP service. | |
static readonly Guid | MAPServiceType = new Guid("08AB8F23-9AEF-4298-9CAA-F39259FE7CDA") |
The type for the Event and MAP service. | |
static bool | TraceItemConfigurationCache |
Indicate if the ItemConfigurationCache should enable for tracing. | |
Properties | |
ConfigurationApiManager | ConfigurationApiManager = new ConfigurationApiManager() [get] |
The ConfigurationApiManager provides options to control what API to use (Rest or Configuration API -SOAP), as well as a debug flag to dump out all Rest API calls. | |
static Configuration | Instance [get, set] |
This class only exists once and can be accessed through the Instance static field. Only use the 'get' access method. | |
bool | IsMIPItemSupported [get, set] |
Will return true for Corporate releases 12.3 (2018R3) or later. | |
FQID | ServerFQID [get] |
Identifies the server that the application is currently logged into. | |
String | ServerName [get] |
The Name of the Server, if one exists. Otherwise the DNS name / IP address. | |
Configuration provides access to all configuration objects within the Milestone Platform.
This covers well known Milestone objects like Cameras, Servers, Presets events etc, but also 3rd party plug-in objects can be accessed though this interface.
Access to this class is done via Configuration.Instance.
|
inlinevirtual |
Calling this method will suspend updating the UI for every change done to the configuration. When issuing many SaveItemConfiguration or DeleteItemConfiguration, this method can be called to speed up the changes. Always call the EndMassUpdate() when complete to get the UI updated. This method is only relevant when executing in one of the administrator environments.
|
inlinevirtual |
|
inlinevirtual |
Is called when updated of many items is complete. The UI will be refreshed to reflect the changes been done while the BeginMassUpdate has been called.
|
inlinevirtual |
Get the properties that is associated with item, for the pluginId.
This is intended to be configured on the user control provided via the TabPlugin, and used anywhere.
item | |
pluginId |
|
abstract |
|
abstract |
Get one specific Item, based on its ObjectId (the Guid), the Kind of Item, and the Server it is located on. The Kind and ServerId is supplied to speedup the lookup method.
serverId | The ID of the server where this Item is located |
objectId | The unique ID of this Item |
kind | The Kind of Item |
|
inlinevirtual |
Lookup one specific item by its fully-Qualified ID.
fqid | The ID of the item to lookup |
asyncItemHandler | The handler to be called with the result |
control | If supplied, the UI Control to execute the asynchronous handler on |
callerReference | Any object the caller may need to interpret the result. |
|
inlinevirtual |
Retrieve one item of a specific Kind and with a specific objectId. Also see comment on GetItemConfiguration about converting to own class.
pluginDefinitionId | The plug-in owner of the configuration |
itemKind | The ID of the ItemNode |
objectId | The specific id of the Item to get |
|
inlinevirtual |
Retrieve one item of a specific Kind and with a specific objectId. Also see comment on GetItemConfiguration about converting to own class.
pluginDefinitionId | The plug-in owner of the configuration |
itemKind | The ID of the ItemNode |
objectId | The specific id of the Item to get |
serverId | Identify the server the configuration is located |
|
inlinevirtual |
Return the DataVersion of the currently loaded configuration for a given Kind.
If it is not loaded, then 0 is returned.
itemKind |
|
inlinevirtual |
Return the DataVersion of the currently loaded configuration for a given Kind.
If it is not loaded, then 0 is returned.
serverId | |
itemKind |
|
inlinevirtual |
Get the DateTime for the latest update to a given kind.
serverId | |
kind |
|
inlinevirtual |
Retrieve a list of items with a specific Kind and located under a specific parentItem. If the parentItem is null, then all Items of this Kind is returned.
It should be noted that the returned Items are constructed from the base Item class. If your implementation needs its own Item classes, you need to convert the result to your type of class. For example:
As explained elsewhere, you may need your own class to implement e.g. GetChildren() and GetParent()
pluginDefinitionId | The plug-in owner of the configuration |
parentItem | Identify the Item that is parent to the one we are looking for. If parentItem is null, then there are no parent. |
itemKind | The Kind of Items to get |
|
inlinevirtual |
Retrieve a list of items with a specific Kind and located under a specific parentItem. This overloaded method loads the configuration from a specific server as identified by the ServerId.
pluginDefinitionId | The plug-in owner of the configuration |
parentItem | Identify the Item that is parent to the one we are looking for. If parentItem is null, then there are no parent. |
itemKind | The Kind of Items to get |
serverId | Identify the server where the configuration is located |
|
abstract |
All Items configured on this server. Only top nodes are returned initially. All the top level Items can be retrieved through the GetItem and GetItemAsync methods.
|
inlinevirtual |
All Items configured on this server. Only top nodes are returned initially. This method may take some time to perform, and should not be called from a UI thread.
|
inlinevirtual |
All Items configured on this server. Only top nodes are returned initially, with items matching ItemHierarchy.UserDefined. If the control parameter is supplied, the asyncItemsHandler is Invoked on that control, ensuring that the called method is executing on the correct Thread.
asyncItemsHandler | The handler to be called with the result |
control | If supplied, the UI Control to execute the asynchronous handler on |
callerReference | Any object the caller may need to interpret the result. |
|
abstract |
|
inlinevirtual |
Return the top level list of items having the specified Kind. the ItemHierarchy specify which hierarchy to return, user defined groups or physical hierarchy.
kind | Identifies the Kind we are looking for |
itemHierarchy | Used to specify that the returned Item should ONLY contain children that are from the defined ItemHierarchy. |
|
inline |
As GetItemsByKind(kind) sorted by item.Name;.
|
inline |
As GetItemsByKind(kind,itemHierarchy) sorted by item.Name;.
|
inlinevirtual |
Initiates a search for Items that can match a text. Generally the name and properties will be searched. These methods will perform a slow search through all Items to identify the ones matching the search text. If the number of matches exceeds the specified limit, or if the elapsed time is exceeded the return handler will be called with a result indicating the reason for stopping. If a successful number of Items are found within a reasonable time, the handler is called with a result of OK.
This method may take some time to perform, and should not be called from a UI thread.
searchText | A phrase to search for |
maxCount | Only return of the total count is less then this number |
maxSeconds | Max seconds to process this request |
searchResult | Explains the reason for the result, e.g. timeout or a list of relevant Items |
|
inlinevirtual |
Initiates a search for Items that can match a text. Generally the name will be searched. These methods will perform a slow search through all Items to identify the ones matching the search text. If the number of matches exceeds the specified limit, or if the elapsed time is exceeded the return handler will be called with a result indicating the reason for stopping. If a successful number of Items are found within a reasonable time, the handler is called with a result of OK.
searchText | A phrase to search for |
maxCount | Only return of the total count is less then this number |
maxSeconds | Max seconds to process this request |
asyncItemsHandler | The method to get the result |
control | The Control the method is executed on |
callerReference | Some call relevant class |
|
inline |
As GetItems() sorted by item.Name;.
|
inline |
As GetItems(itemHierarchy) sorted by item.Name;.
|
inlinevirtual |
This method returns the configuration created in the Smart Client’s options dialog.
It is intended to be used together with Client.OptionsDialogPlugin class to get previous defined configuration.
The configuration can be saved for use by all users or be saved for each user. One plug-in can store as many sets of configuration as it needs by defining and using multiple guid’s.
The actual configuration is stored on the server the smart client or the SDK, is currently logged into.
Note that option dialogs are now supported with MIP v3 in the administrators, and that these dialogs can choose to use the GetOptionsConfiguration and SaveOptionsConfiguration methods. When doing so, please ALSO add the guids used in this call on the PluginDefinition.OptionDialogGuids to define what Guids to pre-load in the administrator.
optionsDialogId | |
userPrivate |
|
inlinevirtual |
Get all Registered services on from server identified by ServerId, that has a specific serviceType. Built in service types are: MAPServiceType LogServiceType.
serviceType | |
serverId | Identifies the server to be contacted |
CommunicationMIPException | When unable to contact the registration service |
|
inlinevirtual |
Get all Registered services on from server identified by ServerId.
serverId | Identifies the server to be contacted |
CommunicationMIPException | When unable to contact the registration service |
|
inlinevirtual |
Returns the content of one ViewGroup.
groupId |
|
inlinevirtual |
Returns the list of available viewgroups designed for Smart Client usage.
|
inlinevirtual |
This call will clear current cache and next Get operation will request a new copy from the server.
Only works for plug-in defined configurations. Configuration for build-in item types is controlled by the environment and cannot be refreshed.
kind | Kind of items to flush |
|
inlinevirtual |
This call will clear current cache of items from a specific server, and next Get operation will request a new copy from the server.
Only works for plug-in defined configurations. Configuration for build-in item types is controlled by the environment and cannot be refreshed.
kind | Kind of items to flush |
serverId | Server ID of items to flush |
|
inlinevirtual |
Register own service on a login server. Can be used when your have multiple servers involved in performing a CPU heavy task, and still want to access all servers from the different plug-ins.
serviceType | |
serverId | |
instance | |
uri | |
name | |
description | |
customData |
CommunicationMIPException | When unable to contact the registration service |
|
inlinevirtual |
Register own service on a login server. Can be used when your have multiple servers involved in performing a CPU heavy task, and still want to access all servers from the different plug-ins.
serviceType | |
serverId | |
instance | |
uri | |
name | |
description | |
customData | |
endpoints |
CommunicationMIPException | When unable to contact the registration service |
|
inlinevirtual |
Will save the associated properties on the VMS server, for use by any relevant application.
associatedProperties |
|
inlinevirtual |
Call this to notify the system that there is configuration to be saved for the Item.
Note that the serialization method serializes the Item base class, make sure that any fields that need to be saved are stored in the Properties Dictionary.
Also, be aware that the term "FQID" is reserved and must not be used as the name of a property nor as the beginning of a name of a property.
Cannot be used in Smart Client offline mode (Smart Client Player).
pluginDefinitionId | The plug-in owner of the configuration |
item | The Item to save |
|
inlinevirtual |
Save one Item's configuration. Note that the serialization method serializes the Item base class, make sure that any fields that need to be saved are stored in the Properties Dictionary.
Also, be aware that the term "FQID" is reserved and must not be used as the name of a property nor as the beginning of a name of a property.
Cannot be used in Smart Client offline mode (Smart Client Player).
serverId | Identify the server the configuration is located |
pluginDefinitionId | The plug-in owner of the configuration |
item | The Item to save |
|
inlinevirtual |
This method works in conjunction with the GetOptionsConfiguration method, to save a configuration.
The Client.OptionsDialogPlugin class has built-in methods that use these two methods. Even though these methods are designed to support saving configuration defined on the Smart Client’s option dialog, a plugin could utilize these methods for saving any relevant configuration or settings that the plug-in may need to share with other users or have common for the same user – no matter where that user connects from.
Supported in Management Client, Smart Client and standalone environment, but not Event Server.
optionsDialogId | |
userPrivate | |
xmlNode | A single XML Node (potentially with children) encapsulating the data to be saved. Must not be a full XmlDocument. |
|
inlinevirtual |
UnRegister own service from a server.
serverId | |
instance |
CommunicationMIPException | When unable to contact the registration service |
|
static |
The id for the Log service.
|
static |
The type for the Log service.
|
static |
The type for the Event and MAP service.
|
static |
The type for the Event and MAP service.
|
static |
Indicate if the ItemConfigurationCache should enable for tracing.
|
get |
The ConfigurationApiManager provides options to control what API to use (Rest or Configuration API -SOAP), as well as a debug flag to dump out all Rest API calls.
|
staticgetset |
This class only exists once and can be accessed through the Instance static field. Only use the 'get' access method.
|
getset |
Will return true for Corporate releases 12.3 (2018R3) or later.
|
getabstract |
Identifies the server that the application is currently logged into.
|
getabstract |
The Name of the Server, if one exists. Otherwise the DNS name / IP address.