fr.paris.lutece.plugins.calendar.service
Class AgendaSubscriberService

java.lang.Object
  extended by fr.paris.lutece.plugins.calendar.service.AgendaSubscriberService

public class AgendaSubscriberService
extends java.lang.Object

The class responsible for the subscription and unsubscription process


Field Summary
static java.lang.String JSP_URL_DO_UNSUBSCRIBE
           
static java.lang.String PROPERTY_CONFIRM_UNSUBSCRIPTION_ALERT_MESSAGE
           
static java.lang.String PROPERTY_CONFIRM_UNSUBSCRIPTION_TITLE_MESSAGE
           
static java.lang.String PROPERTY_INVALID_MAIL_ERROR_MESSAGE
           
static java.lang.String PROPERTY_INVALID_MAIL_TITLE_MESSAGE
           
static java.lang.String PROPERTY_NO_CALENDAR_CHOSEN_ERROR_MESSAGE
           
static java.lang.String PROPERTY_NO_CALENDAR_CHOSEN_TITLE_MESSAGE
           
static java.lang.String PROPERTY_SUBSCRIPTION_OK_ALERT_MESSAGE
           
static java.lang.String PROPERTY_SUBSCRIPTION_OK_TITLE_MESSAGE
           
static java.lang.String PROPERTY_UNSUBSCRIPTION_OK_ALERT_MESSAGE
           
static java.lang.String PROPERTY_UNSUBSCRIPTION_OK_TITLE_MESSAGE
           
 
Method Summary
 void doConfirmUnSubscribe(javax.servlet.http.HttpServletRequest request)
          Performs confirm unsubscription process
 void doSendMail(java.lang.String strRecipientTo, java.lang.String strSenderName, java.lang.String strSenderEmail, java.lang.String strSubject, java.lang.String strMessage)
          Send the mail
 void doSubscription(javax.servlet.http.HttpServletRequest request)
          Performs the subscription process Throw a SiteMessage
 void doUnSubscribe(javax.servlet.http.HttpServletRequest request)
          Performs unsubscription process Throw a SiteMessage
static AgendaSubscriberService getInstance()
          Fetches the singleton instance
 java.lang.String sendFriendMail(javax.servlet.http.HttpServletRequest request)
          Send the calendar to a friend
 void sendSubscriberMail(javax.servlet.http.HttpServletRequest request, java.util.Collection<CalendarSubscriber> listSubscribers, Event event, int nCalendarId)
          Send an event to a list of subscribers
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

JSP_URL_DO_UNSUBSCRIBE

public static final java.lang.String JSP_URL_DO_UNSUBSCRIBE
See Also:
Constant Field Values

PROPERTY_INVALID_MAIL_TITLE_MESSAGE

public static final java.lang.String PROPERTY_INVALID_MAIL_TITLE_MESSAGE
See Also:
Constant Field Values

PROPERTY_INVALID_MAIL_ERROR_MESSAGE

public static final java.lang.String PROPERTY_INVALID_MAIL_ERROR_MESSAGE
See Also:
Constant Field Values

PROPERTY_CONFIRM_UNSUBSCRIPTION_ALERT_MESSAGE

public static final java.lang.String PROPERTY_CONFIRM_UNSUBSCRIPTION_ALERT_MESSAGE
See Also:
Constant Field Values

PROPERTY_CONFIRM_UNSUBSCRIPTION_TITLE_MESSAGE

public static final java.lang.String PROPERTY_CONFIRM_UNSUBSCRIPTION_TITLE_MESSAGE
See Also:
Constant Field Values

PROPERTY_SUBSCRIPTION_OK_TITLE_MESSAGE

public static final java.lang.String PROPERTY_SUBSCRIPTION_OK_TITLE_MESSAGE
See Also:
Constant Field Values

PROPERTY_SUBSCRIPTION_OK_ALERT_MESSAGE

public static final java.lang.String PROPERTY_SUBSCRIPTION_OK_ALERT_MESSAGE
See Also:
Constant Field Values

PROPERTY_UNSUBSCRIPTION_OK_TITLE_MESSAGE

public static final java.lang.String PROPERTY_UNSUBSCRIPTION_OK_TITLE_MESSAGE
See Also:
Constant Field Values

PROPERTY_UNSUBSCRIPTION_OK_ALERT_MESSAGE

public static final java.lang.String PROPERTY_UNSUBSCRIPTION_OK_ALERT_MESSAGE
See Also:
Constant Field Values

PROPERTY_NO_CALENDAR_CHOSEN_TITLE_MESSAGE

public static final java.lang.String PROPERTY_NO_CALENDAR_CHOSEN_TITLE_MESSAGE
See Also:
Constant Field Values

PROPERTY_NO_CALENDAR_CHOSEN_ERROR_MESSAGE

public static final java.lang.String PROPERTY_NO_CALENDAR_CHOSEN_ERROR_MESSAGE
See Also:
Constant Field Values
Method Detail

getInstance

public static AgendaSubscriberService getInstance()
Fetches the singleton instance

Returns:
The singleton instance

doSubscription

public void doSubscription(javax.servlet.http.HttpServletRequest request)
                    throws fr.paris.lutece.portal.service.message.SiteMessageException
Performs the subscription process Throw a SiteMessage

Parameters:
request - The Http request
Throws:
fr.paris.lutece.portal.service.message.SiteMessageException - The error message thrown to the user

doUnSubscribe

public void doUnSubscribe(javax.servlet.http.HttpServletRequest request)
                   throws fr.paris.lutece.portal.service.message.SiteMessageException
Performs unsubscription process Throw a SiteMessage

Parameters:
request - The http request
Throws:
fr.paris.lutece.portal.service.message.SiteMessageException - The error message handled by the front office

doConfirmUnSubscribe

public void doConfirmUnSubscribe(javax.servlet.http.HttpServletRequest request)
                          throws fr.paris.lutece.portal.service.message.SiteMessageException
Performs confirm unsubscription process

Parameters:
request - The http request
Throws:
fr.paris.lutece.portal.service.message.SiteMessageException - The error message handled by the front office

doSendMail

public void doSendMail(java.lang.String strRecipientTo,
                       java.lang.String strSenderName,
                       java.lang.String strSenderEmail,
                       java.lang.String strSubject,
                       java.lang.String strMessage)
Send the mail

Parameters:
strRecipientTo - Subscriber email
strSenderName - The sender name.
strSenderEmail - The sender email address.
strSubject - The message subject.
strMessage - The message.

sendSubscriberMail

public void sendSubscriberMail(javax.servlet.http.HttpServletRequest request,
                               java.util.Collection<CalendarSubscriber> listSubscribers,
                               Event event,
                               int nCalendarId)
Send an event to a list of subscribers

Parameters:
request - the http request
listSubscribers - a Collection
event - the event

sendFriendMail

public java.lang.String sendFriendMail(javax.servlet.http.HttpServletRequest request)
                                throws fr.paris.lutece.portal.service.message.SiteMessageException
Send the calendar to a friend

Parameters:
request - the http request
Throws:
fr.paris.lutece.portal.service.message.SiteMessageException


Copyright © 2009 Mairie de Paris. All Rights Reserved.