Previous Topic

Next Topic

Book Contents

Book Index

Groups

The Functional Items Management Groups are used to group sets of functional items.

Developers have the flexibility to create their own applications for grouping. They could:

As a result their applications could do the following:

Examples

When an item is added/removed from the group, the implementation of the Group interface will create appropriate FunctionalItemEventConstants.TOPIC_PROPERTY_CHANGED event for the property ITEMS and will post this event using the EventAdmin service. The same event is fired when a group item is unregistered. More information about events can be found in Functional Item Events.

If an item is not explicitly removed from the group, it will be automatically re-added on its registration (unless its bundle provider is not uninstalled from the system). Additionally, ADD_ITEM/REMOVE_ITEM operation executed events are fired if the execution of user-invoked operation is successful.

The GroupAdmin interface provides methods for Group management such as:

The GroupAdmin is registered as a FunctionalItemFactory OSGi singleton service, i.e. there should be only one instance of the GroupAdmin available in the system. The creation properties required for a Group creation are:

For more information about the Group and GroupAdmin interfaces refer to the Java API.

Bulk operations and properties change

As addition to adding, removing and filtering of different items from a group, you can also execute bulk operations and bulk properties change over only a specified type of items from that group. As a result the represented items act in parallel.

The bulk functionality allows you to 'adapt' a group as one functional item object class so properties change or operations execution will reflect to all items registered with this object class. E.g. you 'adapt' a group to a dimmer.This brings back the item as not a real but a proxy item. Thus you can control all the different devices with dimmers within a group as a group. More information you can find in adapt Java API.

The bulk support is provided via extending the Group interface since version 1.5.0 of com.prosyst.mbs.services.fim.groups package. The methods providing the bulk functionality are:

To provide a multicast support over a set of FunctionalItem instances you can implement the MulticastHandler interface and register it as an OSGi service. The MulticastHandler services are notified for the items set changes only for groups created with Group.ATTRIBUTE_MULTICAST attribute. For more information refer to the ATTRIBUTE_MULTICAST FIM Java API.

Examples:

Visit Management via Web Console to see how to take advantage of the bulk operations using the Functional Item Management Simple Groups Demo.