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.ar.document.service;
017
018 import java.util.Collection;
019
020 import org.kuali.kfs.module.ar.businessobject.Customer;
021 import org.kuali.kfs.module.ar.document.CustomerInvoiceDocument;
022
023 public interface CustomerService {
024
025 /**
026 * Return customer by customerNumber
027 * @param customerNumber
028 * @return
029 */
030 public Customer getByPrimaryKey(String customerNumber);
031
032 /**
033 * Return customer by taxNumber
034 * @param customerNumber
035 * @return
036 */
037 public Customer getByTaxNumber(String taxNumber);
038
039 /**
040 * This method builds the new customer number
041 * @param newCustomer the new customer
042 * @return the new customer number
043 */
044 public String getNextCustomerNumber(Customer newCustomer);
045
046 /**
047 * This method gets a customer given his name
048 * @param customerName
049 * @return the customer with the given name
050 */
051 public Customer getCustomerByName(String customerName);
052
053 /**
054 * @param customer
055 * @return
056 */
057 public Collection<CustomerInvoiceDocument> getInvoicesForCustomer(Customer customer);
058
059 /**
060 * @param customerNumber
061 * @return
062 */
063 public Collection<CustomerInvoiceDocument> getInvoicesForCustomer(String customerNumber);
064
065
066 public void createCustomerNote( String customerNumber, String customerNote );
067
068 }