|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectfr.paris.lutece.plugins.newsletter.util.NewsletterUtils
public final class NewsletterUtils
This classe provides utility methods for newsletters.
| Method Summary | |
|---|---|
static void |
addHeaderResponse(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
java.lang.String strFileName,
java.lang.String strFileExtension)
Addition of information as header of the http response |
static void |
addParameters(fr.paris.lutece.util.url.UrlItem urlItem,
java.lang.String strParameterName,
java.lang.String[] values)
Adds all parameter values to the urlItem |
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 |
encodeForURL(java.lang.String strEntry)
Encode a string for passage in parameter in URL |
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,
java.lang.String strBaseUrl)
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 |
static NewsletterUtils |
getInstance()
Fetches the singleton instance |
static java.lang.String |
rewriteImgUrls(java.lang.String strContent,
java.lang.String strBaseUrl,
java.lang.String strUnsecuredBaseUrl,
java.lang.String strUnsecuredFolderPath,
java.lang.String strUnsecuredFolder)
Rewrite secured omg urls to absolutes urls |
static java.lang.String |
rewriteUrls(java.lang.String strContent,
java.lang.String strBaseUrl)
Rewrite relatives url to absolutes urls |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static NewsletterUtils getInstance()
public static java.lang.String getHtmlTemplatePath(int nTemplateId,
fr.paris.lutece.portal.service.plugin.Plugin plugin)
nTemplateId - the id of the template to retrieveplugin - the plugin
public static java.lang.String convertForJavascript(java.lang.String strIn)
strIn - the string to clean
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,
java.lang.String strBaseUrl)
strBaseUrl - The base url of the portalstrTemplatePath - The path of the template filedocument - the object gathering the document datanPortletId - the portlet idplugin - the plugin needed to retrieve propertieslocale - the locale used to build the template
public static java.lang.String rewriteUrls(java.lang.String strContent,
java.lang.String strBaseUrl)
strContent - The content to analyzestrBaseUrl - The base url
public static java.lang.String rewriteImgUrls(java.lang.String strContent,
java.lang.String strBaseUrl,
java.lang.String strUnsecuredBaseUrl,
java.lang.String strUnsecuredFolderPath,
java.lang.String strUnsecuredFolder)
strContent - The content to analyzestrBaseUrl - The base url
public static java.lang.String encodeForURL(java.lang.String strEntry)
strEntry - the string entry
public static void addHeaderResponse(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
java.lang.String strFileName,
java.lang.String strFileExtension)
request - The Http Requestresponse - The Http ResponsestrFileName - THe filename of the filestrFileExtension - The file extension
public static void addParameters(fr.paris.lutece.util.url.UrlItem urlItem,
java.lang.String strParameterName,
java.lang.String[] values)
urlItem - the urlItemstrParameterName - the name of the parameter which has multiple valuesvalues - parameter values
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||