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.financial.service;
17:
18: import java.util.List;
19:
20: import org.kuali.core.bo.user.UniversalUser;
21: import org.kuali.module.financial.document.CashReceiptDocument;
22:
23: /**
24: *
25: * This service interface defines the methods that a CashReceiptService implementation must provide.
26: */
27: public interface CashReceiptService {
28:
29: /**
30: * This method retrieves a cash receipt verification unit associated with the given campus code.
31: *
32: * @param campusCode The campus code to use to look up the cash receipt verification unit.
33: * @return Cash receipt verification unit workgroupName associated with the given campusCode.
34: */
35: public String getCashReceiptVerificationUnitForCampusCode(
36: String campusCode);
37:
38: /**
39: * This method retrieves a campus code associated with the given cash receipt verification unit.
40: *
41: * @param unitName The cash receipt verification unit name to use to look up the campus code.
42: * @return The campusCode associated with the given cash receipt verification unit.
43: */
44: public String getCampusCodeForCashReceiptVerificationUnit(
45: String unitName);
46:
47: /**
48: * This method retrieves the cash receipt verification unit for the given user.
49: *
50: * TODO: change this to do something other than return null (which will require updating CashReceiptDocumentAuthorizer, since
51: * that's the one place I'm sure that returning a null is interpreted to mean that a user is a member of no verificationUnit)
52: *
53: * @param user The user to retrieve the cash receipt verification unit for.
54: * @return Cash receipt verificationUnit workgroupName associated with the given user; null if the user is not a member of any verification unit workgroup.
55: */
56: public String getCashReceiptVerificationUnitForUser(
57: UniversalUser user);
58:
59: /**
60: * Returns a List of CashReceiptDocuments for the given verification unit whose status matches the given status code.
61: *
62: * @param verificationUnit A verification unit for a cash receipt.
63: * @param statusCode A cash receipt status code.
64: * @return List of CashReceiptDocument instances.
65: * @throws IllegalArgumentException Thrown if verificationUnit is blank
66: * @throws IllegalArgumentException Thrown if statusCode is blank
67: */
68: public List getCashReceipts(String verificationUnit,
69: String statusCode);
70:
71: /**
72: * Returns a List of CashReceiptDocuments for the given verificationUnit whose status matches any of the status codes in the
73: * given String[].
74: *
75: * @param verificationUnit A verification unit for a cash receipt.
76: * @param statii A collection of potential cash receipt document statuses.
77: * @return List of CashReceiptDocument instances.
78: * @throws IllegalArgumentException Thrown if verificationUnit is blank
79: * @throws IllegalArgumentException Thrown if statii is null or empty or contains any blank statusCodes
80: */
81: public List getCashReceipts(String verificationUnit, String[] statii);
82:
83: /**
84: * This adds the currency and coin details associated with this Cash Receipt document to the proper cash drawer and to the
85: * cumulative Cash Receipt details for the document which opened the cash drawer.
86: *
87: * @param crDoc The cash receipt document with cash details to add to the cash drawer.
88: */
89: public void addCashDetailsToCashDrawer(CashReceiptDocument crDoc);
90: }
|