// Path: alfresco-mvc-rest/src/test/java/com/gradecak/alfresco/mvc/controller/TestController.java
// @Controller
// @RequestMapping("/test")
// public class TestController {
// 
// 	@RequestMapping(value = "/get", method = { RequestMethod.GET })
// 	public ResponseEntity<?> get(@RequestParam String id) {
// 		return ResponseEntity.ok(id);
// 	}
// 
// 	@RequestMapping(value = "/headers", method = { RequestMethod.GET })
// 	public ResponseEntity<?> headers(@RequestHeader MultiValueMap<String, String> headers) {
// 		return ResponseEntity.ok().headers(new HttpHeaders(headers)).body("success");
// 	}
// 
// 	@RequestMapping(value = "/cookies", method = { RequestMethod.GET })
// 	public ResponseEntity<?> cookies(HttpServletRequest req) {
// 
// 		HttpHeaders headers = new HttpHeaders();
// 		Cookie[] cookies = req.getCookies();
// 		for (Cookie cookie : cookies) {
// 			headers.add(cookie.getName(), cookie.getValue());
// 		}
// 
// 		return ResponseEntity.ok().headers(new HttpHeaders(headers)).body("success");
// 
// 	}
// 
// 	@RequestMapping(value = "/post", method = { RequestMethod.POST })
// 	public ResponseEntity<?> post(@RequestParam String id) {
// 		return ResponseEntity.ok(id);
// 	}
// 
// 	@RequestMapping(value = "/delete", method = { RequestMethod.DELETE })
// 	public ResponseEntity<?> delete(@RequestParam String id) {
// 		return ResponseEntity.ok(id);
// 	}
// 
// 	@RequestMapping(value = "/exception", method = { RequestMethod.GET })
// 	public ResponseEntity<?> exception(@RequestParam String id) {
// 		throw new RuntimeException("test exception");
// 	}
// 
// 	@RequestMapping(value = "/body", method = { RequestMethod.POST })
// 	public ResponseEntity<?> post(@RequestBody Map<String, String> body) {
// 		return ResponseEntity.ok().header("id", body.get("id")).body("success");
// 	}
// 
// 	@RequestMapping(value = "/ambigousMethod", method = { RequestMethod.DELETE, RequestMethod.PUT })
// 	public ResponseEntity<?> ambigousMethod() {
// 		return ResponseEntity.ok().build();
// 	}
// 
// 	@RequestMapping(value = "/ambigousMethod", method = { RequestMethod.DELETE })
// 	public ResponseEntity<?> ambigousMethod2() {
// 		return ResponseEntity.ok().build();
// 	}
// 
// 	@RequestMapping(value = "/put", method = { RequestMethod.PUT })
// 	public ResponseEntity<?> put() {
// 		return ResponseEntity.ok().build();
// 	}
// 
// 	@RequestMapping(value = "/download", method = { RequestMethod.GET })
// 	public ResponseEntity<?> download() throws IOException {
// 		return ResponseEntity.ok()
// 				.header(HttpHeaders.CONTENT_DISPOSITION, "attachment; filename=\"mvc.delete.desc.xml\"")
// 				.body(new ClassPathResource(
// 						"alfresco/extension/templates/webscripts/alfresco-mvc/mvc.delete.desc.xml"));
// 	}
// 
// 	@GetMapping(value = "noderef")
// 	public ResponseEntity<?> noderef() throws IOException {
// 		return ResponseEntity.ok(new NodeRef("a://a/a"));
// 	}
// 
// 	@GetMapping(value = "noderefAlfrescoResponse")
// 	@AlfrescoRestResponse
// 	public ResponseEntity<?> noderefAlfrescoResponse() throws IOException {
// 		return ResponseEntity.ok(new NodeRef("a://a/a"));
// 	}
// 
// 	@RequestMapping(value = "/exceptionHandler", method = { RequestMethod.GET })
// 	public ResponseEntity<?> exceptionHandler() {
// 		throw new IllegalArgumentException("test exception");
// 	}
// 
// 	@GetMapping(value = "regexp/{regexpchars:.+}")
// 	public ResponseEntity<?> regexpchars(@PathVariable String regexpchars) throws IOException {
// 		return ResponseEntity.ok(regexpchars);
// 	}
// 
// 	@ExceptionHandler({ IllegalArgumentException.class })
// 	public ResponseEntity<?> handleIllegalArgumentException(IllegalArgumentException exc) {
// 		return ResponseEntity.status(HttpStatus.INTERNAL_SERVER_ERROR).header("error", "internal server error").build();
// 	}
// }


import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
import com.gradecak.alfresco.mvc.controller.TestController;
import com.gradecak.alfresco.mvc.rest.annotation.EnableWebAlfrescoMvc;
package com.gradecak.alfresco.mvc.config;



