package se.jonas.xml.locator.data.source.reader;

import java.io.File;
import java.io.UnsupportedEncodingException;
import java.util.List;

import javax.xml.bind.JAXBException;

import se.jonas.xml.locator.data.source.domain.Domain;
import se.jonas.xml.locator.data.source.domain.Locator;
import se.jonas.xml.locator.data.source.domain.LocatorHolder;

public interface Reader<T extends Domain> {
	T read(Long id, File file) throws JAXBException,
			UnsupportedEncodingException;

	T findById(Long id) throws JAXBException;
	List<T> findAll() throws JAXBException;
	HolderReader<? extends Locator, ? extends LocatorHolder<? extends Locator>> getLocatorReader();
}
