001/* 002 * jDTAUS Banking API 003 * Copyright (C) 2005 Christian Schulte 004 * <cs@schulte.it> 005 * 006 * This library is free software; you can redistribute it and/or 007 * modify it under the terms of the GNU Lesser General Public 008 * License as published by the Free Software Foundation; either 009 * version 2.1 of the License, or any later version. 010 * 011 * This library is distributed in the hope that it will be useful, 012 * but WITHOUT ANY WARRANTY; without even the implied warranty of 013 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 014 * Lesser General Public License for more details. 015 * 016 * You should have received a copy of the GNU Lesser General Public 017 * License along with this library; if not, write to the Free Software 018 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 019 * 020 */ 021package org.jdtaus.banking; 022 023import java.util.Date; 024 025/** 026 * Directory of german transaction types. 027 * <p>Example: Getting the jDTAUS Banking SPI implementation.<br/><pre> 028 * TextschluesselVerzeichnis directory = 029 * (TextschluesselVerzeichnis) ContainerFactory.getContainer(). 030 * getObject( TextschluesselVerzeichnis.class ); 031 * </pre></p> 032 * 033 * @author <a href="mailto:cs@schulte.it">Christian Schulte</a> 034 * @version $JDTAUS: TextschluesselVerzeichnis.java 8661 2012-09-27 11:29:58Z schulte $ 035 * 036 * @see org.jdtaus.core.container.Container 037 */ 038public interface TextschluesselVerzeichnis 039{ 040 041 /** 042 * Gets all Textschlüssel instances of the directory. 043 * 044 * @return All Textschlüssel instances of the directory. 045 */ 046 Textschluessel[] getTextschluessel(); 047 048 /** 049 * Gets a Textschlüssel instance of the directory. 050 * 051 * @param key The key of the Textschlüssel to return. 052 * @param extension The extension of the Textschlüssel to return. 053 * 054 * @return The Textschlüssel identified by {@code key} and {@code extension} or {@code null} if nothing is known 055 * about {@code key} and {@code extension}. 056 * 057 * @throws IllegalArgumentException if {@code key} or {@code extension} is negative, or {@code key} is greater than 058 * {@code 99} or {@code extension} is greater than {@code 999}. 059 */ 060 Textschluessel getTextschluessel( int key, int extension ); 061 062 /** 063 * Gets a Textschlüssel instance of the directory for a given date. 064 * 065 * @param key The key of the Textschlüssel to return. 066 * @param extension The extension of the Textschlüssel to return. 067 * @param date The date of validity of the Textschlüssel to return. 068 * 069 * @return The Textschlüssel identified by {@code key} and {@code extension} valid at {@code date} or {@code null} 070 * if nothing is known about {@code key} and {@code extension} at {@code date}. 071 * 072 * @throws IllegalArgumentException if {@code key} or {@code extension} is negative, or {@code key} is greater than 073 * {@code 99} or {@code extension} is greater than {@code 999}. 074 * @throws NullPointerException if {@code date} is {@code null}. 075 * 076 * @see Textschluessel#isValidAt(java.util.Date) 077 */ 078 Textschluessel getTextschluessel( int key, int extension, Date date ); 079 080 /** 081 * Searches the directory for Textschlüssel instances. 082 * 083 * @param debit Value of property {@code debit} of the Textschlüssel instances to return. 084 * @param remittance Value of property {@code remittance} of the Textschlüssel instances to return. 085 * 086 * @return All Textschlüssel instances from the directory with property {@code debit} equal to the {@code debit} 087 * argument and property {@code remittance} equal to the {@code remittance} argument. 088 * 089 * @deprecated Replaced by {@link #searchTextschluessel(java.lang.Boolean, java.lang.Boolean, java.util.Date) }. 090 */ 091 Textschluessel[] search( boolean debit, boolean remittance ); 092 093 /** 094 * Searches the directory for Textschlüssel instances for a given date. 095 * 096 * @param debit Value of property {@code debit} of the Textschlüssel instances to return. 097 * @param remittance Value of property {@code remittance} of the Textschlüssel instances to return. 098 * @param date The date of validity of the Textschlüssel to return. 099 * 100 * @return All Textschlüssel instances from the directory with property {@code debit} equal to the {@code debit} 101 * argument and property {@code remittance} equal to the {@code remittance} argument valid at {@code date}. 102 * 103 * @throws NullPointerException if {@code date} is {@code null}. 104 * 105 * @deprecated Replaced by {@link #searchTextschluessel(java.lang.Boolean, java.lang.Boolean, java.util.Date)}. 106 */ 107 Textschluessel[] search( boolean debit, boolean remittance, Date date ); 108 109 /** 110 * Searches the directory for Textschlüssel instances. 111 * 112 * @param debit Value of property {@code debit} of the Textschlüssel instances to return; {@code null} to ignore 113 * property {@code debit} during searching. 114 * @param remittance Value of property {@code remittance} of the Textschlüssel instances to return; {@code null} 115 * to ignore property {@code remittance} during searching. 116 * @param date The date of validity of the Textschlüssel to return; {@code null} to ignore properties 117 * {@code validFrom} and {@code validTo} during searching. 118 * 119 * @return All Textschlüssel instances matching the given criteria. 120 */ 121 Textschluessel[] searchTextschluessel( Boolean debit, Boolean remittance, Date date ); 122 123}