/* * * Copyright 2013 Entando S.r.l. (http://www.entando.com) All rights reserved. * * This file is part of Entando software. * Entando is a free software; * You can redistribute it and/or modify it * under the terms of the GNU General Public License (GPL) as published by the Free Software Foundation; version 2. * * See the file License for the specific language governing permissions * and limitations under the License * * * * Copyright 2013 Entando S.r.l. (http://www.entando.com) All rights reserved. * */ package com.agiletec.plugins.jprssaggregator.aps.system.services.converter; import java.util.List; import java.util.Set; import com.agiletec.aps.system.exception.ApsSystemException; import com.agiletec.plugins.jacms.aps.system.services.content.model.Content; import com.agiletec.plugins.jprssaggregator.aps.system.services.aggregator.ApsAggregatorItem; import com.sun.syndication.feed.synd.SyndEntryImpl; /** * Base interface for the service that builds contents from a rss feed. */ public interface IRssConverterManager { /** * Returns a list of feeds * @param feedType the type of feed. Es: rss_2.0 * @param url The remote URL containing the feed * @return a list of SyndEntryImpl * @throws ApsSystemException if an error occurs */ public List<SyndEntryImpl> getRssEntries(String feedType, String url) throws ApsSystemException; /** * Ping the source and returns a List of contents according with the configuration * @param item the ApsaggregatorItem * @return a List of contents. * @throws ApsSystemException if an error occurs */ public List<Content> getContents(ApsAggregatorItem item) throws ApsSystemException; /** * @return a Set containing the contentType codes that are configured to be * generated by a feed. */ public Set<String> getMappings(); /** * Return the mapping configuration for the given contentType * @param contentType string typecode * @return the AggregatorConfig for the contentType provided as parameter */ public AggregatorConfig getAggregatorConfig(String contentType); /** * Config item name for the service configuration. */ public static final String CONFIG_ITEM = "jprssaggregator"; public static final String RSS_2_0 = "rss_2.0"; }