Class NewsletterTemplate
- java.lang.Object
-
- org.apache.avalon.framework.logger.AbstractLogEnabled
-
- org.ametys.plugins.newsletter.category.NewsletterTemplate
-
- All Implemented Interfaces:
Component
,LogEnabled
,Serviceable
public class NewsletterTemplate extends AbstractLogEnabled implements Serviceable, Component
Represent a newsletter template.
-
-
Field Summary
Fields Modifier and Type Field Description private I18nizableText
_description
private String
_id
private I18nizableText
_label
private String
_largeImage
private long
_lastConfUpdate
private String
_mediumImage
private String
_skinId
private String
_smallImage
private SourceResolver
_sourceResolver
-
Constructor Summary
Constructors Constructor Description NewsletterTemplate(String skinId, String templateId)
Creates a template
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private I18nizableText
_configureI18n(Configuration child, I18nizableText defaultValue)
private String
_configureThumbnail(String value, String defaultImage)
private void
_defaultValues()
I18nizableText
getDescription()
The template descriptionString
getId()
The template idI18nizableText
getLabel()
The template labelString
getLargeImage()
The large image file uriString
getMediumImage()
The medium image file uriString
getSmallImage()
The small image file urivoid
refreshValues()
Refresh the configuration valuesvoid
service(ServiceManager manager)
-
Methods inherited from class org.apache.avalon.framework.logger.AbstractLogEnabled
enableLogging, getLogger, setupLogger, setupLogger, setupLogger
-
-
-
-
Field Detail
-
_sourceResolver
private SourceResolver _sourceResolver
-
_label
private I18nizableText _label
-
_description
private I18nizableText _description
-
_smallImage
private String _smallImage
-
_mediumImage
private String _mediumImage
-
_largeImage
private String _largeImage
-
_lastConfUpdate
private long _lastConfUpdate
-
-
Constructor Detail
-
NewsletterTemplate
public NewsletterTemplate(String skinId, String templateId)
Creates a template- Parameters:
skinId
- The skin idtemplateId
- The template id
-
-
Method Detail
-
service
public void service(ServiceManager manager) throws ServiceException
- Specified by:
service
in interfaceServiceable
- Throws:
ServiceException
-
getLabel
public I18nizableText getLabel()
The template label- Returns:
- The label
-
getDescription
public I18nizableText getDescription()
The template description- Returns:
- The description. Can not be null but can be empty
-
getSmallImage
public String getSmallImage()
The small image file uri- Returns:
- The small image file uri
-
getMediumImage
public String getMediumImage()
The medium image file uri- Returns:
- The medium image file uri
-
getLargeImage
public String getLargeImage()
The large image file uri- Returns:
- The large image file uri
-
refreshValues
public void refreshValues()
Refresh the configuration values
-
_defaultValues
private void _defaultValues()
-
_configureI18n
private I18nizableText _configureI18n(Configuration child, I18nizableText defaultValue) throws ConfigurationException
- Throws:
ConfigurationException
-
_configureThumbnail
private String _configureThumbnail(String value, String defaultImage)
-
-