CustomDdlRestController extends HerdBaseController { @RequestMapping(value = CUSTOM_DDLS_URI_PREFIX + "/namespaces/{namespace}/businessObjectDefinitionNames/{businessObjectDefinitionName}" + "/businessObjectFormatUsages/{businessObjectFormatUsage}/businessObjectFormatFileTypes/{businessObjectFormatFileType}" + "/businessObjectFormatVersions/{businessObjectFormatVersion}", method = RequestMethod.GET) @Secured(SecurityFunctions.FN_CUSTOM_DDLS_ALL_GET) public CustomDdlKeys getCustomDdls(@PathVariable("namespace") String namespace, @PathVariable("businessObjectDefinitionName") String businessObjectDefinitionName, @PathVariable("businessObjectFormatUsage") String businessObjectFormatUsage, @PathVariable("businessObjectFormatFileType") String businessObjectFormatFileType, @PathVariable("businessObjectFormatVersion") Integer businessObjectFormatVersion) { return customDdlService.getCustomDdls( new BusinessObjectFormatKey(namespace, businessObjectDefinitionName, businessObjectFormatUsage, businessObjectFormatFileType, businessObjectFormatVersion)); }  @RequestMapping(value = CUSTOM_DDLS_URI_PREFIX, method = RequestMethod.POST, consumes = {"application/xml", "application/json"}) @Secured(SecurityFunctions.FN_CUSTOM_DDLS_POST) CustomDdl createCustomDdl(@RequestBody CustomDdlCreateRequest request); @RequestMapping(value = CUSTOM_DDLS_URI_PREFIX + "/namespaces/{namespace}/businessObjectDefinitionNames/{businessObjectDefinitionName}" + "/businessObjectFormatUsages/{businessObjectFormatUsage}/businessObjectFormatFileTypes/{businessObjectFormatFileType}" + "/businessObjectFormatVersions/{businessObjectFormatVersion}/customDdlNames/{customDdlName}", method = RequestMethod.GET) @Secured(SecurityFunctions.FN_CUSTOM_DDLS_GET) CustomDdl getCustomDdl(@PathVariable("namespace") String namespace,
        @PathVariable("businessObjectDefinitionName") String businessObjectDefinitionName,
        @PathVariable("businessObjectFormatUsage") String businessObjectFormatUsage,
        @PathVariable("businessObjectFormatFileType") String businessObjectFormatFileType,
        @PathVariable("businessObjectFormatVersion") Integer businessObjectFormatVersion, @PathVariable("customDdlName") String customDdlName); @RequestMapping(value = CUSTOM_DDLS_URI_PREFIX + "/namespaces/{namespace}/businessObjectDefinitionNames/{businessObjectDefinitionName}" + "/businessObjectFormatUsages/{businessObjectFormatUsage}/businessObjectFormatFileTypes/{businessObjectFormatFileType}" + "/businessObjectFormatVersions/{businessObjectFormatVersion}/customDdlNames/{customDdlName}", method = RequestMethod.PUT, consumes = {"application/xml", "application/json"}) @Secured(SecurityFunctions.FN_CUSTOM_DDLS_PUT) CustomDdl updateCustomDdl(@PathVariable("namespace") String namespace,
        @PathVariable("businessObjectDefinitionName") String businessObjectDefinitionName,
        @PathVariable("businessObjectFormatUsage") String businessObjectFormatUsage,
        @PathVariable("businessObjectFormatFileType") String businessObjectFormatFileType,
        @PathVariable("businessObjectFormatVersion") Integer businessObjectFormatVersion, @PathVariable("customDdlName") String customDdlName,
        @RequestBody CustomDdlUpdateRequest request); @RequestMapping(value = CUSTOM_DDLS_URI_PREFIX + "/namespaces/{namespace}/businessObjectDefinitionNames/{businessObjectDefinitionName}" + "/businessObjectFormatUsages/{businessObjectFormatUsage}/businessObjectFormatFileTypes/{businessObjectFormatFileType}" + "/businessObjectFormatVersions/{businessObjectFormatVersion}/customDdlNames/{customDdlName}", method = RequestMethod.DELETE) @Secured(SecurityFunctions.FN_CUSTOM_DDLS_DELETE) CustomDdl deleteCustomDdl(@PathVariable("namespace") String namespace,
        @PathVariable("businessObjectDefinitionName") String businessObjectDefinitionName,
        @PathVariable("businessObjectFormatUsage") String businessObjectFormatUsage,
        @PathVariable("businessObjectFormatFileType") String businessObjectFormatFileType,
        @PathVariable("businessObjectFormatVersion") Integer businessObjectFormatVersion, @PathVariable("customDdlName") String customDdlName); @RequestMapping(value = CUSTOM_DDLS_URI_PREFIX + "/namespaces/{namespace}/businessObjectDefinitionNames/{businessObjectDefinitionName}" + "/businessObjectFormatUsages/{businessObjectFormatUsage}/businessObjectFormatFileTypes/{businessObjectFormatFileType}" + "/businessObjectFormatVersions/{businessObjectFormatVersion}", method = RequestMethod.GET) @Secured(SecurityFunctions.FN_CUSTOM_DDLS_ALL_GET) CustomDdlKeys getCustomDdls(@PathVariable("namespace") String namespace,
        @PathVariable("businessObjectDefinitionName") String businessObjectDefinitionName,
        @PathVariable("businessObjectFormatUsage") String businessObjectFormatUsage,
        @PathVariable("businessObjectFormatFileType") String businessObjectFormatFileType,
        @PathVariable("businessObjectFormatVersion") Integer businessObjectFormatVersion); static final String CUSTOM_DDLS_URI_PREFIX; }
@Test public void testGetCustomDdls() { BusinessObjectFormatKey businessObjectFormatKey = new BusinessObjectFormatKey(NAMESPACE, BDEF_NAME, FORMAT_USAGE_CODE, FORMAT_FILE_TYPE_CODE, FORMAT_VERSION); CustomDdlKeys customDdlKeys = new CustomDdlKeys(Arrays.asList(new CustomDdlKey(NAMESPACE, BDEF_NAME, FORMAT_USAGE_CODE, FORMAT_FILE_TYPE_CODE, FORMAT_VERSION, "ddl"))); when(customDdlService.getCustomDdls(businessObjectFormatKey)).thenReturn(customDdlKeys); CustomDdlKeys resultCustomDdlKeys = customDdlRestController.getCustomDdls(NAMESPACE, BDEF_NAME, FORMAT_USAGE_CODE, FORMAT_FILE_TYPE_CODE, FORMAT_VERSION); verify(customDdlService).getCustomDdls(businessObjectFormatKey); verifyNoMoreInteractions(customDdlService); assertEquals(customDdlKeys, resultCustomDdlKeys); }