001 /**
002 * Copyright 2004-2013 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.lm.workflow;
017
018 import org.kuali.hr.lm.leaveblock.LeaveBlock;
019 import org.kuali.hr.time.service.base.TkServiceLocator;
020 import org.kuali.rice.krad.bo.PersistableBusinessObjectBase;
021 import org.kuali.rice.krad.document.TransactionalDocumentBase;
022
023 public class LeaveRequestDocument extends TransactionalDocumentBase {
024
025 public static final String LEAVE_REQUEST_DOCUMENT_TYPE = "LeaveRequestDocument";
026 private String lmLeaveBlockId;
027 private String actionCode;
028 private String description;
029
030 public LeaveRequestDocument() { }
031
032 public LeaveRequestDocument(String leaveBlockId) {
033 this.lmLeaveBlockId = leaveBlockId;
034 }
035
036 @Override
037 public boolean getAllowsCopy() {
038 return false;
039 }
040
041 public String getLmLeaveBlockId() {
042 return lmLeaveBlockId;
043 }
044
045 public void setLmLeaveBlockId(String lmLeaveBlockId) {
046 this.lmLeaveBlockId = lmLeaveBlockId;
047 }
048
049 public String getActionCode() {
050 return actionCode;
051 }
052
053 public void setActionCode(String actionCode) {
054 this.actionCode = actionCode;
055 }
056
057 public String getDescription() {
058 return description;
059 }
060
061 public void setDescription(String description) {
062 this.description = description;
063 }
064
065 public LeaveBlock getLeaveBlock() {
066 return getLmLeaveBlockId() == null ? null : TkServiceLocator.getLeaveBlockService().getLeaveBlock(getLmLeaveBlockId());
067 }
068 }