View Javadoc

1   /**
2    * Copyright 2005-2013 The Kuali Foundation
3    *
4    * Licensed under the Educational Community License, Version 2.0 (the "License");
5    * you may not use this file except in compliance with the License.
6    * You may obtain a copy of the License at
7    *
8    * http://www.opensource.org/licenses/ecl2.php
9    *
10   * Unless required by applicable law or agreed to in writing, software
11   * distributed under the License is distributed on an "AS IS" BASIS,
12   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13   * See the License for the specific language governing permissions and
14   * limitations under the License.
15   */
16  package org.kuali.rice.krad.web.controller;
17  
18  import org.apache.log4j.Logger;
19  import org.kuali.rice.kew.api.KewApiServiceLocator;
20  import org.kuali.rice.kew.api.document.WorkflowDocumentService;
21  import org.kuali.rice.krad.web.form.InitiatedDocumentInfoForm;
22  import org.kuali.rice.krad.web.form.UifFormBase;
23  import org.springframework.stereotype.Controller;
24  import org.springframework.validation.BindingResult;
25  import org.springframework.web.bind.annotation.ModelAttribute;
26  import org.springframework.web.bind.annotation.RequestMapping;
27  import org.springframework.web.bind.annotation.RequestMethod;
28  import org.springframework.web.servlet.ModelAndView;
29  
30  import javax.servlet.http.HttpServletRequest;
31  import javax.servlet.http.HttpServletResponse;
32  
33  /**
34   * Controller for <code>MaintenanceDocumentView</code> screens which operate on
35   * <code>MaintenanceDocument</code> instances
36   *
37   * @author Kuali Rice Team (rice.collab@kuali.org)
38   */
39  @Controller
40  @RequestMapping(value="/initdocinfo")
41  
42  public class InitiatedDocumentInfoController extends UifControllerBase {
43      private static final Logger LOG = org.apache.log4j.Logger.getLogger(InitiatedDocumentInfoController.class);
44  
45      @Override
46      public InitiatedDocumentInfoForm createInitialForm(HttpServletRequest request) {
47  
48          InitiatedDocumentInfoForm initiatedDocumentInfoForm = new InitiatedDocumentInfoForm();
49  
50          return initiatedDocumentInfoForm;
51      }
52  
53      @Override
54      @RequestMapping(method = RequestMethod.GET, params = "methodToCall=start")
55      public ModelAndView start(@ModelAttribute("KualiForm")UifFormBase form, BindingResult result,
56              HttpServletRequest request, HttpServletResponse response) {
57  
58          InitiatedDocumentInfoForm initiatedDocumentInfoForm = (InitiatedDocumentInfoForm) form;
59          return super.start(form, result, request, response);
60      }
61  }