View Javadoc

1   /**
2    * Copyright 2004-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.hr.lm.workflow;
17  
18  import org.kuali.hr.lm.leaveblock.LeaveBlock;
19  import org.kuali.hr.time.service.base.TkServiceLocator;
20  import org.kuali.rice.krad.bo.PersistableBusinessObjectBase;
21  import org.kuali.rice.krad.document.TransactionalDocumentBase;
22  
23  public class LeaveRequestDocument extends TransactionalDocumentBase {
24  
25      public static final String LEAVE_REQUEST_DOCUMENT_TYPE = "LeaveRequestDocument";
26      private String lmLeaveBlockId;
27      private String actionCode;
28      private String description;
29  
30      public LeaveRequestDocument() { }
31  
32      public LeaveRequestDocument(String leaveBlockId) {
33  		this.lmLeaveBlockId = leaveBlockId;
34  	}
35  
36      @Override
37      public boolean getAllowsCopy() {
38          return false;
39      }
40  
41      public String getLmLeaveBlockId() {
42          return lmLeaveBlockId;
43      }
44  
45      public void setLmLeaveBlockId(String lmLeaveBlockId) {
46          this.lmLeaveBlockId = lmLeaveBlockId;
47      }
48  
49      public String getActionCode() {
50          return actionCode;
51      }
52  
53      public void setActionCode(String actionCode) {
54          this.actionCode = actionCode;
55      }
56  
57      public String getDescription() {
58          return description;
59      }
60  
61      public void setDescription(String description) {
62          this.description = description;
63      }
64  
65      public LeaveBlock getLeaveBlock() {
66          return getLmLeaveBlockId() == null ? null : TkServiceLocator.getLeaveBlockService().getLeaveBlock(getLmLeaveBlockId());
67      }
68  }