Business requirements could be complex. Here is an example of cibet-config.xml for controlling a domain object. In this case it is a customer. First the business rules are listed and then it is shown how these rules will be mapped by a Cibet configuration of eight setpoints. The rules are:
<?xml version="1.0" encoding="UTF-8"?>
<cibet xmlns="http://www.logitags.com" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.logitags.com http://www.logitags.com/cibet/cibet-config_1.2.xsd">
<actuator name="SPRINGSECURITY_PREMIUMOFFICER">
<class>com.logitags.cibet.actuator.springsecurity.SpringSecurityActuator</class>
<properties>
<preAuthorize>hasRole(ROLE_PREMIUMOFFICER)</preAuthorize>
</properties>
</actuator>
<actuator name="SPRINGSECURITY_RELEASER">
<class>com.logitags.cibet.actuator.springsecurity.SpringSecurityActuator</class>
<properties>
<preAuthorize>hasRole(ROLE_RELEASER)</preAuthorize>
</properties>
</actuator>
<actuator name="SPRINGSECURITY_NORMALUSER">
<class>com.logitags.cibet.actuator.springsecurity.SpringSecurityActuator</class>
<properties>
<preAuthorize>hasRole(ROLE_NORMALUSER)</preAuthorize>
</properties>
</actuator>
<setpoint id="D">
<controls>
<tenant>MM Bank</tenant>
<event>INSERT, DELETE, REJECT_INSERT, REJECT_DELETE</event>
<target>com.bank.business.Customer</target>
<condition>$Customer.getCategory() != 'PREMIUM'</condition>
</controls>
<actuator name="FOUR_EYES"/>
<actuator name="INFOLOG"/>
</setpoint>
<setpoint id="D1" extends="D">
<controls>
<condition>$Customer.getCategory() == 'PREMIUM'</condition>
</controls>
<actuator name="SPRINGSECURITY_PREMIUMOFFICER" />
<actuator name="FOUR_EYES"/>
<actuator name="INFOLOG"/>
</setpoint>
<setpoint id="D2" extends="D">
<controls>
<event>RELEASE_INSERT</event>
<condition></condition>
</controls>
<actuator name="SPRINGSECURITY_RELEASER"/>
<actuator name="ARCHIVE"/>
</setpoint>
<setpoint id="D3" extends="D2">
<controls>
<event>RELEASE_DELETE</event>
</controls>
<actuator name="SPRINGSECURITY_PREMIUMOFFICER"/>
<actuator name="ARCHIVE"/>
</setpoint>
<setpoint id="D4" extends="D">
<controls>
<event>UPDATE</event>
<stateChange exclude="true">account, category</stateChange>
<condition></condition>
</controls>
<actuator name="SPRINGSECURITY_NORMALUSER"/>
<actuator name="ARCHIVE"/>
</setpoint>
<setpoint id="D5" extends="D2">
<controls>
<event>UPDATE, REJECT_UPDATE</event>
<stateChange>account, category</stateChange>
</controls>
<actuator name="SPRINGSECURITY_PREMIUMOFFICER"/>
<actuator name="FOUR_EYES"/>
</setpoint>
<setpoint id="D6" extends="D5">
<controls>
<event>RELEASE_UPDATE</event>
</controls>
<actuator name="SPRINGSECURITY_RELEASER"/>
<actuator name="ARCHIVE"/>
</setpoint>
<setpoint id="D7" extends="D2">
<controls>
<event>RESTORE</event>
</controls>
<actuator name="SPRINGSECURITY_PREMIUMOFFICER"/>
<actuator name="FOUR_EYES"/>
<actuator name="ARCHIVE"/>
</setpoint>
</cibet>