Java tutorial
/* * Ktunaxa Referral Management System. * * Copyright (C) see version control system * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Affero General Public License for more details. * * You should have received a copy of the GNU Affero General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ package org.ktunaxa.referral.server.mvc; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import org.springframework.web.servlet.ModelAndView; import org.springframework.web.servlet.mvc.Controller; /** * MVC document download for in-memory CMIS (test-only). * * @author Jan De Moerloose * */ public class InMemoryCmisController implements Controller { @Override public ModelAndView handleRequest(HttpServletRequest request, HttpServletResponse response) throws Exception { ModelAndView mv = new ModelAndView(InMemoryCmisDocumentView.NAME); mv.addObject(InMemoryCmisDocumentView.DOCUMENT_ID, request.getParameter(InMemoryCmisDocumentView.DOCUMENT_ID)); mv.addObject(InMemoryCmisDocumentView.TYPE, request.getParameter(InMemoryCmisDocumentView.TYPE)); return mv; } }