All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.spincast.website.services.NewsService Maven / Gradle / Ivy

There is a newer version: 2.2.0
Show newest version
package org.spincast.website.services;

import java.util.List;

import org.spincast.website.models.NewsEntriesAndTotalNbr;
import org.spincast.website.models.NewsEntry;

/**
 * Spincast News service.
 */
public interface NewsService {

    /**
     * Gets all the news entries.
     * 
     * @param ascOrder If true, returns the entries by their
     * publication date in ascending order. Otherwise, in descending
     * order.
     */
    public List getNewsEntries(boolean ascOrder);

    /**
     * Gets news entries.
     * 
     * @param startPos The position of the first entry to return. The first element
     * is "1", not "0".
     * @param endPos The position of the last entry to return (inclusive).
     * 
     * @param ascOrder If true, returns the entries by their
     * publication date in ascending order. Otherwise, in descending
     * order.
     * 
     * @return the news entries list and the total number of entries in the 
     * repository.
     */
    public NewsEntriesAndTotalNbr getNewsEntries(int startPos, int endPos, boolean ascOrder);

    /**
     * Gets a specific news entry.
     * 
     * @return the news entry or null if not found.
     */
    public NewsEntry getNewsEntry(long newsId);

    /**
     * Gets the news entries for the RSS feed.
     */
    public List getFeedNewsEntries();

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy