BusinessObjectFormatRestController extends HerdBaseController { @RequestMapping(value = "/businessObjectFormatSchemaBackwardsCompatibility/namespaces/{namespace}/businessObjectDefinitionNames/" + "{businessObjectDefinitionName}/businessObjectFormatUsages/{businessObjectFormatUsage}/businessObjectFormatFileTypes/{businessObjectFormatFileType}", method = RequestMethod.PUT, consumes = {"application/xml", "application/json"}) @Secured(SecurityFunctions.FN_BUSINESS_OBJECT_FORMAT_SCHEMA_BACKWARDS_COMPATIBILITY_PUT) public BusinessObjectFormat updateBusinessObjectFormatSchemaBackwardsCompatibleChanges(@PathVariable("namespace") String namespace, @PathVariable("businessObjectDefinitionName") String businessObjectDefinitionName, @PathVariable("businessObjectFormatUsage") String businessObjectFormatUsage, @PathVariable("businessObjectFormatFileType") String businessObjectFormatFileType, @RequestBody BusinessObjectFormatSchemaBackwardsCompatibilityUpdateRequest request) { BusinessObjectFormatKey businessObjectFormatKey = new BusinessObjectFormatKey(namespace, businessObjectDefinitionName, businessObjectFormatUsage, businessObjectFormatFileType, null); return businessObjectFormatService.updateBusinessObjectFormatSchemaBackwardsCompatibilityChanges(businessObjectFormatKey, request); }  @RequestMapping(value = "/businessObjectFormats", method = RequestMethod.POST, consumes = {"application/xml", "application/json"}) @Secured(SecurityFunctions.FN_BUSINESS_OBJECT_FORMATS_POST) BusinessObjectFormat createBusinessObjectFormat(@RequestBody BusinessObjectFormatCreateRequest request); @RequestMapping(value = "/businessObjectFormats/namespaces/{namespace}/businessObjectDefinitionNames/{businessObjectDefinitionName}" + "/businessObjectFormatUsages/{businessObjectFormatUsage}/businessObjectFormatFileTypes/{businessObjectFormatFileType}" + "/businessObjectFormatVersions/{businessObjectFormatVersion}", method = RequestMethod.PUT, consumes = {"application/xml", "application/json"}) @Secured(SecurityFunctions.FN_BUSINESS_OBJECT_FORMATS_PUT) BusinessObjectFormat updateBusinessObjectFormat(@PathVariable("namespace") String namespace,
        @PathVariable("businessObjectDefinitionName") String businessObjectDefinitionName,
        @PathVariable("businessObjectFormatUsage") String businessObjectFormatUsage,
        @PathVariable("businessObjectFormatFileType") String businessObjectFormatFileType,
        @PathVariable("businessObjectFormatVersion") Integer businessObjectFormatVersion, @RequestBody BusinessObjectFormatUpdateRequest request); @RequestMapping(value = "/businessObjectFormats/namespaces/{namespace}/businessObjectDefinitionNames/{businessObjectDefinitionName}" + "/businessObjectFormatUsages/{businessObjectFormatUsage}/businessObjectFormatFileTypes/{businessObjectFormatFileType}", method = RequestMethod.GET) @Secured(SecurityFunctions.FN_BUSINESS_OBJECT_FORMATS_GET) BusinessObjectFormat getBusinessObjectFormat(@PathVariable("namespace") String namespace,
        @PathVariable("businessObjectDefinitionName") String businessObjectDefinitionName,
        @PathVariable("businessObjectFormatUsage") String businessObjectFormatUsage,
        @PathVariable("businessObjectFormatFileType") String businessObjectFormatFileType,
        @RequestParam(value = "businessObjectFormatVersion", required = false) Integer businessObjectFormatVersion); @RequestMapping(value = "/businessObjectFormats/namespaces/{namespace}/businessObjectDefinitionNames/{businessObjectDefinitionName}" + "/businessObjectFormatUsages/{businessObjectFormatUsage}/businessObjectFormatFileTypes/{businessObjectFormatFileType}" + "/businessObjectFormatVersions/{businessObjectFormatVersion}", method = RequestMethod.DELETE) @Secured(SecurityFunctions.FN_BUSINESS_OBJECT_FORMATS_DELETE) BusinessObjectFormat deleteBusinessObjectFormat(@PathVariable("namespace") String namespace,
        @PathVariable("businessObjectDefinitionName") String businessObjectDefinitionName,
        @PathVariable("businessObjectFormatUsage") String businessObjectFormatUsage,
        @PathVariable("businessObjectFormatFileType") String businessObjectFormatFileType,
        @PathVariable("businessObjectFormatVersion") Integer businessObjectFormatVersion); @RequestMapping(value = "/businessObjectFormats/namespaces/{namespace}/businessObjectDefinitionNames/{businessObjectDefinitionName}", method = RequestMethod.GET) @Secured(SecurityFunctions.FN_BUSINESS_OBJECT_FORMATS_ALL_GET) BusinessObjectFormatKeys getBusinessObjectFormats(@PathVariable("namespace") String namespace,
        @PathVariable("businessObjectDefinitionName") String businessObjectDefinitionName,
        @RequestParam(value = "latestBusinessObjectFormatVersion", required = false, defaultValue = "false") Boolean latestBusinessObjectFormatVersion); @RequestMapping(value = "/businessObjectFormats/namespaces/{namespace}/businessObjectDefinitionNames/{businessObjectDefinitionName}/" + "businessObjectFormatUsages/{businessObjectFormatUsage}", method = RequestMethod.GET) @Secured(SecurityFunctions.FN_BUSINESS_OBJECT_FORMATS_ALL_GET) BusinessObjectFormatKeys getBusinessObjectFormatsWithFilters(@PathVariable("namespace") String namespace,
        @PathVariable("businessObjectDefinitionName") String businessObjectDefinitionName,
        @PathVariable("businessObjectFormatUsage") String businessObjectFormatUsage,
        @RequestParam(value = "latestBusinessObjectFormatVersion", required = false, defaultValue = "false") Boolean latestBusinessObjectFormatVersion); @RequestMapping(value = "/businessObjectFormats/generateDdl", method = RequestMethod.POST, consumes = {"application/xml", "application/json"}) @Secured(SecurityFunctions.FN_BUSINESS_OBJECT_FORMATS_GENERATE_DDL_POST) BusinessObjectFormatDdl generateBusinessObjectFormatDdl(@RequestBody BusinessObjectFormatDdlRequest businessObjectFormatDdlRequest); @RequestMapping(value = "/businessObjectFormats/generateDdlCollection", method = RequestMethod.POST, consumes = {"application/xml", "application/json"}) @Secured(SecurityFunctions.FN_BUSINESS_OBJECT_FORMATS_GENERATE_DDL_COLLECTION_POST) BusinessObjectFormatDdlCollectionResponse generateBusinessObjectFormatDdlCollection(
        @RequestBody BusinessObjectFormatDdlCollectionRequest businessObjectFormatDdlCollectionRequest); @RequestMapping(value = "/businessObjectFormatParents/namespaces/{namespace}/businessObjectDefinitionNames/{businessObjectDefinitionName}" + "/businessObjectFormatUsages/{businessObjectFormatUsage}/businessObjectFormatFileTypes/{businessObjectFormatFileType}", method = RequestMethod.PUT, consumes = {"application/xml", "application/json"}) @Secured(SecurityFunctions.FN_BUSINESS_OBJECT_FORMAT_PARENTS_PUT) BusinessObjectFormat updateBusinessObjectFormatParents(@PathVariable("namespace") String namespace,
        @PathVariable("businessObjectDefinitionName") String businessObjectDefinitionName,
        @PathVariable("businessObjectFormatUsage") String businessObjectFormatUsage,
        @PathVariable("businessObjectFormatFileType") String businessObjectFormatFileType, @RequestBody BusinessObjectFormatParentsUpdateRequest request); @RequestMapping(value = "/businessObjectFormatAttributes/namespaces/{namespace}/businessObjectDefinitionNames/{businessObjectDefinitionName}" + "/businessObjectFormatUsages/{businessObjectFormatUsage}/businessObjectFormatFileTypes/{businessObjectFormatFileType}" + "/businessObjectFormatVersions/{businessObjectFormatVersion}", method = RequestMethod.PUT, consumes = {"application/xml", "application/json"}) @Secured(SecurityFunctions.FN_BUSINESS_OBJECT_FORMAT_ATTRIBUTES_PUT) BusinessObjectFormat updateBusinessObjectFormatAttributes(@PathVariable("namespace") String namespace,
        @PathVariable("businessObjectDefinitionName") String businessObjectDefinitionName,
        @PathVariable("businessObjectFormatUsage") String businessObjectFormatUsage,
        @PathVariable("businessObjectFormatFileType") String businessObjectFormatFileType,
        @PathVariable("businessObjectFormatVersion") Integer businessObjectFormatVersion, @RequestBody BusinessObjectFormatAttributesUpdateRequest request); @RequestMapping(value = "/businessObjectFormatAttributeDefinitions/namespaces/{namespace}/businessObjectDefinitionNames/{businessObjectDefinitionName}" + "/businessObjectFormatUsages/{businessObjectFormatUsage}/businessObjectFormatFileTypes/{businessObjectFormatFileType}" + "/businessObjectFormatVersions/{businessObjectFormatVersion}", method = RequestMethod.PUT, consumes = {"application/xml", "application/json"}) @Secured(SecurityFunctions.FN_BUSINESS_OBJECT_FORMAT_ATTRIBUTE_DEFINITIONS_PUT) BusinessObjectFormat updateBusinessObjectFormatAttributeDefinitions(@PathVariable("namespace") String namespace,
        @PathVariable("businessObjectDefinitionName") String businessObjectDefinitionName,
        @PathVariable("businessObjectFormatUsage") String businessObjectFormatUsage,
        @PathVariable("businessObjectFormatFileType") String businessObjectFormatFileType,
        @PathVariable("businessObjectFormatVersion") Integer businessObjectFormatVersion,
        @RequestBody BusinessObjectFormatAttributeDefinitionsUpdateRequest request); @RequestMapping(value = "/businessObjectFormatRetentionInformation/namespaces/{namespace}/businessObjectDefinitionNames/{businessObjectDefinitionName}" + "/businessObjectFormatUsages/{businessObjectFormatUsage}/businessObjectFormatFileTypes/{businessObjectFormatFileType}", method = RequestMethod.PUT, consumes = {"application/xml", "application/json"}) @Secured(SecurityFunctions.FN_BUSINESS_OBJECT_FORMAT_RETENTION_INFORMATION_PUT) BusinessObjectFormat updateBusinessObjectFormatRetentionInformation(@PathVariable("namespace") String namespace,
        @PathVariable("businessObjectDefinitionName") String businessObjectDefinitionName,
        @PathVariable("businessObjectFormatUsage") String businessObjectFormatUsage,
        @PathVariable("businessObjectFormatFileType") String businessObjectFormatFileType,
        @RequestBody BusinessObjectFormatRetentionInformationUpdateRequest request); @RequestMapping(value = "/businessObjectFormatSchemaBackwardsCompatibility/namespaces/{namespace}/businessObjectDefinitionNames/" + "{businessObjectDefinitionName}/businessObjectFormatUsages/{businessObjectFormatUsage}/businessObjectFormatFileTypes/{businessObjectFormatFileType}", method = RequestMethod.PUT, consumes = {"application/xml", "application/json"}) @Secured(SecurityFunctions.FN_BUSINESS_OBJECT_FORMAT_SCHEMA_BACKWARDS_COMPATIBILITY_PUT) BusinessObjectFormat updateBusinessObjectFormatSchemaBackwardsCompatibleChanges(@PathVariable("namespace") String namespace,
        @PathVariable("businessObjectDefinitionName") String businessObjectDefinitionName,
        @PathVariable("businessObjectFormatUsage") String businessObjectFormatUsage,
        @PathVariable("businessObjectFormatFileType") String businessObjectFormatFileType,
        @RequestBody BusinessObjectFormatSchemaBackwardsCompatibilityUpdateRequest request);  }
@Test public void testUpdateBusinessObjectFormatSchemaCompatibleChanges() { BusinessObjectFormatKey businessObjectFormatKey = new BusinessObjectFormatKey(NAMESPACE, BDEF_NAME, FORMAT_USAGE_CODE, FORMAT_FILE_TYPE_CODE, null); BusinessObjectFormatSchemaBackwardsCompatibilityUpdateRequest updateRequest = new BusinessObjectFormatSchemaBackwardsCompatibilityUpdateRequest(); updateRequest.setAllowNonBackwardsCompatibleChanges(true); BusinessObjectFormat businessObjectFormat = new BusinessObjectFormat(); when(businessObjectFormatService.updateBusinessObjectFormatSchemaBackwardsCompatibilityChanges(businessObjectFormatKey, updateRequest)) .thenReturn(businessObjectFormat); BusinessObjectFormat updatedBusinessObjectFormat = businessObjectFormatRestController .updateBusinessObjectFormatSchemaBackwardsCompatibleChanges(businessObjectFormatKey.getNamespace(), businessObjectFormatKey.getBusinessObjectDefinitionName(), businessObjectFormatKey.getBusinessObjectFormatUsage(), businessObjectFormatKey.getBusinessObjectFormatFileType(), updateRequest); verify(businessObjectFormatService).updateBusinessObjectFormatSchemaBackwardsCompatibilityChanges(businessObjectFormatKey, updateRequest); verifyNoMoreInteractions(businessObjectFormatService); assertEquals(businessObjectFormat, updatedBusinessObjectFormat); }