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.batch.web;
017    
018    import java.util.ArrayList;
019    import java.util.LinkedList;
020    import java.util.List;
021    
022    import org.kuali.hr.time.base.web.TkForm;
023    import org.kuali.hr.time.batch.BatchJobEntry;
024    import org.kuali.hr.time.util.TkConstants;
025    
026    public class BatchJobActionForm extends TkForm {
027    
028        private static final long serialVersionUID = 385904747462568474L;
029        
030        private List<String> batchJobNames = new ArrayList<String>();
031        private List<String> batchJobStatuses = new ArrayList<String>();
032        private List<BatchJobEntry> batchJobEntries = new LinkedList<BatchJobEntry>();
033        private String batchJobId;
034        private String documentId;
035        private String principalId;
036        private String hrPyCalendarEntryId;
037        private String ipAddress;
038        private String batchJobName;
039        private String batchJobEntryStatus;
040        private String tkBatchJobEntryId;
041        private String ipToChange;
042        private String selectedBatchJob;
043    
044        public List<String> getBatchJobNames() {
045            batchJobNames.add(TkConstants.BATCH_JOB_NAMES.INITIATE);
046            batchJobNames.add(TkConstants.BATCH_JOB_NAMES.APPROVE);
047            batchJobNames.add(TkConstants.BATCH_JOB_NAMES.PAY_PERIOD_END);
048            batchJobNames.add(TkConstants.BATCH_JOB_NAMES.SUPERVISOR_APPROVAL);
049            batchJobNames.add(TkConstants.BATCH_JOB_NAMES.BATCH_APPROVE_MISSED_PUNCH);
050    
051            return batchJobNames;
052        }
053    
054        public void setBatchJobNames(List<String> batchJobs) {
055            this.batchJobNames = batchJobs;
056        }
057    
058        public List<String> getBatchJobStatuses() {
059            batchJobStatuses.add(TkConstants.BATCH_JOB_ENTRY_STATUS.RUNNING);
060            batchJobStatuses.add(TkConstants.BATCH_JOB_ENTRY_STATUS.SCHEDULED);
061            batchJobStatuses.add(TkConstants.BATCH_JOB_ENTRY_STATUS.FINISHED);
062    
063            return batchJobStatuses;
064        }
065    
066        public void setBatchJobStatuses(List<String> batchJobStatuses) {
067            this.batchJobStatuses = batchJobStatuses;
068        }
069    
070        public String getBatchJobId() {
071            return batchJobId;
072        }
073    
074        public void setBatchJobId(String batchJobId) {
075            this.batchJobId = batchJobId;
076        }
077    
078        public String getDocumentId() {
079            return documentId;
080        }
081    
082        public void setDocumentId(String documentId) {
083            this.documentId = documentId;
084        }
085    
086        public String getPrincipalId() {
087            return principalId;
088        }
089    
090        public void setPrincipalId(String principalId) {
091            this.principalId = principalId;
092        }
093    
094        public String getHrPyCalendarEntryId() {
095            return hrPyCalendarEntryId;
096        }
097    
098        public void setHrPyCalendarEntryId(String hrPyCalendarEntryId) {
099            this.hrPyCalendarEntryId = hrPyCalendarEntryId;
100        }
101    
102        public String getIpAddress() {
103            return ipAddress;
104        }
105    
106        public void setIpAddress(String ipAddress) {
107            this.ipAddress = ipAddress;
108        }
109    
110        public String getBatchJobName() {
111            return batchJobName;
112        }
113    
114        public void setBatchJobName(String batchJobName) {
115            this.batchJobName = batchJobName;
116        }
117    
118        public String getBatchJobEntryStatus() {
119            return batchJobEntryStatus;
120        }
121    
122        public void setBatchJobEntryStatus(String batchJobEntryStatus) {
123            this.batchJobEntryStatus = batchJobEntryStatus;
124        }
125    
126        public List<BatchJobEntry> getBatchJobEntries() {
127            return batchJobEntries;
128        }
129    
130        public void setBatchJobEntries(List<BatchJobEntry> batchJobEntries) {
131            this.batchJobEntries = batchJobEntries;
132        }
133    
134        public String getTkBatchJobEntryId() {
135            return tkBatchJobEntryId;
136        }
137    
138        public void setTkBatchJobEntryId(String tkBatchJobEntryId) {
139            this.tkBatchJobEntryId = tkBatchJobEntryId;
140        }
141    
142        public String getIpToChange() {
143            return ipToChange;
144        }
145    
146        public void setIpToChange(String ipToChange) {
147            this.ipToChange = ipToChange;
148        }
149    
150        public String getSelectedBatchJob() {
151            return selectedBatchJob;
152        }
153    
154        public void setSelectedBatchJob(String selectedBatchJob) {
155            this.selectedBatchJob = selectedBatchJob;
156        }
157    }