class BusinessObjectDataRestController extends HerdBaseController {

    @RequestMapping(value = "/businessObjectData", method = RequestMethod.POST, consumes = {"application/xml", "application/json"})
    @Secured(SecurityFunctions.FN_BUSINESS_OBJECT_DATA_POST)
    public BusinessObjectData createBusinessObjectData(@RequestBody BusinessObjectDataCreateRequest businessObjectDataCreateRequest)
    {
        BusinessObjectData businessObjectData = businessObjectDataService.createBusinessObjectData(businessObjectDataCreateRequest);

        // TODO This should be enhanced such that the notification events are captured by probably as an advice, and these calls are not specified everywhere
        // in the code.

        // The calls to notifications is being done in REST layer so that the event transaction (e.g. in this case: create business object data) is committed
        // and the event data is available for when notification is processed.

        // With proposed designed, when we go to event publish mode(e.g. create a database record for the event that will be picked up by notification
        // processing engine), We would want the event transaction to also rollback if event publishing failed. These calls will be moved to service layer.

        // Trigger notifications.
        businessObjectDataDaoHelper.triggerNotificationsForCreateBusinessObjectData(businessObjectData);

        return businessObjectData;
    }

}