test_class.declarator: geoServer
test_class.modifier: @Mock
test_class.original_string: @Mock
      GeoServer geoServer;
test_class.type: GeoServer
test_class.var_name: geoServer
test_class.declarator: ctrl
test_class.modifier: @InjectMocks
test_class.original_string: @InjectMocks
      IconController ctrl;
test_class.type: IconController
test_class.var_name: ctrl
test_class.declarator: mvc
test_class.original_string: MockMvc mvc;
test_class.type: MockMvc
test_class.var_name: mvc
test_class.file: geoserver/webapp/api-composer/src/test/java/com/boundlessgeo/geoserver/api/controllers/IconControllerTest.java
test_class.identifier: IconControllerTest
test_case.body: @Test
      public void testRaw() throws Exception {
          MockGeoServer.get().catalog()
          .resources()
            .resource("workspaces/foo/styles/one.yaml", "title: raw")
            .directory("workspaces/foo/styles")
            .resource("workspaces/foo/styles/icon.png", "PNG8")
            .resource("workspaces/foo/styles/symbols.TTF", "TTF")
            .directory("styles")
            .resource("styles/global.png", "PNG")
          .geoServer().catalog()
            .workspace("foo", "http://scratch.org", true)
              .layer("one")
                .style().ysld("one.yaml")
          .geoServer().build(geoServer);
  
        MvcResult result = mvc.perform(get("/app/api/icons/foo/icon.png"))
                .andExpect(status().isOk())
                .andExpect(content().contentType(MediaType.IMAGE_PNG_VALUE))
                .andReturn();
  
        String raw = result.getResponse().getContentAsString();
        
        assertEquals("PNG8",raw);
        
        //Global styles directory
        result = mvc.perform(get("/app/api/icons/global.png"))
                .andExpect(status().isOk())
                .andExpect(content().contentType(MediaType.IMAGE_PNG_VALUE))
                .andReturn();
  
        raw = result.getResponse().getContentAsString();
        
        assertEquals("PNG",raw);
        
      }
test_case.class_method_signature: IconControllerTest.testRaw()
test_case.full_signature: @Test public void testRaw()
test_case.identifier: testRaw
test_case.invocations: build geoServer ysld style layer workspace catalog geoServer resource directory resource resource directory resource resources catalog get andReturn andExpect andExpect perform get isOk status contentType content getContentAsString getResponse assertEquals andReturn andExpect andExpect perform get isOk status contentType content getContentAsString getResponse assertEquals
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testRaw()
focal_class.declarator: LOG = Logging.getLogger(IconController.class)
focal_class.modifier: static final
focal_class.original_string: static final Logger LOG = Logging.getLogger(IconController.class);
focal_class.type: Logger
focal_class.var_name: LOG
focal_class.declarator: ICON_FORMATS = new HashMap<>(
          (Map)new KVP(
              "png","image/png",
              "jpeg","image/jpeg",
              "jpg","image/jpeg",
              "gif","image/gif",
              "svg","image/svg+xml",
              "ttf","application/font-sfnt",
              "properties","text/x-java-properties")
      )
focal_class.modifier: @SuppressWarnings({ "unchecked", "rawtypes" })
      static final
focal_class.original_string: @SuppressWarnings({ "unchecked", "rawtypes" })
      static final Map<String,String> ICON_FORMATS = new HashMap<>(
          (Map)new KVP(
              "png","image/png",
              "jpeg","image/jpeg",
              "jpg","image/jpeg",
              "gif","image/gif",
              "svg","image/svg+xml",
              "ttf","application/font-sfnt",
              "properties","text/x-java-properties")
      );
