View Javadoc
1   /**
2    * Copyright 2005-2016 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.kns.web.struts.form;
17  
18  import javax.servlet.http.HttpServletRequest;
19  
20  import org.apache.commons.lang.StringUtils;
21  import org.apache.struts.action.ActionMapping;
22  import org.kuali.rice.krad.util.KRADConstants;
23  
24  /**
25   * Feedback form which is used to collect feedback from a user and
26   * then email it to a feedback mailing list
27   *
28   * @deprecated KNS Struts deprecated, use KRAD and the Spring MVC framework.
29   */
30  @Deprecated
31  public class KualiFeedbackHandlerForm extends KualiForm {
32  
33  	private static final long serialVersionUID = -7641833777580490471L;
34  
35  	private boolean cancel = false;
36  	private String description;
37  	private String documentId = ""; 
38  	private String componentName;
39  
40  	/**
41  	 * @see org.kuali.rice.kns.web.struts.pojo.PojoForm#populate(javax.servlet.http.HttpServletRequest)
42  	 */
43  	@Override
44  	public void populate(HttpServletRequest request) {
45  		super.populate(request);
46  		// ie explorer needs this.
47  		if(StringUtils.isNotBlank(request.getParameter(KRADConstants.CANCEL_METHOD + ".x")) &&
48             StringUtils.isNotBlank(request.getParameter(KRADConstants.CANCEL_METHOD + ".y"))){
49  			    this.setCancel(true);
50  		}                
51  	}
52  
53  	public void reset(ActionMapping mapping, HttpServletRequest request) {
54  
55  		this.setMethodToCall(null);
56  		this.setRefreshCaller(null);
57  		this.setAnchor(null);
58  		this.setCurrentTabIndex(0);
59  
60  		this.cancel = false;
61  		this.documentId = null;
62  		this.description = null;
63  		this.componentName = null;
64  	}
65  
66  	public boolean isCancel() {
67  		return cancel;
68  	}
69  
70  	public void setCancel(boolean cancel) {
71  		this.cancel = cancel;
72  	}
73  
74  	public String getDescription() {
75  		return description;
76  	}
77  
78  	public void setDescription(String description) {
79  		this.description = description;
80  	}
81  
82  	public String getDocumentId() {
83  		return documentId;
84  	}
85  
86  	public void setDocumentId(String documentId) {
87  		this.documentId = documentId;
88  	}
89  
90  	public String getComponentName() {
91  		return componentName;
92  	}
93  
94  	public void setComponentName(String componentName) {
95  		this.componentName = componentName;
96  	}
97  }