Class FreeHtmlTopicService
- java.lang.Object
-
- fr.paris.lutece.plugins.newsletter.service.topic.FreeHtmlTopicService
-
- All Implemented Interfaces:
INewsletterTopicService
public class FreeHtmlTopicService extends java.lang.Object implements INewsletterTopicService
Service to manage topics with free html.
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringNEWSLETTER_FREE_HTML_TOPIC_TYPE_CODECode of the topic type
-
Constructor Summary
Constructors Constructor Description FreeHtmlTopicService()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcopyNewsletterTopic(int oldTopicId, NewsletterTopic newsletterTopic, fr.paris.lutece.portal.business.user.AdminUser user, java.util.Locale locale)Copy a topic for a newsletter.voidcreateNewsletterTopic(NewsletterTopic newsletterTopic, fr.paris.lutece.portal.business.user.AdminUser user, java.util.Locale locale)Creates a new topic for a newsletterjava.lang.StringgetConfigurationPage(NewsletterTopic newsletterTopic, java.lang.String strBaseUrl, fr.paris.lutece.portal.business.user.AdminUser user, java.util.Locale locale)Get the configuration page of the content type.java.lang.StringgetHtmlContent(NewsletterTopic newsletterTopic, fr.paris.lutece.portal.business.user.AdminUser user, java.util.Locale locale)Get the html content of a topic.java.lang.StringgetNewsletterTopicTypeCode()Get the unique code of the topic type associated with this service.java.lang.StringgetNewsletterTopicTypeName(java.util.Locale locale)Get the localized name of the topic type associated with this service.booleanhasConfiguration()Check if topics of this topic type need a configuration or not.voidremoveNewsletterTopic(int nNewsletterTopicId)Remove a newsletter topic from its id.voidsaveConfiguration(java.util.Map<java.lang.String,java.lang.String[]> mapParameters, NewsletterTopic newsletterTopic, fr.paris.lutece.portal.business.user.AdminUser user, java.util.Locale locale)
-
-
-
Field Detail
-
NEWSLETTER_FREE_HTML_TOPIC_TYPE_CODE
public static final java.lang.String NEWSLETTER_FREE_HTML_TOPIC_TYPE_CODE
Code of the topic type- See Also:
- Constant Field Values
-
-
Method Detail
-
getNewsletterTopicTypeCode
public java.lang.String getNewsletterTopicTypeCode()
Get the unique code of the topic type associated with this service.- Specified by:
getNewsletterTopicTypeCodein interfaceINewsletterTopicService- Returns:
- The unique code of the topic type associated with this service.
-
getNewsletterTopicTypeName
public java.lang.String getNewsletterTopicTypeName(java.util.Locale locale)
Get the localized name of the topic type associated with this service.- Specified by:
getNewsletterTopicTypeNamein interfaceINewsletterTopicService- 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:
hasConfigurationin interfaceINewsletterTopicService- Returns:
- This method always returns true.
-
getConfigurationPage
public java.lang.String getConfigurationPage(NewsletterTopic newsletterTopic, java.lang.String strBaseUrl, fr.paris.lutece.portal.business.user.AdminUser user, java.util.Locale locale)
Get the configuration page of the content type.- Specified by:
getConfigurationPagein interfaceINewsletterTopicService- Parameters:
newsletterTopic- The newsletter topic to get the configuration of.strBaseUrl- The base urluser- The current userlocale- The locale- Returns:
- The HTML code of the configuration page
-
saveConfiguration
public void saveConfiguration(java.util.Map<java.lang.String,java.lang.String[]> mapParameters, NewsletterTopic newsletterTopic, fr.paris.lutece.portal.business.user.AdminUser user, java.util.Locale locale)- Specified by:
saveConfigurationin interfaceINewsletterTopicService- 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 userlocale- The locale
-
createNewsletterTopic
public void createNewsletterTopic(NewsletterTopic newsletterTopic, fr.paris.lutece.portal.business.user.AdminUser user, java.util.Locale locale)
Creates a new topic for a newsletter- Specified by:
createNewsletterTopicin interfaceINewsletterTopicService- Parameters:
newsletterTopic- The details of the topic to createuser- The current userlocale- The locale
-
removeNewsletterTopic
public void removeNewsletterTopic(int nNewsletterTopicId)
Remove a newsletter topic from its id.- Specified by:
removeNewsletterTopicin interfaceINewsletterTopicService- Parameters:
nNewsletterTopicId- The id of the topic to remove.
-
getHtmlContent
public java.lang.String getHtmlContent(NewsletterTopic newsletterTopic, fr.paris.lutece.portal.business.user.AdminUser user, java.util.Locale locale)
Get the html content of a topic.- Specified by:
getHtmlContentin interfaceINewsletterTopicService- Parameters:
newsletterTopic- The topic to get the html of.user- The current userlocale- The locale- Returns:
- The html content describing the topic to add to the newsletter.
-
copyNewsletterTopic
public void copyNewsletterTopic(int oldTopicId, NewsletterTopic newsletterTopic, fr.paris.lutece.portal.business.user.AdminUser user, java.util.Locale locale)Description copied from interface:INewsletterTopicServiceCopy a topic for a newsletter.- Specified by:
copyNewsletterTopicin interfaceINewsletterTopicServicenewsletterTopic- The details of the topic to createuser- The current userlocale- The locale
-
-