001: /*
002: * Copyright 2007 The Kuali Foundation.
003: *
004: * Licensed under the Educational Community License, Version 1.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/ecl1.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.module.labor.service;
017:
018: import java.util.Collection;
019: import java.util.Map;
020:
021: import org.kuali.core.web.ui.Field;
022: import org.kuali.core.web.ui.Row;
023: import org.kuali.module.labor.bo.AccountStatusCurrentFunds;
024: import org.kuali.module.labor.bo.LedgerBalance;
025: import org.kuali.module.labor.bo.LedgerEntry;
026:
027: /**
028: * The LaborInquiryOptionsService interface provides hooks for Pending Ledger and Consilidation options for balance inquiries.
029: */
030: public interface LaborInquiryOptionsService {
031:
032: /**
033: * The expected name of the consolidation option field name
034: *
035: * @return String
036: */
037: public String getConsolidationFieldName();
038:
039: /**
040: * Examine a collection of <code>{@link Row}</code> instances for the consolidation field
041: *
042: * @param rows
043: * @return Field
044: */
045: public Field getConsolidationField(Collection<Row> rows);
046:
047: /**
048: * Get the current state of the consolidation option
049: *
050: * @return String
051: */
052: public String getConsolidationOption(Map fieldValues);
053:
054: /**
055: * This method tests if the user selects to see the details or consolidated results
056: *
057: * @param fieldValues the map containing the search fields and values
058: * @param rows
059: * @return true if consolidation is selected and subaccount is not specified
060: */
061: public boolean isConsolidationSelected(Map fieldValues,
062: Collection<Row> rows);
063:
064: /**
065: * This method tests if the user selects to see the details or consolidated results
066: *
067: * @param fieldValues the map containing the search fields and values
068: * @return true if consolidation is selected and subaccount is not specified
069: */
070: public boolean isConsolidationSelected(Map fieldValues);
071:
072: /**
073: * update a given balance collection with the pending entry obtained from the given field values and pending entry option
074: *
075: * @param balanceCollection the given ledger balance collection
076: * @param fieldValues the given field values
077: * @param pendingEntryOption the given pending entry option: all, approved or none
078: * @param isConsolidated indicate if the collection balances have been consolidated
079: * @see org.kuali.module.labor.bo.LedgerBalance
080: */
081: public void updateLedgerBalanceByPendingLedgerEntry(
082: Collection<LedgerBalance> balanceCollection,
083: Map fieldValues, String pendingEntryOption,
084: boolean isConsolidated);
085:
086: /**
087: * update a given balance collection with the pending entry obtained from the given field values and pending entry option
088: *
089: * @param balanceCollection the given ledger balance collection
090: * @param fieldValues the given field values
091: * @param pendingEntryOption the given pending entry option: all, approved or none
092: * @param isConsolidated indicate if the collection balances have been consolidated
093: * @see org.kuali.module.labor.bo.LedgerBalance
094: */
095: public void updateCurrentFundsByPendingLedgerEntry(
096: Collection<AccountStatusCurrentFunds> balanceCollection,
097: Map fieldValues, String pendingEntryOption,
098: boolean isConsolidated);
099:
100: /**
101: * update a given ledger entry collection with the pending entry obtained from the given field values and pending entry option
102: *
103: * @param entryCollection the given ledger entry collection
104: * @param fieldValues the given field values
105: * @param pendingEntryOption the given pending entry option: all, approved or none
106: * @see org.kuali.module.labor.bo.LedgerEntry
107: */
108: public void updateLedgerEntryByPendingLedgerEntry(
109: Collection<LedgerEntry> entryCollection, Map fieldValues,
110: String pendingEntryOption);
111:
112: /**
113: * Get the Pending Entry Option selected
114: *
115: * @param fieldValues
116: * @return String
117: */
118: public String getSelectedPendingEntryOption(Map fieldValues);
119: }
|