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