01: /*
02: * Copyright 2006-2007 The Kuali Foundation.
03: *
04: * Licensed under the Educational Community License, Version 1.0 (the "License");
05: * you may not use this file except in compliance with the License.
06: * You may obtain a copy of the License at
07: *
08: * http://www.opensource.org/licenses/ecl1.php
09: *
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.module.labor.service;
17:
18: import java.util.Collection;
19: import java.util.Iterator;
20: import java.util.Map;
21:
22: import org.kuali.module.chart.bo.Account;
23: import org.kuali.module.labor.bo.LaborLedgerPendingEntry;
24: import org.kuali.module.labor.document.LaborLedgerPostingDocument;
25:
26: /**
27: * Defines methods that must be implemented by classes providing a LaborLedgerPendingEntryServiceImpl.
28: */
29: public interface LaborLedgerPendingEntryService {
30:
31: /**
32: * Does the given account have any labor ledger entries? It is necessary to check this before closing an account.
33: *
34: * @param account
35: * @return
36: */
37: public boolean hasPendingLaborLedgerEntry(Account account);
38:
39: /**
40: * determine if there is any pending entry that has not been processed for the given criteria
41: *
42: * @param fieldValues the given search criteria
43: * @return true if there is one or more pending entries that have not been processed for the given criteria; otherwise, false
44: */
45: public boolean hasPendingLaborLedgerEntry(Map fieldValues);
46:
47: /**
48: * This method generates labor ledger pending entries.
49: *
50: * @param document
51: * @return
52: */
53: public boolean generateLaborLedgerPendingEntries(
54: LaborLedgerPostingDocument document);
55:
56: /**
57: * Get all entries that have been approved but still in pending entry queue
58: *
59: * @return all approved pending entries
60: */
61: public Iterator<LaborLedgerPendingEntry> findApprovedPendingLedgerEntries();
62:
63: /**
64: * Delete the pending entries with the given financial document approved code
65: *
66: * @param approvedCode
67: */
68: public void deleteByFinancialDocumentApprovedCode(
69: String financialDocumentApprovedCode);
70:
71: /**
72: * This method checks for pending ledger entries that match the current balance inquiry
73: *
74: * @param emplid
75: * @return
76: */
77: public Iterator findPendingLedgerEntriesForLedgerBalance(
78: Map fieldValues, boolean isApproved);
79:
80: /**
81: * Use fieldValues to create a query for matching records of <code>{@link LaborLedgerPendingEntry}</code> instances
82: *
83: * @param fieldValues properties to match against
84: * @param isApproved Retrieve approved or unapproved entries?
85: */
86: public Collection findPendingEntries(Map fieldValues,
87: boolean isApproved);
88:
89: /**
90: * delete pending entries with the given document header id
91: *
92: * @param documentHeaderId
93: */
94: public void delete(String documentHeaderId);
95: }
|