Class StaticAutomaticNewsletter
- java.lang.Object
-
- org.apache.avalon.framework.logger.AbstractLogEnabled
-
- org.ametys.plugins.newsletter.auto.StaticAutomaticNewsletter
-
- All Implemented Interfaces:
AutomaticNewsletter,PluginAware,Configurable,LogEnabled
public class StaticAutomaticNewsletter extends AbstractLogEnabled implements AutomaticNewsletter, Configurable, PluginAware
Static implementation ofAutomaticNewsletter.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.ametys.plugins.newsletter.auto.AutomaticNewsletter
AutomaticNewsletter.FrequencyType
-
-
Field Summary
Fields Modifier and Type Field Description protected List<Integer>_dayNumbersThe day numbers.protected I18nizableText_descriptionThe description.protected Map<String,String>_filtersThe filters.protected AutomaticNewsletter.FrequencyType_frequencyTypeThe frequency type.protected I18nizableText_labelThe label.protected I18nizableText_newsletterTitleThe newsletter title.protected String_pluginNameThe plugin name.
-
Constructor Summary
Constructors Constructor Description StaticAutomaticNewsletter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected I18nizableText_parseI18nizableText(Configuration config, String name)Parse an i18n text.voidconfigure(Configuration configuration)Collection<Integer>getDayNumbers()Get the automatic newsletter frequency identifiers.I18nizableTextgetDescription()Get the automatic newsletter description.Map<String,String>getFilters()Get the filters which this automatic newsletter bases on.AutomaticNewsletter.FrequencyTypegetFrequencyType()Get the automatic newsletter frequency type.I18nizableTextgetLabel()Get the automatic newsletter label.I18nizableTextgetNewsletterTitle()Get the automatic newsletter title.voidsetPluginInfo(String pluginName, String featureName, String id)Sets the plugin info relative to the current component.
Note : The feature name may be null if the targeted component in declared at plugin level.-
Methods inherited from class org.apache.avalon.framework.logger.AbstractLogEnabled
enableLogging, getLogger, setupLogger, setupLogger, setupLogger
-
-
-
-
Field Detail
-
_label
protected I18nizableText _label
The label.
-
_description
protected I18nizableText _description
The description.
-
_newsletterTitle
protected I18nizableText _newsletterTitle
The newsletter title.
-
_frequencyType
protected AutomaticNewsletter.FrequencyType _frequencyType
The frequency type.
-
_dayNumbers
protected List<Integer> _dayNumbers
The day numbers.
-
_pluginName
protected String _pluginName
The plugin name.
-
-
Constructor Detail
-
StaticAutomaticNewsletter
public StaticAutomaticNewsletter()
-
-
Method Detail
-
setPluginInfo
public void setPluginInfo(String pluginName, String featureName, String id)
Description copied from interface:PluginAwareSets the plugin info relative to the current component.
Note : The feature name may be null if the targeted component in declared at plugin level.- Specified by:
setPluginInfoin interfacePluginAware- Parameters:
pluginName- Unique identifier for the plugin hosting the extensionfeatureName- Unique feature identifier (unique for a given pluginName)id- Unique identifier of this component
-
configure
public void configure(Configuration configuration) throws ConfigurationException
- Specified by:
configurein interfaceConfigurable- Throws:
ConfigurationException
-
getLabel
public I18nizableText getLabel()
Description copied from interface:AutomaticNewsletterGet the automatic newsletter label.- Specified by:
getLabelin interfaceAutomaticNewsletter- Returns:
- the automatic newsletter label.
-
getDescription
public I18nizableText getDescription()
Description copied from interface:AutomaticNewsletterGet the automatic newsletter description.- Specified by:
getDescriptionin interfaceAutomaticNewsletter- Returns:
- the automatic newsletter description.
-
getNewsletterTitle
public I18nizableText getNewsletterTitle()
Description copied from interface:AutomaticNewsletterGet the automatic newsletter title.- Specified by:
getNewsletterTitlein interfaceAutomaticNewsletter- Returns:
- the automatic newsletter title.
-
getFrequencyType
public AutomaticNewsletter.FrequencyType getFrequencyType()
Description copied from interface:AutomaticNewsletterGet the automatic newsletter frequency type.- Specified by:
getFrequencyTypein interfaceAutomaticNewsletter- Returns:
- the automatic newsletter frequency type.
-
getDayNumbers
public Collection<Integer> getDayNumbers()
Description copied from interface:AutomaticNewsletterGet the automatic newsletter frequency identifiers.- Specified by:
getDayNumbersin interfaceAutomaticNewsletter- Returns:
- the automatic newsletter frequency identifiers.
-
getFilters
public Map<String,String> getFilters()
Description copied from interface:AutomaticNewsletterGet the filters which this automatic newsletter bases on.- Specified by:
getFiltersin interfaceAutomaticNewsletter- Returns:
- a Map of filter name -> filter ID.
-
_parseI18nizableText
protected I18nizableText _parseI18nizableText(Configuration config, String name) throws ConfigurationException
Parse an i18n text.- Parameters:
config- the configuration to use.name- the child name.- Returns:
- the i18n text.
- Throws:
ConfigurationException- if the configuration is not valid.
-
-