Class MessagingConnectorAction
java.lang.Object
org.apache.avalon.framework.logger.AbstractLogEnabled
org.apache.cocoon.acting.AbstractAction
org.apache.cocoon.acting.ServiceableAction
org.ametys.plugins.messagingconnector.MessagingConnectorAction
- All Implemented Interfaces:
- Component,- LogEnabled,- Serviceable,- Action
This class is the action used by the messaging connector plugin.
 It uses the correct mail server component.
- 
Field SummaryFieldsModifier and TypeFieldDescriptionprotected static final Map<Locale,DateFormat> Date format cache for different locale (date and time)protected static final Map<Locale,DateFormat> Date format cache for different locale (time only)protected CurrentUserProviderThe current user providerprotected I18nUtilsThe I18N utilsprotected StringmailServer selectedprotected MessagingConnectorThe messaging connector that will be usedprotected UserManagerThe user managerprotected static final DateFormatThe output date format.Fields inherited from class org.apache.cocoon.acting.ServiceableActionmanagerFields inherited from class org.apache.cocoon.acting.AbstractActionEMPTY_MAP
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionprotected String_getFormattedDate(Date date, Locale locale) Format a Date to a String using a locale to set the correct dateact(Redirector redirector, SourceResolver resolver, Map objectModel, String source, Parameters parameters) eventsToJson(List<CalendarEvent> events, Locale locale) This methods is used to create a List with all the correct informations in order to be displayed by the plugin.protected LocaleGet the current localevoidservice(ServiceManager smanager) Methods inherited from class org.apache.avalon.framework.logger.AbstractLogEnabledenableLogging, getLogger, setupLogger, setupLogger, setupLogger
- 
Field Details- 
__DATETIME_FORMATSDate format cache for different locale (date and time)
- 
__TIME_FORMATSDate format cache for different locale (time only)
- 
DATE_FORMATThe output date format.
- 
_mailServerIdmailServer selected
- 
_currentUserProviderThe current user provider
- 
_usersManagerThe user manager
- 
_messagingConnectorThe messaging connector that will be used
- 
_i18nUtilsThe I18N utils
 
- 
- 
Constructor Details- 
MessagingConnectorActionpublic MessagingConnectorAction()
 
- 
- 
Method Details- 
service- Specified by:
- servicein interface- Serviceable
- Overrides:
- servicein class- ServiceableAction
- Throws:
- ServiceException
 
- 
actpublic Map act(Redirector redirector, SourceResolver resolver, Map objectModel, String source, Parameters parameters) 
- 
getLocaleGet the current locale- Parameters:
- request- The request
- objectModel- The object model
- Returns:
- the locale to use
 
- 
eventsToJsonThis methods is used to create a List with all the correct informations in order to be displayed by the plugin.- Parameters:
- events- the events to be displayed
- locale- the locale of the user
- Returns:
- A list of Maps destined for Json
 
- 
_getFormattedDateFormat a Date to a String using a locale to set the correct date- Parameters:
- date- the date to format
- locale- the locale of the user
- Returns:
- The date formated with the given locale
 
 
-