// TO DO - Make it more granular and have better conversion into
// capacity type
if (host.getType() == Type.Routing && host.getClusterId() != null) {
AllocationState capacityState = _configMgr
.findClusterAllocationState(ApiDBUtils.findClusterById(host
.getClusterId()));
if (capacityState == AllocationState.Enabled
&& nextState != ResourceState.Enabled) {
capacityState = AllocationState.Disabled;
}
_capacityDao.updateCapacityState(null, null, null, host.getId(),
capacityState.toString());
}
return _hostDao.updateResourceState(currentState, event, nextState,
host);
}