@Configuration
@EnableWebAlfrescoMvc
// Path: alfresco-mvc-rest/src/test/java/com/gradecak/alfresco/mvc/controller/TestController.java
// @Controller
// @RequestMapping("/test")
// public class TestController {
// 
// 	@RequestMapping(value = "/get", method = { RequestMethod.GET })
// 	public ResponseEntity<?> get(@RequestParam String id) {
// 		return ResponseEntity.ok(id);
// 	}
// 
// 	@RequestMapping(value = "/headers", method = { RequestMethod.GET })
// 	public ResponseEntity<?> headers(@RequestHeader MultiValueMap<String, String> headers) {
// 		return ResponseEntity.ok().headers(new HttpHeaders(headers)).body("success");
// 	}
// 
// 	@RequestMapping(value = "/cookies", method = { RequestMethod.GET })
// 	public ResponseEntity<?> cookies(HttpServletRequest req) {
// 
// 		HttpHeaders headers = new HttpHeaders();
// 		Cookie[] cookies = req.getCookies();
// 		for (Cookie cookie : cookies) {
// 			headers.add(cookie.getName(), cookie.getValue());
// 		}
// 
// 		return ResponseEntity.ok().headers(new HttpHeaders(headers)).body("success");
// 
// 	}
// 
// 	@RequestMapping(value = "/post", method = { RequestMethod.POST })
// 	public ResponseEntity<?> post(@RequestParam String id) {
// 		return ResponseEntity.ok(id);
// 	}
// 
// 	@RequestMapping(value = "/delete", method = { RequestMethod.DELETE })
// 	public ResponseEntity<?> delete(@RequestParam String id) {
// 		return ResponseEntity.ok(id);
// 	}
// 
// 	@RequestMapping(value = "/exception", method = { RequestMethod.GET })
// 	public ResponseEntity<?> exception(@RequestParam String id) {
// 		throw new RuntimeException("test exception");
// 	}
// 
// 	@RequestMapping(value = "/body", method = { RequestMethod.POST })
// 	public ResponseEntity<?> post(@RequestBody Map<String, String> body) {
// 		return ResponseEntity.ok().header("id", body.get("id")).body("success");
// 	}
// 
// 	@RequestMapping(value = "/ambigousMethod", method = { RequestMethod.DELETE, RequestMethod.PUT })
// 	public ResponseEntity<?> ambigousMethod() {
// 		return ResponseEntity.ok().build();
// 	}
// 
// 	@RequestMapping(value = "/ambigousMethod", method = { RequestMethod.DELETE })
// 	public ResponseEntity<?> ambigousMethod2() {
// 		return ResponseEntity.ok().build();
// 	}
// 
// 	@RequestMapping(value = "/put", method = { RequestMethod.PUT })
// 	public ResponseEntity<?> put() {
// 		return ResponseEntity.ok().build();
// 	}
// 
// 	@RequestMapping(value = "/download", method = { RequestMethod.GET })
// 	public ResponseEntity<?> download() throws IOException {
// 		return ResponseEntity.ok()
// 				.header(HttpHeaders.CONTENT_DISPOSITION, "attachment; filename=\"mvc.delete.desc.xml\"")
// 				.body(new ClassPathResource(
// 						"alfresco/extension/templates/webscripts/alfresco-mvc/mvc.delete.desc.xml"));
// 	}
// 
// 	@GetMapping(value = "noderef")
// 	public ResponseEntity<?> noderef() throws IOException {
// 		return ResponseEntity.ok(new NodeRef("a://a/a"));
// 	}
// 
// 	@GetMapping(value = "noderefAlfrescoResponse")
// 	@AlfrescoRestResponse
// 	public ResponseEntity<?> noderefAlfrescoResponse() throws IOException {
// 		return ResponseEntity.ok(new NodeRef("a://a/a"));
// 	}
// 
// 	@RequestMapping(value = "/exceptionHandler", method = { RequestMethod.GET })
// 	public ResponseEntity<?> exceptionHandler() {
// 		throw new IllegalArgumentException("test exception");
// 	}
// 
// 	@GetMapping(value = "regexp/{regexpchars:.+}")
// 	public ResponseEntity<?> regexpchars(@PathVariable String regexpchars) throws IOException {
// 		return ResponseEntity.ok(regexpchars);
// 	}
// 
// 	@ExceptionHandler({ IllegalArgumentException.class })
// 	public ResponseEntity<?> handleIllegalArgumentException(IllegalArgumentException exc) {
// 		return ResponseEntity.status(HttpStatus.INTERNAL_SERVER_ERROR).header("error", "internal server error").build();
// 	}
// }


// Path: alfresco-mvc-rest/src/test/java/com/gradecak/alfresco/mvc/config/AlfrescoMvcRestServletContext.java
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
import com.gradecak.alfresco.mvc.controller.TestController;
import com.gradecak.alfresco.mvc.rest.annotation.EnableWebAlfrescoMvc;

package com.gradecak.alfresco.mvc.config;



@Configuration
@EnableWebAlfrescoMvc
@ComponentScan(basePackageClasses = { TestController.class })