BusinessObjectDataNotificationRegistrationRestController extends HerdBaseController { @RequestMapping(value = BUSINESS_OBJECT_DATA_NOTIFICATIONS_URI_PREFIX, method = RequestMethod.GET) @Secured(SecurityFunctions.FN_BUSINESS_OBJECT_DATA_NOTIFICATION_REGISTRATIONS_BY_NOTIFICATION_FILTER_GET) public BusinessObjectDataNotificationRegistrationKeys getBusinessObjectDataNotificationRegistrationsByNotificationFilter( @RequestParam(value = "businessObjectDefinitionNamespace", required = true) String businessObjectDefinitionNamespace, @RequestParam(value = "businessObjectDefinitionName", required = true) String businessObjectDefinitionName, @RequestParam(value = "businessObjectFormatUsage", required = false) String businessObjectFormatUsage, @RequestParam(value = "businessObjectFormatFileType", required = false) String businessObjectFormatFileType, ServletRequest servletRequest) { validateNoDuplicateQueryStringParams(servletRequest.getParameterMap(), "businessObjectDefinitionNamespace", "businessObjectDefinitionName", "businessObjectFormatUsage", "businessObjectFormatFileType"); return businessObjectDataNotificationRegistrationService.getBusinessObjectDataNotificationRegistrationsByNotificationFilter( new BusinessObjectDataNotificationFilter(businessObjectDefinitionNamespace, businessObjectDefinitionName, businessObjectFormatUsage, businessObjectFormatFileType, null, null, null, null)); }  @RequestMapping(value = BUSINESS_OBJECT_DATA_NOTIFICATIONS_URI_PREFIX, method = RequestMethod.POST, consumes = {"application/xml", "application/json"}) @Secured(SecurityFunctions.FN_BUSINESS_OBJECT_DATA_NOTIFICATION_REGISTRATIONS_POST) BusinessObjectDataNotificationRegistration createBusinessObjectDataNotificationRegistration(
        @RequestBody BusinessObjectDataNotificationRegistrationCreateRequest request); @RequestMapping(value = BUSINESS_OBJECT_DATA_NOTIFICATIONS_URI_PREFIX + "/namespaces/{namespace}/notificationNames/{notificationName}", method = RequestMethod.GET) @Secured(SecurityFunctions.FN_BUSINESS_OBJECT_DATA_NOTIFICATION_REGISTRATIONS_GET) BusinessObjectDataNotificationRegistration getBusinessObjectDataNotificationRegistration(@PathVariable("namespace") String namespace,
        @PathVariable("notificationName") String notificationName); @RequestMapping(value = BUSINESS_OBJECT_DATA_NOTIFICATIONS_URI_PREFIX + "/namespaces/{namespace}/notificationNames/{notificationName}", method = RequestMethod.PUT, consumes = {"application/xml", "application/json"}) @Secured(SecurityFunctions.FN_BUSINESS_OBJECT_DATA_NOTIFICATION_REGISTRATIONS_PUT) BusinessObjectDataNotificationRegistration updateBusinessObjectDataNotificationRegistration(@PathVariable("namespace") String namespace,
        @PathVariable("notificationName") String notificationName, @RequestBody BusinessObjectDataNotificationRegistrationUpdateRequest request); @RequestMapping(value = BUSINESS_OBJECT_DATA_NOTIFICATIONS_URI_PREFIX + "/namespaces/{namespace}/notificationNames/{notificationName}", method = RequestMethod.DELETE) @Secured(SecurityFunctions.FN_BUSINESS_OBJECT_DATA_NOTIFICATION_REGISTRATIONS_DELETE) BusinessObjectDataNotificationRegistration deleteBusinessObjectDataNotification(@PathVariable("namespace") String namespace,
        @PathVariable("notificationName") String notificationName); @RequestMapping(value = BUSINESS_OBJECT_DATA_NOTIFICATIONS_URI_PREFIX + "/namespaces/{namespace}", method = RequestMethod.GET) @Secured(SecurityFunctions.FN_BUSINESS_OBJECT_DATA_NOTIFICATION_REGISTRATIONS_BY_NAMESPACE_GET) BusinessObjectDataNotificationRegistrationKeys getBusinessObjectDataNotificationRegistrationsByNamespace(@PathVariable("namespace") String namespace); @RequestMapping(value = BUSINESS_OBJECT_DATA_NOTIFICATIONS_URI_PREFIX, method = RequestMethod.GET) @Secured(SecurityFunctions.FN_BUSINESS_OBJECT_DATA_NOTIFICATION_REGISTRATIONS_BY_NOTIFICATION_FILTER_GET) BusinessObjectDataNotificationRegistrationKeys getBusinessObjectDataNotificationRegistrationsByNotificationFilter(
        @RequestParam(value = "businessObjectDefinitionNamespace", required = true) String businessObjectDefinitionNamespace,
        @RequestParam(value = "businessObjectDefinitionName", required = true) String businessObjectDefinitionName,
        @RequestParam(value = "businessObjectFormatUsage", required = false) String businessObjectFormatUsage,
        @RequestParam(value = "businessObjectFormatFileType", required = false) String businessObjectFormatFileType, ServletRequest servletRequest); static final String BUSINESS_OBJECT_DATA_NOTIFICATIONS_URI_PREFIX; }
@Test public void testGetBusinessObjectDataNotificationRegistrationsByNotificationFilter() { BusinessObjectDataNotificationFilter businessObjectDataNotificationFilter = new BusinessObjectDataNotificationFilter(BDEF_NAMESPACE, BDEF_NAME, FORMAT_USAGE_CODE, FORMAT_FILE_TYPE_CODE, NO_FORMAT_VERSION, NO_STORAGE_NAME, NO_BDATA_STATUS, NO_BDATA_STATUS); BusinessObjectDataNotificationRegistrationKeys businessObjectDataNotificationRegistrationKeys = new BusinessObjectDataNotificationRegistrationKeys(Arrays.asList(new NotificationRegistrationKey(NAMESPACE, NOTIFICATION_NAME))); MockHttpServletRequest servletRequest = new MockHttpServletRequest(); servletRequest.setParameter("businessObjectDefinitionNamespace", BDEF_NAMESPACE); servletRequest.setParameter("businessObjectDefinitionName", BDEF_NAME); servletRequest.setParameter("businessObjectFormatUsage", FORMAT_USAGE_CODE); servletRequest.setParameter("businessObjectFormatFileType", FORMAT_FILE_TYPE_CODE); when(businessObjectDataNotificationRegistrationService .getBusinessObjectDataNotificationRegistrationsByNotificationFilter(businessObjectDataNotificationFilter)) .thenReturn(businessObjectDataNotificationRegistrationKeys); BusinessObjectDataNotificationRegistrationKeys result = businessObjectDataNotificationRegistrationRestController .getBusinessObjectDataNotificationRegistrationsByNotificationFilter(BDEF_NAMESPACE, BDEF_NAME, FORMAT_USAGE_CODE, FORMAT_FILE_TYPE_CODE, servletRequest); verify(businessObjectDataNotificationRegistrationService) .getBusinessObjectDataNotificationRegistrationsByNotificationFilter(businessObjectDataNotificationFilter); verifyNoMoreInteractionsHelper(); assertEquals(businessObjectDataNotificationRegistrationKeys, result); }