001 /* 002 * Copyright 2011 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.kfs.module.cg.batch; 017 018 import java.text.MessageFormat; 019 import java.util.ArrayList; 020 import java.util.Date; 021 import java.util.List; 022 023 import org.apache.commons.lang.StringUtils; 024 import org.kuali.kfs.module.cg.CGKeyConstants; 025 import org.kuali.kfs.module.cg.document.ProposalAwardCloseDocument; 026 import org.kuali.kfs.module.cg.service.CloseService; 027 import org.kuali.kfs.sys.KFSConstants; 028 import org.kuali.kfs.sys.batch.AbstractStep; 029 import org.kuali.kfs.sys.context.SpringContext; 030 import org.kuali.rice.kim.bo.Person; 031 import org.kuali.rice.kim.service.IdentityManagementService; 032 import org.kuali.rice.kim.service.KIMServiceLocator; 033 import org.kuali.rice.kim.service.PersonService; 034 import org.kuali.rice.kns.bo.AdHocRoutePerson; 035 import org.kuali.rice.kns.bo.AdHocRouteRecipient; 036 import org.kuali.rice.kns.mail.InvalidAddressException; 037 import org.kuali.rice.kns.mail.MailMessage; 038 import org.kuali.rice.kns.service.KualiConfigurationService; 039 import org.kuali.rice.kns.service.MailService; 040 041 /** 042 * @see CloseService#close() 043 */ 044 public class CloseBatchStep extends AbstractStep { 045 private static org.apache.log4j.Logger LOG = org.apache.log4j.Logger.getLogger(CloseBatchStep.class); 046 047 private CloseService closeService; 048 049 /** 050 * See the class description. 051 * 052 * @see org.kuali.kfs.sys.batch.Step#execute(String, Date) 053 */ 054 public boolean execute(String jobName, Date jobRunDate) { 055 056 return closeService.close(); 057 058 } 059 060 061 /** 062 * Sets the {@link CloseService}. For use by Spring. 063 * 064 * @param closeService The value to be used to assign to the local attribute <code>closeService</code>. 065 */ 066 public void setCloseService(org.kuali.kfs.module.cg.service.CloseService closeService) { 067 this.closeService = closeService; 068 } 069 070 }