fr.paris.lutece.plugins.newsletter.service.topic
Class FreeHtmlTopicService

java.lang.Object
  extended by fr.paris.lutece.plugins.newsletter.service.topic.FreeHtmlTopicService
All Implemented Interfaces:
INewsletterTopicService

public class FreeHtmlTopicService
extends Object
implements INewsletterTopicService

Service to manage topics with free html.


Field Summary
static String NEWSLETTER_FREE_HTML_TOPIC_TYPE_CODE
          Code of the topic type
 
Constructor Summary
FreeHtmlTopicService()
           
 
Method Summary
 void createNewsletterTopic(NewsletterTopic newsletterTopic, fr.paris.lutece.portal.business.user.AdminUser user, Locale locale)
          Creates a new topic for a newsletter
 String getConfigurationPage(NewsletterTopic newsletterTopic, String strBaseUrl, fr.paris.lutece.portal.business.user.AdminUser user, Locale locale)
          Get the configuration page of the content type.
 String getHtmlContent(NewsletterTopic newsletterTopic, fr.paris.lutece.portal.business.user.AdminUser user, Locale locale)
          Get the html content of a topic.
 String getNewsletterTopicTypeCode()
          Get the unique code of the topic type associated with this service.
 String getNewsletterTopicTypeName(Locale locale)
          Get the localized name of the topic type associated with this service.
 boolean hasConfiguration()
          Check if topics of this topic type need a configuration or not.
 void removeNewsletterTopic(int nNewsletterTopicId)
          Remove a newsletter topic from its id.
 void saveConfiguration(Map<String,String[]> mapParameters, NewsletterTopic newsletterTopic, fr.paris.lutece.portal.business.user.AdminUser user, Locale locale)
          
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

NEWSLETTER_FREE_HTML_TOPIC_TYPE_CODE

public static final String NEWSLETTER_FREE_HTML_TOPIC_TYPE_CODE
Code of the topic type

See Also:
Constant Field Values
Constructor Detail

FreeHtmlTopicService

public FreeHtmlTopicService()
Method Detail

getNewsletterTopicTypeCode

public String getNewsletterTopicTypeCode()
Get the unique code of the topic type associated with this service.

Specified by:
getNewsletterTopicTypeCode in interface INewsletterTopicService
Returns:
The unique code of the topic type associated with this service.

getNewsletterTopicTypeName

public String getNewsletterTopicTypeName(Locale locale)
Get the localized name of the topic type associated with this service.

Specified by:
getNewsletterTopicTypeName in interface INewsletterTopicService
Parameters:
locale - The locale to use
Returns:
The name of the topic type associated with this service in the given locale.

hasConfiguration

public boolean hasConfiguration()
Check if topics of this topic type need a configuration or not.

Specified by:
hasConfiguration in interface INewsletterTopicService
Returns:
This method always returns true.

getConfigurationPage

public String getConfigurationPage(NewsletterTopic newsletterTopic,
                                   String strBaseUrl,
                                   fr.paris.lutece.portal.business.user.AdminUser user,
                                   Locale locale)
Get the configuration page of the content type.

Specified by:
getConfigurationPage in interface INewsletterTopicService
Parameters:
newsletterTopic - The newsletter topic to get the configuration of.
strBaseUrl - The base url
user - The current user
locale - The locale
Returns:
The HTML code of the configuration page

saveConfiguration

public void saveConfiguration(Map<String,String[]> mapParameters,
                              NewsletterTopic newsletterTopic,
                              fr.paris.lutece.portal.business.user.AdminUser user,
                              Locale locale)

Specified by:
saveConfiguration in interface INewsletterTopicService
Parameters:
mapParameters - The collection of parameters of the configuration. Those parameters are request parameters in request contexts.
newsletterTopic - The newsletter topic to get the configuration of.
user - The current user
locale - The locale

createNewsletterTopic

public void createNewsletterTopic(NewsletterTopic newsletterTopic,
                                  fr.paris.lutece.portal.business.user.AdminUser user,
                                  Locale locale)
Creates a new topic for a newsletter

Specified by:
createNewsletterTopic in interface INewsletterTopicService
Parameters:
newsletterTopic - The details of the topic to create
user - The current user
locale - The locale

removeNewsletterTopic

public void removeNewsletterTopic(int nNewsletterTopicId)
Remove a newsletter topic from its id.

Specified by:
removeNewsletterTopic in interface INewsletterTopicService
Parameters:
nNewsletterTopicId - The id of the topic to remove.

getHtmlContent

public String getHtmlContent(NewsletterTopic newsletterTopic,
                             fr.paris.lutece.portal.business.user.AdminUser user,
                             Locale locale)
Get the html content of a topic.

Specified by:
getHtmlContent in interface INewsletterTopicService
Parameters:
newsletterTopic - The topic to get the html of.
user - The current user
locale - The locale
Returns:
The html content describing the topic to add to the newsletter.


Copyright © 2013 Mairie de Paris. All Rights Reserved.