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>
_dayNumbers
The day numbers.protected I18nizableText
_description
The description.protected Map<String,String>
_filters
The filters.protected AutomaticNewsletter.FrequencyType
_frequencyType
The frequency type.protected I18nizableText
_label
The label.protected I18nizableText
_newsletterTitle
The newsletter title.protected String
_pluginName
The 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.void
configure(Configuration configuration)
Collection<Integer>
getDayNumbers()
Get the automatic newsletter frequency identifiers.I18nizableText
getDescription()
Get the automatic newsletter description.Map<String,String>
getFilters()
Get the filters which this automatic newsletter bases on.AutomaticNewsletter.FrequencyType
getFrequencyType()
Get the automatic newsletter frequency type.I18nizableText
getLabel()
Get the automatic newsletter label.I18nizableText
getNewsletterTitle()
Get the automatic newsletter title.void
setPluginInfo(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:PluginAware
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.- Specified by:
setPluginInfo
in 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:
configure
in interfaceConfigurable
- Throws:
ConfigurationException
-
getLabel
public I18nizableText getLabel()
Description copied from interface:AutomaticNewsletter
Get the automatic newsletter label.- Specified by:
getLabel
in interfaceAutomaticNewsletter
- Returns:
- the automatic newsletter label.
-
getDescription
public I18nizableText getDescription()
Description copied from interface:AutomaticNewsletter
Get the automatic newsletter description.- Specified by:
getDescription
in interfaceAutomaticNewsletter
- Returns:
- the automatic newsletter description.
-
getNewsletterTitle
public I18nizableText getNewsletterTitle()
Description copied from interface:AutomaticNewsletter
Get the automatic newsletter title.- Specified by:
getNewsletterTitle
in interfaceAutomaticNewsletter
- Returns:
- the automatic newsletter title.
-
getFrequencyType
public AutomaticNewsletter.FrequencyType getFrequencyType()
Description copied from interface:AutomaticNewsletter
Get the automatic newsletter frequency type.- Specified by:
getFrequencyType
in interfaceAutomaticNewsletter
- Returns:
- the automatic newsletter frequency type.
-
getDayNumbers
public Collection<Integer> getDayNumbers()
Description copied from interface:AutomaticNewsletter
Get the automatic newsletter frequency identifiers.- Specified by:
getDayNumbers
in interfaceAutomaticNewsletter
- Returns:
- the automatic newsletter frequency identifiers.
-
getFilters
public Map<String,String> getFilters()
Description copied from interface:AutomaticNewsletter
Get the filters which this automatic newsletter bases on.- Specified by:
getFilters
in 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.
-
-