View Javadoc

1   /**
2    * Copyright 2004-2012 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.hr.time.missedpunch;
17  
18  import javax.servlet.http.HttpServletRequest;
19  
20  import org.apache.commons.lang.StringUtils;
21  import org.kuali.rice.kns.util.ActionFormUtilMap;
22  import org.kuali.rice.kns.util.WebUtils;
23  import org.kuali.rice.kns.web.struts.form.KualiTransactionalDocumentFormBase;
24  
25  public class MissedPunchForm extends KualiTransactionalDocumentFormBase {
26  
27      private static final long serialVersionUID = 1L;
28      private Boolean assignmentReadOnly = false;
29  
30      @Override
31      public String getBackLocation() {
32          return "Clock.do?methodToCall=closeMissedPunchDoc";
33      }
34  
35      @Override
36      public void populate(HttpServletRequest request) {
37          super.populate(request);
38          ((ActionFormUtilMap) getActionFormUtilMap()).setCacheValueFinderResults(false);
39  
40          if (this.getMethodToCall() == null || StringUtils.isEmpty(this.getMethodToCall())) {
41              setMethodToCall(WebUtils.parseMethodToCall(this, request));
42          }
43      }
44  
45  	public boolean isAssignmentReadOnly() {
46  		return assignmentReadOnly;
47  	}
48  
49  	public void setAssignmentReadOnly(boolean assignmentReadOnly) {
50  		this.assignmentReadOnly = assignmentReadOnly;
51  	}
52  
53  }