001/* 002 * jDTAUS Banking RI Bankleitzahlenverzeichnis 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.ri.blzdirectory; 022 023import java.io.IOException; 024import java.net.URL; 025import java.util.Date; 026 027/** 028 * Bankfile provider interface. 029 * 030 * @author <a href="mailto:cs@schulte.it">Christian Schulte</a> 031 * @version $JDTAUS: BankfileProvider.java 8861 2014-01-10 17:09:50Z schulte $ 032 * 033 * @see BankfileBankleitzahlenVerzeichnis 034 */ 035public interface BankfileProvider 036{ 037 038 /** 039 * Gets the timestamp this provider was last modified. 040 * 041 * @return The timestamp this provider was last modified. 042 * 043 * @throws IOException if getting the last modification timestamp fails. 044 */ 045 long getLastModifiedMillis() throws IOException; 046 047 /** 048 * Gets the number of provided bankfile resources. 049 * 050 * @return The number of provided bankfile resources. 051 * 052 * @throws IOException if getting the number of provided bankfile resources fails. 053 */ 054 int getBankfileCount() throws IOException; 055 056 /** 057 * Gets a bankfile resource. 058 * 059 * @param index The index of the bankfile resource to get. 060 * 061 * @return The bankfile resource at {@code index}. 062 * 063 * @throws IndexOutOfBoundsException if {@code index} is negative or greater or equal to the value returned by 064 * method {@code getBankfileCount()}. 065 * @throws IOException if getting the bankfile resource fails. 066 */ 067 URL getBankfile( int index ) throws IOException; 068 069 /** 070 * Gets the date of validity of a bankfile resource. 071 * 072 * @param index The index of the bankfile resource to get the date of validity of. 073 * 074 * @return The date of validity of the bankfile resource {@code index}. 075 * 076 * @throws IndexOutOfBoundsException if {@code index} is negative or greater or equal to the value returned by 077 * method {@code getBankfileCount()}. 078 * @throws IOException if getting the date of validity fails. 079 */ 080 Date getDateOfValidity( int index ) throws IOException; 081 082 /** 083 * Gets the date of expiration of a bankfile resource. 084 * 085 * @param index The index of the bankfile resource to get the date of expiration of. 086 * 087 * @return The date of expiration of the bankfile resource {@code index}. 088 * 089 * @throws IndexOutOfBoundsException if {@code index} is negative or greater or equal to the value returned by 090 * method {@code getBankfileCount()}. 091 * @throws IOException if getting the date of expiration fails. 092 */ 093 Date getDateOfExpiration( int index ) throws IOException; 094 095 /** 096 * Gets the format of the bankfile resource. 097 * 098 * @param index The index of the bankfile resource to get the format of. 099 * 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}