Previous Topic

Next Topic

Book Contents

Book Index

Filter Rule State Command

The Filter Rule State Command is a command that enables/disables a set of rules, specified by an LDAP filter.

Required Bundles

To be able to create and manage automation components, you need the following bundles from the bundles folder active in the OSGi framework:

Overview

The rule state command allows you to dynamically enable and disable several automation rules at once.

For each command instance you have to set a LDAP filter which matches the rules which are controlled by the command and a target state for those rules (enabled or disabled). When the command is executed it changes the state of those rules that are different.

Managing Filter Rule State Commands

Via Java API

After creating an instance of the command as described in Managing Commands you can configure it by using the following methods:

After configuring your command, call the save method. The Command Provider will save it in Config Tree.

Via ConfigTree

All commands are stored in Config Tree, which allows you to import/export or add/edit commands by modifying XML files. Refer to Configuring HAM via Config Tree.

The following snippet contains a Filter Rule State command that automatically enables all rules that contain Event Commands.

<config name="FilterRuleStateCommand">

<config name="FilterRuleStateCommand2">

  <property key="rules_filter" value="(command_type=EventCommand)" type="string"/>

  <property key="active_state" value="true" type="boolean"/>

</config>

</config>