fr.paris.lutece.plugins.newsletter.util
Class NewsletterUtils

java.lang.Object
  extended by fr.paris.lutece.plugins.newsletter.util.NewsletterUtils

public final class NewsletterUtils
extends java.lang.Object

This classe provides utility methods for newsletters.


Constructor Summary
NewsletterUtils()
           
 
Method Summary
static java.lang.String convertForJavascript(java.lang.String strIn)
          Cleans a string in order to make it usable in a javascript script
static java.lang.String fillTemplateWithDocumentInfos(java.lang.String strTemplatePath, fr.paris.lutece.plugins.document.business.Document document, int nPortletId, fr.paris.lutece.portal.service.plugin.Plugin plugin, java.util.Locale locale)
          Fills a given document template with the document data
static java.lang.String getHtmlTemplatePath(int nTemplateId, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Retrieve the html template for the given template id
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NewsletterUtils

public NewsletterUtils()
Method Detail

getHtmlTemplatePath

public static java.lang.String getHtmlTemplatePath(int nTemplateId,
                                                   fr.paris.lutece.portal.service.plugin.Plugin plugin)
Retrieve the html template for the given template id

Parameters:
nTemplateId - the id of the template to retrieve
plugin - the plugin
Returns:
the html template to use

convertForJavascript

public static java.lang.String convertForJavascript(java.lang.String strIn)
Cleans a string in order to make it usable in a javascript script

Parameters:
strIn - the string to clean
Returns:
the javascript escaped String

fillTemplateWithDocumentInfos

public static java.lang.String fillTemplateWithDocumentInfos(java.lang.String strTemplatePath,
                                                             fr.paris.lutece.plugins.document.business.Document document,
                                                             int nPortletId,
                                                             fr.paris.lutece.portal.service.plugin.Plugin plugin,
                                                             java.util.Locale locale)
Fills a given document template with the document data

Parameters:
t - the html template
document - the object gathering the document data
nPortletId - the portlet id
plugin - the plugin needed to retrieve properties
locale - the locale used to build the template
Returns:
the html code corresponding to the document data


Copyright © 2007 Mairie de Paris. All Rights Reserved.