fr.paris.lutece.plugins.rss.service
Class RssGeneratorService

java.lang.Object
  extended by fr.paris.lutece.plugins.rss.service.RssGeneratorService

public final class RssGeneratorService
extends Object

This class provides utilities to create RSS documents.


Field Summary
static String PROPERTY_RSS_STORAGE_FOLDER_PATH
          The path which points the rss files are stored
static String PROPERTY_STORAGE_DIRECTORY_NAME
           
 
Method Summary
static void createFileRss(String strRssFileName, String strRssDocument)
          Creates the pushrss file in the directory
static String createRssDocument(int nIdPortlet, String strRssFileDescription, String strEncoding, String strFeedType, int nMaxItems)
          Creates the push RSS document corresponding to the given portlet
static String createRssDocument(int nIdPortlet, String strRssFileDescription, String strEncoding, String strFeedType, int nMaxItems, javax.servlet.http.HttpServletRequest request)
          Creates the push RSS document corresponding to the given portlet
static String createRssDocument(List listRssItem, String strRssFileDescription)
          Creates the push RSS document corresponding to the given portlet
static void deleteFileRss(String strRssFileName, String strPluginName)
          Deletes the pushrss file in the directory
static String generateAllRss()
          Regenerate all Rss files in the file system
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PROPERTY_RSS_STORAGE_FOLDER_PATH

public static final String PROPERTY_RSS_STORAGE_FOLDER_PATH
The path which points the rss files are stored

See Also:
Constant Field Values

PROPERTY_STORAGE_DIRECTORY_NAME

public static final String PROPERTY_STORAGE_DIRECTORY_NAME
See Also:
Constant Field Values
Method Detail

createRssDocument

public static String createRssDocument(int nIdPortlet,
                                       String strRssFileDescription,
                                       String strEncoding,
                                       String strFeedType,
                                       int nMaxItems)
Creates the push RSS document corresponding to the given portlet

Parameters:
nIdPortlet - the portlet id for wich the file is created
strRssFileDescription - the Description
strEncoding - encoding
strFeedType - feed type
nMaxItems - max items
Returns:
String the XML content of the RSS document

createRssDocument

public static String createRssDocument(int nIdPortlet,
                                       String strRssFileDescription,
                                       String strEncoding,
                                       String strFeedType,
                                       int nMaxItems,
                                       javax.servlet.http.HttpServletRequest request)
Creates the push RSS document corresponding to the given portlet

Parameters:
nIdPortlet - the portlet id for wich the file is created
strRssFileDescription - the Description
strEncoding - encoding
strFeedType - feed type
nMaxItems - max items
request - The HTTP request
Returns:
String the XML content of the RSS document

createRssDocument

public static String createRssDocument(List listRssItem,
                                       String strRssFileDescription)
Creates the push RSS document corresponding to the given portlet

Parameters:
listRssItem - The RSS List
strRssFileDescription - the Description
Returns:
String the XML content of the RSS document

createFileRss

public static void createFileRss(String strRssFileName,
                                 String strRssDocument)
Creates the pushrss file in the directory

Parameters:
strRssFileName - The file's name that must be deleted
strRssDocument - The content of the new RSS file

deleteFileRss

public static void deleteFileRss(String strRssFileName,
                                 String strPluginName)
Deletes the pushrss file in the directory

Parameters:
strRssFileName - The name of the RSS file
strPluginName - The plugin's name

generateAllRss

public static String generateAllRss()
Regenerate all Rss files in the file system

Returns:
Execution logs


Copyright © 2014 Mairie de Paris. All Rights Reserved.