001/**
002 * Copyright 2005-2016 The Kuali Foundation
003 *
004 * Licensed under the Educational Community License, Version 2.0 (the "License");
005 * you may not use this file except in compliance with the License.
006 * You may obtain a copy of the License at
007 *
008 * http://www.opensource.org/licenses/ecl2.php
009 *
010 * Unless required by applicable law or agreed to in writing, software
011 * distributed under the License is distributed on an "AS IS" BASIS,
012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
013 * See the License for the specific language governing permissions and
014 * limitations under the License.
015 */
016package org.kuali.rice.krad.web.controller;
017
018import org.apache.log4j.Logger;
019import org.kuali.rice.kew.api.KewApiServiceLocator;
020import org.kuali.rice.kew.api.document.WorkflowDocumentService;
021import org.kuali.rice.krad.web.form.InitiatedDocumentInfoForm;
022import org.kuali.rice.krad.web.form.UifFormBase;
023import org.springframework.stereotype.Controller;
024import org.springframework.validation.BindingResult;
025import org.springframework.web.bind.annotation.ModelAttribute;
026import org.springframework.web.bind.annotation.RequestMapping;
027import org.springframework.web.bind.annotation.RequestMethod;
028import org.springframework.web.servlet.ModelAndView;
029
030import javax.servlet.http.HttpServletRequest;
031import javax.servlet.http.HttpServletResponse;
032
033/**
034 * Controller for <code>MaintenanceView</code> screens which operate on
035 * <code>MaintenanceDocument</code> instances
036 *
037 * @author Kuali Rice Team (rice.collab@kuali.org)
038 */
039@Controller
040@RequestMapping(value="/initdocinfo")
041
042public class InitiatedDocumentInfoController extends UifControllerBase {
043    private static final Logger LOG = org.apache.log4j.Logger.getLogger(InitiatedDocumentInfoController.class);
044
045    @Override
046    public InitiatedDocumentInfoForm createInitialForm(HttpServletRequest request) {
047
048        InitiatedDocumentInfoForm initiatedDocumentInfoForm = new InitiatedDocumentInfoForm();
049
050        return initiatedDocumentInfoForm;
051    }
052
053    @Override
054    @RequestMapping(method = RequestMethod.GET, params = "methodToCall=start")
055    public ModelAndView start(@ModelAttribute("KualiForm")UifFormBase form, BindingResult result,
056            HttpServletRequest request, HttpServletResponse response) {
057
058        InitiatedDocumentInfoForm initiatedDocumentInfoForm = (InitiatedDocumentInfoForm) form;
059        return super.start(form, result, request, response);
060    }
061}