@Override @Nullable public ModelAndView handleRequest(HttpServletRequest request, HttpServletResponse response) throws Exception { if (HttpMethod.OPTIONS.matches(request.getMethod())) { response.setHeader("Allow", getAllowHeader()); return null; } // Delegate to WebContentGenerator for checking and preparing. checkRequest(request); prepareResponse(response); // Execute handleRequestInternal in synchronized block if required. if (this.synchronizeOnSession) { HttpSession session = request.getSession(false); if (session != null) { Object mutex = WebUtils.getSessionMutex(session); synchronized (mutex) { return handleRequestInternal(request, response); } } } return handleRequestInternal(request, response); }
protected void initApplicationContext() throws BeansException { super.initApplicationContext(); myConverter = new ServletConverter(getServletContext()); myConverter.setTarget(myRouter); }
public RESTResourceExporter(RESTResource resource, Map<VerbType, Object> methodsToEndpoints) { this.resource = resource; this.endpoints = methodsToEndpoints; super.setSupportedMethods(null); }
@RequestMapping(path = "/*.oxml.htm") @Override public ModelAndView handleRequest(HttpServletRequest request, HttpServletResponse response) throws Exception { return super.handleRequest(request, response); }
@Override protected void initApplicationContext() throws BeansException { super.initApplicationContext(); if (resource == null) { throw new ApplicationContextException("A REST resource must be provided."); } if (contentTypeSupport == null) { throw new ApplicationContextException("No content type support was supplied."); } if (this.multipartRequestHandler == null) { this.multipartRequestHandler = new DefaultMultipartRequestHandler(); Map beans = BeanFactoryUtils.beansOfTypeIncludingAncestors(getApplicationContext(), AutowiredAnnotationBeanPostProcessor.class); if (!beans.isEmpty()) { AutowiredAnnotationBeanPostProcessor processor = (AutowiredAnnotationBeanPostProcessor) beans.values().iterator().next(); processor.processInjection(this.multipartRequestHandler); } } }
public RESTResourceExporter(RESTResource resource) { this.resource = resource; super.setSupportedMethods(new String[]{"GET", "PUT", "POST", "DELETE"}); }
@RequestMapping(path = "/threads.htm") @Override public ModelAndView handleRequest(HttpServletRequest request, HttpServletResponse response) throws Exception { return super.handleRequest(request, response); }
@Override @Nullable public ModelAndView handleRequest(HttpServletRequest request, HttpServletResponse response) throws Exception { if (HttpMethod.OPTIONS.matches(request.getMethod())) { response.setHeader("Allow", getAllowHeader()); return null; } // Delegate to WebContentGenerator for checking and preparing. checkRequest(request); prepareResponse(response); // Execute handleRequestInternal in synchronized block if required. if (this.synchronizeOnSession) { HttpSession session = request.getSession(false); if (session != null) { Object mutex = WebUtils.getSessionMutex(session); synchronized (mutex) { return handleRequestInternal(request, response); } } } return handleRequestInternal(request, response); }
@Override protected void initApplicationContext() throws BeansException { super.initApplicationContext(); if (resource == null) { throw new ApplicationContextException("A REST resource must be provided."); } if (contentTypeSupport == null) { throw new ApplicationContextException("No content type support was supplied."); } if (this.multipartRequestHandler == null) { Map resolverBeans = BeanFactoryUtils.beansOfTypeIncludingAncestors(getApplicationContext(), MultipartRequestHandler.class); if (resolverBeans.size() > 0) { //todo: add a configuration element to specify which one to use. this.multipartRequestHandler = (MultipartRequestHandler) resolverBeans.values().iterator().next(); } else { DefaultMultipartRequestHandler defaultMultipartHandler = new DefaultMultipartRequestHandler(); if (getApplicationContext() instanceof WebApplicationContext) { defaultMultipartHandler.setServletContext(getServletContext()); } this.multipartRequestHandler = defaultMultipartHandler; } } }
public RESTResourceExporter(RESTResource resource) { this.resource = resource; super.setSupportedMethods(new String[]{"GET", "PUT", "POST", "DELETE"}); }
@RequestMapping(path = "/sql/queryHistoryItem.ajax") @Override public ModelAndView handleRequest(HttpServletRequest request, HttpServletResponse response) throws Exception { return super.handleRequest(request, response); }
@Override public ModelAndView handleRequest(HttpServletRequest request, HttpServletResponse response) throws Exception { if (HttpMethod.OPTIONS.matches(request.getMethod())) { response.setHeader("Allow", getAllowHeader()); return null; } // Delegate to WebContentGenerator for checking and preparing. checkRequest(request); prepareResponse(response); // Execute handleRequestInternal in synchronized block if required. if (this.synchronizeOnSession) { HttpSession session = request.getSession(false); if (session != null) { Object mutex = WebUtils.getSessionMutex(session); synchronized (mutex) { return handleRequestInternal(request, response); } } } return handleRequestInternal(request, response); }
@Override protected void initApplicationContext() throws BeansException { super.initApplicationContext(); if (resource == null) { throw new ApplicationContextException("A REST resource must be provided."); } if (contentTypeSupport == null) { throw new ApplicationContextException("No content type support was supplied."); } if (this.multipartRequestHandler == null) { Map resolverBeans = BeanFactoryUtils.beansOfTypeIncludingAncestors(getApplicationContext(), MultipartRequestHandler.class); if (resolverBeans.size() > 0) { //todo: add a configuration element to specify which one to use. this.multipartRequestHandler = (MultipartRequestHandler) resolverBeans.values().iterator().next(); } else { DefaultMultipartRequestHandler defaultMultipartHandler = new DefaultMultipartRequestHandler(); if (getApplicationContext() instanceof WebApplicationContext) { defaultMultipartHandler.setServletContext(getServletContext()); } this.multipartRequestHandler = defaultMultipartHandler; } } }
public RESTContentTypeRoutingController(RESTResource resource, ContentTypeSupport contentTypeSupport) { this.defaultContentType = resource.getDefaultContentType(); this.contentTypeSupport = contentTypeSupport; super.setSupportedMethods(new String[]{"GET", "PUT", "POST", "DELETE"}); }
@RequestMapping(path = "/remember.ajax") @Override public ModelAndView handleRequest(HttpServletRequest request, HttpServletResponse response) throws Exception { return super.handleRequest(request, response); }
protected void initApplicationContext() throws BeansException { super.initApplicationContext(); myConverter = new GeoServerServletConverter(getServletContext()); myConverter.setTarget(createRoot()); callbacks = GeoServerExtensions.extensions(DispatcherCallback.class, getApplicationContext()); }
public RESTContentTypeRoutingController(RESTResource resource, ContentTypeSupport contentTypeSupport) { this.defaultContentType = resource.getDefaultContentType(); this.contentTypeSupport = contentTypeSupport; super.setSupportedMethods(new String[]{"GET", "PUT", "POST", "DELETE"}); }
@RequestMapping(path = "/403.htm") @Override public ModelAndView handleRequest(HttpServletRequest request, HttpServletResponse response) throws Exception { return super.handleRequest(request, response); }
public RESTContentTypeRoutingController(RESTResource resource) { this.defaultMimeType = MimeType.parse(resource.getDefaultContentType()); super.setSupportedMethods(new String[]{"GET", "PUT", "POST", "DELETE"}); }
@RequestMapping(path = "/chart.png") @Override public ModelAndView handleRequest(HttpServletRequest request, HttpServletResponse response) throws Exception { return super.handleRequest(request, response); }