//both cannot be true or false
boolean newValue = ConnectorsUtil.parseBoolean(event.getNewValue().toString());
boolean oldValue = ConnectorsUtil.parseBoolean(event.getOldValue().toString());
if (!(newValue && oldValue)) {
if (newValue) {
deployer.enableResource(bindableResource);
} else {
deployer.disableResource(bindableResource);
}
}
}