1 /* 2 * jDTAUS Banking RI Bankleitzahlenverzeichnis 3 * Copyright (C) 2005 Christian Schulte 4 * <cs@schulte.it> 5 * 6 * This library is free software; you can redistribute it and/or 7 * modify it under the terms of the GNU Lesser General Public 8 * License as published by the Free Software Foundation; either 9 * version 2.1 of the License, or any later version. 10 * 11 * This library is distributed in the hope that it will be useful, 12 * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 * Lesser General Public License for more details. 15 * 16 * You should have received a copy of the GNU Lesser General Public 17 * License along with this library; if not, write to the Free Software 18 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 19 * 20 */ 21 package org.jdtaus.banking.ri.blzdirectory; 22 23 import java.io.IOException; 24 import java.net.URL; 25 import java.util.Date; 26 27 /** 28 * Bankfile provider interface. 29 * 30 * @author <a href="mailto:cs@schulte.it">Christian Schulte</a> 31 * @version $JDTAUS: BankfileProvider.java 8861 2014-01-10 17:09:50Z schulte $ 32 * 33 * @see BankfileBankleitzahlenVerzeichnis 34 */ 35 public interface BankfileProvider 36 { 37 38 /** 39 * Gets the timestamp this provider was last modified. 40 * 41 * @return The timestamp this provider was last modified. 42 * 43 * @throws IOException if getting the last modification timestamp fails. 44 */ 45 long getLastModifiedMillis() throws IOException; 46 47 /** 48 * Gets the number of provided bankfile resources. 49 * 50 * @return The number of provided bankfile resources. 51 * 52 * @throws IOException if getting the number of provided bankfile resources fails. 53 */ 54 int getBankfileCount() throws IOException; 55 56 /** 57 * Gets a bankfile resource. 58 * 59 * @param index The index of the bankfile resource to get. 60 * 61 * @return The bankfile resource at {@code index}. 62 * 63 * @throws IndexOutOfBoundsException if {@code index} is negative or greater or equal to the value returned by 64 * method {@code getBankfileCount()}. 65 * @throws IOException if getting the bankfile resource fails. 66 */ 67 URL getBankfile( int index ) throws IOException; 68 69 /** 70 * Gets the date of validity of a bankfile resource. 71 * 72 * @param index The index of the bankfile resource to get the date of validity of. 73 * 74 * @return The date of validity of the bankfile resource {@code index}. 75 * 76 * @throws IndexOutOfBoundsException if {@code index} is negative or greater or equal to the value returned by 77 * method {@code getBankfileCount()}. 78 * @throws IOException if getting the date of validity fails. 79 */ 80 Date getDateOfValidity( int index ) throws IOException; 81 82 /** 83 * Gets the date of expiration of a bankfile resource. 84 * 85 * @param index The index of the bankfile resource to get the date of expiration of. 86 * 87 * @return The date of expiration of the bankfile resource {@code index}. 88 * 89 * @throws IndexOutOfBoundsException if {@code index} is negative or greater or equal to the value returned by 90 * method {@code getBankfileCount()}. 91 * @throws IOException if getting the date of expiration fails. 92 */ 93 Date getDateOfExpiration( int index ) throws IOException; 94 95 /** 96 * Gets the format of the bankfile resource. 97 * 98 * @param index The index of the bankfile resource to get the format of. 99 * 100 * @return The format of the bankfile resource. 101 * 102 * @throws IOException if getting the format of the bankfile resource fails. 103 * 104 * @since 1.15 105 * @see org.jdtaus.banking.util.BankleitzahlenDatei#JUNE_2006_FORMAT 106 * @see org.jdtaus.banking.util.BankleitzahlenDatei#JUNE_2013_FORMAT 107 */ 108 int getFormat( int index ) throws IOException; 109 110 }