package org.pegadi.server;
import org.pegadi.model.Publication;
import java.util.List;
/**
* @author Marvin B. Lillehaug <lillehau@underdusken.no>
*/
public interface PublicationServer {
/**
* returns one publication
*/
public Publication getPublicationByID(int ID);
/**
* Returns all years which have publications.
*
* @return an array of <code>int</code>'s
*/
public List<Integer> getYearsWithPublications() ;
/**
* returns all the publications scheduled for releasing a given year
*/
public List<Publication> getPublicationsByYear(int year) ;
/**
* this method returns an array of Publications.
* Active publications are defined as having a release-date higher
* than the current date.
*/
public List<Publication> getActivePublications();
/**
* Saves or updates a publication in persistent storage. If the ID is less than or equals to zero,
* it is created, else it is updated.
*
* @return ID of created publication
*/
public int saveOrUpdatePublication(Publication pub);
}