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.document;
017    
018    import java.sql.Date;
019    
020    import org.kuali.kfs.sys.document.FinancialSystemTransactionalDocumentBase;
021    
022    /**
023     * Instances of CloseDocument indicate dates on which the {@link CloseBatchStep} should be executed.
024     */
025    public class CloseDocument extends FinancialSystemTransactionalDocumentBase {
026    
027        protected Date userInitiatedCloseDate;
028        protected Date closeOnOrBeforeDate;
029    
030        /**
031         * The {@link CloseBatchStep} will close out {@link Proposal}s and {@link Award}s not yet closed and created before the date
032         * returned from this method.
033         * 
034         * @return the date to use for comparison. See method description.
035         */
036        public Date getUserInitiatedCloseDate() {
037            return userInitiatedCloseDate;
038        }
039    
040        /**
041         * The {@link CloseBatchStep} will close out {@link Proposal}s and {@link Award}s not yet closed and created before the date
042         * passed into this method.
043         * 
044         * @param closeOnOrBeforeDate the date to use for comparison. See method description.
045         */
046        public void setUserInitiatedCloseDate(Date userInitiatedCloseDate) {
047            this.userInitiatedCloseDate = userInitiatedCloseDate;
048        }
049    
050        /**
051         * Gets the date on which this instance should trigger the CloseBatchStep to close out {@link {Proposal}s and {@link Award}s.
052         * 
053         * @return the date on which this instance should trigger the CloseBatchStep to close out {@link {Proposal}s and {@link Award}s.
054         */
055        public Date getCloseOnOrBeforeDate() {
056            return closeOnOrBeforeDate;
057        }
058    
059        /**
060         * Sets the date on which this instance should trigger the CloseBatchStep to close out {@link {Proposal}s and {@link Award}s.
061         * 
062         * @param userInitiatedCloseDate the date on which this instance should trigger the CloseBatchStep to close out
063         *        {@link {Proposal}s and {@link Award}s.
064         */
065        public void setCloseOnOrBeforeDate(Date closeOnOrBeforeDate) {
066            this.closeOnOrBeforeDate = closeOnOrBeforeDate;
067        }
068    
069    }