@Test void testInit() throws Exception { when(localeResolver.resolveLocale(any())).thenReturn(Locale.GERMAN); mockMvc .perform(get("/plugin/metadata-manager")) .andExpect(status().isOk()) .andExpect(view().name("view-metadata-manager")) .andExpect(model().attribute("baseUrl", "/test/path")); }
@GetMapping("/**") public String init(Model model) { model.addAttribute(KEY_BASE_URL, menuReaderService.findMenuItemPath(METADATA_MANAGER)); return "view-metadata-manager"; }
MetadataManagerController extends PluginController { @GetMapping("/**") public String init(Model model) { model.addAttribute(KEY_BASE_URL, menuReaderService.findMenuItemPath(METADATA_MANAGER)); return "view-metadata-manager"; } }
MetadataManagerController extends PluginController { @GetMapping("/**") public String init(Model model) { model.addAttribute(KEY_BASE_URL, menuReaderService.findMenuItemPath(METADATA_MANAGER)); return "view-metadata-manager"; } MetadataManagerController(
      MenuReaderService menuReaderService, MetadataManagerService metadataManagerService); }
MetadataManagerController extends PluginController { @GetMapping("/**") public String init(Model model) { model.addAttribute(KEY_BASE_URL, menuReaderService.findMenuItemPath(METADATA_MANAGER)); return "view-metadata-manager"; } MetadataManagerController(
      MenuReaderService menuReaderService, MetadataManagerService metadataManagerService); @GetMapping("/**") String init(Model model); @ResponseBody @GetMapping(value = "/editorPackages", produces = "application/json") List<EditorPackageIdentifier> getEditorPackages(); @ResponseBody @GetMapping(value = "/entityType/{id:.*}", produces = "application/json") EditorEntityTypeResponse getEditorEntityType(@PathVariable("id") String id); @ResponseBody @GetMapping(value = "/create/entityType", produces = "application/json") EditorEntityTypeResponse createEditorEntityType(); @ResponseStatus(OK) @PostMapping(value = "/entityType", consumes = "application/json") void upsertEntityType(@RequestBody EditorEntityType editorEntityType); @ResponseBody @GetMapping(value = "/create/attribute", produces = "application/json") EditorAttributeResponse createEditorAttribute(); }
MetadataManagerController extends PluginController { @GetMapping("/**") public String init(Model model) { model.addAttribute(KEY_BASE_URL, menuReaderService.findMenuItemPath(METADATA_MANAGER)); return "view-metadata-manager"; } MetadataManagerController(
      MenuReaderService menuReaderService, MetadataManagerService metadataManagerService); @GetMapping("/**") String init(Model model); @ResponseBody @GetMapping(value = "/editorPackages", produces = "application/json") List<EditorPackageIdentifier> getEditorPackages(); @ResponseBody @GetMapping(value = "/entityType/{id:.*}", produces = "application/json") EditorEntityTypeResponse getEditorEntityType(@PathVariable("id") String id); @ResponseBody @GetMapping(value = "/create/entityType", produces = "application/json") EditorEntityTypeResponse createEditorEntityType(); @ResponseStatus(OK) @PostMapping(value = "/entityType", consumes = "application/json") void upsertEntityType(@RequestBody EditorEntityType editorEntityType); @ResponseBody @GetMapping(value = "/create/attribute", produces = "application/json") EditorAttributeResponse createEditorAttribute(); static final String METADATA_MANAGER; static final String URI; }