public class MessagingConnectorAction extends ServiceableAction
Modifier and Type | Field and Description |
---|---|
protected static Map<Locale,DateFormat> |
__DATETIME_FORMATS
Date format cache for different locale (date and time)
|
protected static Map<Locale,DateFormat> |
__TIME_FORMATS
Date format cache for different locale (time only)
|
protected CurrentUserProvider |
_currentUserProvider
The current user provider
|
protected String |
_mailServerId
mailServer selected
|
protected MessagingConnector |
_messagingConnector
The messaging connector that will be used
|
protected UserManager |
_usersManager
The user manager
|
protected static DateFormat |
DATE_FORMAT
The output date format.
|
private static String |
MAX_DAYS
The max days parameter from the URL
|
private static String |
MAX_EVENTS
The max events parameter from the URL
|
manager
EMPTY_MAP
Constructor and Description |
---|
MessagingConnectorAction() |
Modifier and Type | Method and Description |
---|---|
protected String |
_getFormattedDate(Date date,
Locale locale)
Format a Date to a String using a locale to set the correct date
|
Map |
act(Redirector redirector,
SourceResolver resolver,
Map objectModel,
String source,
Parameters parameters) |
protected List<Map<String,Object>> |
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 Locale |
getLocale(Request request,
Map objectModel)
Get the current locale
|
void |
service(ServiceManager smanager) |
enableLogging, getLogger, setupLogger, setupLogger, setupLogger
protected static final Map<Locale,DateFormat> __DATETIME_FORMATS
protected static final Map<Locale,DateFormat> __TIME_FORMATS
protected static final DateFormat DATE_FORMAT
private static final String MAX_DAYS
private static final String MAX_EVENTS
protected String _mailServerId
protected CurrentUserProvider _currentUserProvider
protected UserManager _usersManager
protected MessagingConnector _messagingConnector
public MessagingConnectorAction()
public void service(ServiceManager smanager) throws ServiceException
service
in interface Serviceable
service
in class ServiceableAction
ServiceException
public Map act(Redirector redirector, SourceResolver resolver, Map objectModel, String source, Parameters parameters)
protected Locale getLocale(Request request, Map objectModel)
request
- The requestobjectModel
- The object modelprotected List<Map<String,Object>> eventsToJson(List<CalendarEvent> events, Locale locale)
events
- the events to be displayedlocale
- the locale of the userprotected String _getFormattedDate(Date date, Locale locale)
date
- the date to formatlocale
- the locale of the user