focal_class.type: Map<String,String>
focal_class.var_name: ICON_FORMATS
focal_class.file: geoserver/webapp/api-composer/src/main/java/com/boundlessgeo/geoserver/api/controllers/IconController.java
focal_class.identifier: IconController
focal_class.class_method_signature: IconController.IconController(GeoServer geoServer)
focal_class.full_signature: @Autowired public  IconController(GeoServer geoServer)
focal_class.identifier: IconController
focal_class.modifiers: @Autowired public
focal_class.parameters: (GeoServer geoServer)
focal_class.signature:  IconController(GeoServer geoServer)
focal_class.class_method_signature: IconController.list(HttpServletRequest request)
focal_class.full_signature: @RequestMapping(value = "/list", method = RequestMethod.GET) public @ResponseBody JSONArr list(HttpServletRequest request)
focal_class.identifier: list
focal_class.modifiers: @RequestMapping(value = "/list", method = RequestMethod.GET) public @ResponseBody
focal_class.parameters: (HttpServletRequest request)
focal_class.return: JSONArr
focal_class.signature: JSONArr list(HttpServletRequest request)
focal_class.class_method_signature: IconController.list(@PathVariable String wsName, HttpServletRequest request)
focal_class.full_signature: @RequestMapping(value = "/list/{wsName:.+}", method = RequestMethod.GET) public @ResponseBody JSONArr list(@PathVariable String wsName, HttpServletRequest request)
focal_class.identifier: list
focal_class.modifiers: @RequestMapping(value = "/list/{wsName:.+}", method = RequestMethod.GET) public @ResponseBody
focal_class.parameters: (@PathVariable String wsName, HttpServletRequest request)
focal_class.return: JSONArr
focal_class.signature: JSONArr list(@PathVariable String wsName, HttpServletRequest request)
focal_class.class_method_signature: IconController.create(HttpServletRequest request )
focal_class.full_signature: @RequestMapping(value = "", method = RequestMethod.POST,consumes=MediaType.MULTIPART_FORM_DATA_VALUE) public @ResponseStatus(value=HttpStatus.CREATED) @ResponseBody JSONArr create(HttpServletRequest request )
focal_class.identifier: create
focal_class.modifiers: @RequestMapping(value = "", method = RequestMethod.POST,consumes=MediaType.MULTIPART_FORM_DATA_VALUE) public @ResponseStatus(value=HttpStatus.CREATED) @ResponseBody
focal_class.parameters: (HttpServletRequest request )
focal_class.return: JSONArr
focal_class.signature: JSONArr create(HttpServletRequest request )
focal_class.class_method_signature: IconController.create(@PathVariable String wsName,  HttpServletRequest request )
focal_class.full_signature: @RequestMapping(value = "/{wsName:.+}", method = RequestMethod.POST,consumes=MediaType.MULTIPART_FORM_DATA_VALUE) public @ResponseStatus(value=HttpStatus.CREATED) @ResponseBody JSONArr create(@PathVariable String wsName,  HttpServletRequest request )
focal_class.identifier: create
focal_class.modifiers: @RequestMapping(value = "/{wsName:.+}", method = RequestMethod.POST,consumes=MediaType.MULTIPART_FORM_DATA_VALUE) public @ResponseStatus(value=HttpStatus.CREATED) @ResponseBody
focal_class.parameters: (@PathVariable String wsName,  HttpServletRequest request )
focal_class.return: JSONArr
focal_class.signature: JSONArr create(@PathVariable String wsName,  HttpServletRequest request )
focal_class.class_method_signature: IconController.icon(JSONObj obj, WorkspaceInfo ws, Resource r, HttpServletRequest req)
focal_class.full_signature:  JSONObj icon(JSONObj obj, WorkspaceInfo ws, Resource r, HttpServletRequest req)
focal_class.identifier: icon
focal_class.parameters: (JSONObj obj, WorkspaceInfo ws, Resource r, HttpServletRequest req)
focal_class.return: JSONObj
focal_class.signature: JSONObj icon(JSONObj obj, WorkspaceInfo ws, Resource r, HttpServletRequest req)
focal_class.class_method_signature: IconController.raw(@PathVariable String icon)
focal_class.full_signature: @RequestMapping(value = "/{icon:.+}", method = RequestMethod.GET) public HttpEntity raw(@PathVariable String icon)
focal_class.identifier: raw
focal_class.modifiers: @RequestMapping(value = "/{icon:.+}", method = RequestMethod.GET) public
focal_class.parameters: (@PathVariable String icon)
focal_class.return: HttpEntity
focal_class.signature: HttpEntity raw(@PathVariable String icon)
focal_class.class_method_signature: IconController.raw(@PathVariable String wsName, @PathVariable String icon)
focal_class.full_signature: @RequestMapping(value = "/{wsName}/{icon:.+}", method = RequestMethod.GET) public HttpEntity raw(@PathVariable String wsName, @PathVariable String icon)
focal_class.identifier: raw
focal_class.modifiers: @RequestMapping(value = "/{wsName}/{icon:.+}", method = RequestMethod.GET) public
focal_class.parameters: (@PathVariable String wsName, @PathVariable String icon)
focal_class.return: HttpEntity
focal_class.signature: HttpEntity raw(@PathVariable String wsName, @PathVariable String icon)
focal_class.class_method_signature: IconController.delete(@PathVariable String icon)
focal_class.full_signature: @RequestMapping(value = "/{icon:.+}", method = RequestMethod.DELETE) @ResponseStatus(value = HttpStatus.NO_CONTENT) public void delete(@PathVariable String icon)
focal_class.identifier: delete
focal_class.modifiers: @RequestMapping(value = "/{icon:.+}", method = RequestMethod.DELETE) @ResponseStatus(value = HttpStatus.NO_CONTENT) public
focal_class.parameters: (@PathVariable String icon)
focal_class.return: void
focal_class.signature: void delete(@PathVariable String icon)
focal_class.class_method_signature: IconController.delete(@PathVariable String wsName, @PathVariable String icon)
focal_class.full_signature: @RequestMapping(value = "/{wsName}/{icon:.+}", method = RequestMethod.DELETE) @ResponseStatus(value = HttpStatus.NO_CONTENT) public void delete(@PathVariable String wsName, @PathVariable String icon)
focal_class.identifier: delete
focal_class.modifiers: @RequestMapping(value = "/{wsName}/{icon:.+}", method = RequestMethod.DELETE) @ResponseStatus(value = HttpStatus.NO_CONTENT) public
focal_class.parameters: (@PathVariable String wsName, @PathVariable String icon)
focal_class.return: void
focal_class.signature: void delete(@PathVariable String wsName, @PathVariable String icon)
focal_class.class_method_signature: IconController.error(FileUploadException e, HttpServletResponse response)
focal_class.full_signature: @ExceptionHandler(FileUploadException.class) public @ResponseBody JSONObj error(FileUploadException e, HttpServletResponse response)
focal_class.identifier: error
focal_class.modifiers: @ExceptionHandler(FileUploadException.class) public @ResponseBody
focal_class.parameters: (FileUploadException e, HttpServletResponse response)
focal_class.return: JSONObj
focal_class.signature: JSONObj error(FileUploadException e, HttpServletResponse response)
focal_class.class_method_signature: IconController.error(IllegalArgumentException e, HttpServletResponse response)
focal_class.full_signature: @ExceptionHandler(IllegalArgumentException.class) public @ResponseBody JSONObj error(IllegalArgumentException e, HttpServletResponse response)
focal_class.identifier: error
focal_class.modifiers: @ExceptionHandler(IllegalArgumentException.class) public @ResponseBody
focal_class.parameters: (IllegalArgumentException e, HttpServletResponse response)
focal_class.return: JSONObj
focal_class.signature: JSONObj error(IllegalArgumentException e, HttpServletResponse response)
focal_class.class_method_signature: IconController.findAllGraphics(WorkspaceInfo ws)
focal_class.full_signature: @SuppressWarnings("unchecked") private Set<String> findAllGraphics(WorkspaceInfo ws)
focal_class.identifier: findAllGraphics
focal_class.modifiers: @SuppressWarnings("unchecked") private
focal_class.parameters: (WorkspaceInfo ws)
focal_class.return: Set<String>
focal_class.signature: Set<String> findAllGraphics(WorkspaceInfo ws)
focal_class.class_method_signature: IconController.fileExt(String filename)
focal_class.full_signature:  String fileExt(String filename)
focal_class.identifier: fileExt
focal_class.parameters: (String filename)
focal_class.return: String
focal_class.signature: String fileExt(String filename)
focal_class.superclass: extends ApiController
focal_method.body: @RequestMapping(value = "/{icon:.+}", method = RequestMethod.GET)
      public HttpEntity raw(@PathVariable String icon) throws IOException {
          return raw(null, icon);
      }
focal_method.class_method_signature: IconController.raw(@PathVariable String icon)
focal_method.full_signature: @RequestMapping(value = "/{icon:.+}", method = RequestMethod.GET) public HttpEntity raw(@PathVariable String icon)
focal_method.identifier: raw
focal_method.invocations: raw
focal_method.modifiers: @RequestMapping(value = "/{icon:.+}", method = RequestMethod.GET) public
focal_method.parameters: (@PathVariable String icon)
focal_method.return: HttpEntity
focal_method.signature: HttpEntity raw(@PathVariable String icon)