001 /** 002 * Copyright 2004-2012 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 */ 016 package org.kuali.hr.time.missedpunch; 017 018 import javax.servlet.http.HttpServletRequest; 019 020 import org.apache.commons.lang.StringUtils; 021 import org.kuali.rice.kns.util.ActionFormUtilMap; 022 import org.kuali.rice.kns.util.WebUtils; 023 import org.kuali.rice.kns.web.struts.form.KualiTransactionalDocumentFormBase; 024 025 public class MissedPunchForm extends KualiTransactionalDocumentFormBase { 026 027 private static final long serialVersionUID = 1L; 028 private Boolean assignmentReadOnly = false; 029 030 @Override 031 public String getBackLocation() { 032 return "Clock.do?methodToCall=closeMissedPunchDoc"; 033 } 034 035 @Override 036 public void populate(HttpServletRequest request) { 037 super.populate(request); 038 ((ActionFormUtilMap) getActionFormUtilMap()).setCacheValueFinderResults(false); 039 040 if (this.getMethodToCall() == null || StringUtils.isEmpty(this.getMethodToCall())) { 041 setMethodToCall(WebUtils.parseMethodToCall(this, request)); 042 } 043 } 044 045 public boolean isAssignmentReadOnly() { 046 return assignmentReadOnly; 047 } 048 049 public void setAssignmentReadOnly(boolean assignmentReadOnly) { 050 this.assignmentReadOnly = assignmentReadOnly; 051 } 052 053 }