java.lang.Object
BaseAction
com.RuntimeCollective.webapps.action.BaseForwardAction
com.RuntimeCollective.webapps.action.BaseUserAction
com.RuntimeCollective.permission.action.PermissibleAction
com.RuntimeCollective.permission.action.AuthenticatedAction
com.RuntimeCollective.publication.action.SwitchSubscriptionStatusAction
- public class SwitchSubscriptionStatusAction
- extends com.RuntimeCollective.permission.action.AuthenticatedAction
Switch the Subscription status of the User to a given Publication.
The id of the Publication is passed as a parameter.
The action either deletes or creates the/a Subscription for the Publication.
Created Subscriptions start now and have no end date.
- Version:
- $Id: SwitchSubscriptionStatusAction.java,v 1.4 2003/09/30 15:12:51 joe Exp $
|
Method Summary |
protected void |
checkPermissions(org.apache.struts.action.ActionMapping mapping,
org.apache.struts.action.ActionForm form,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Override this, actually, to send the user to login if he's not authorised. |
void |
executeLogic(org.apache.struts.action.ActionMapping mapping,
org.apache.struts.action.ActionForm form,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
|
protected java.lang.String |
getNotificationEmailBody(org.apache.struts.action.ActionMapping mapping,
javax.servlet.http.HttpServletRequest request,
com.RuntimeCollective.webapps.bean.User user,
com.RuntimeCollective.publication.bean.Publication publication,
boolean isSubscribing)
|
protected java.lang.String |
getNotificationEmailSubject(org.apache.struts.action.ActionMapping mapping,
javax.servlet.http.HttpServletRequest request,
com.RuntimeCollective.webapps.bean.User user,
com.RuntimeCollective.publication.bean.Publication publication,
boolean isSubscribing)
|
protected void |
sendNotificationEmail(org.apache.struts.action.ActionMapping mapping,
javax.servlet.http.HttpServletRequest request,
com.RuntimeCollective.webapps.bean.User user,
com.RuntimeCollective.publication.bean.Publication publication,
boolean isSubscribing)
Send a notification email to the user. |
protected void |
validateRequest(org.apache.struts.action.ActionMapping mapping,
org.apache.struts.action.ActionForm form,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Saves an appropriate error if the request contains invalid data. |
| Methods inherited from class com.RuntimeCollective.webapps.action.BaseForwardAction |
findFailure, findSuccess, forward, getToken, isTokenValid, iterate, resetToken, saveToken, setFailureForward, setSuccessForward, setSuccessForward, setSuccessForward, setToken, validForm |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SUBSCRIBING_SUBJECT
protected static java.lang.String SUBSCRIBING_SUBJECT
UNSUBSCRIBING_SUBJECT
protected static java.lang.String UNSUBSCRIBING_SUBJECT
SUBSCRIBING_ACTION
protected static java.lang.String SUBSCRIBING_ACTION
UNSUBSCRIBING_ACTION
protected static java.lang.String UNSUBSCRIBING_ACTION
SwitchSubscriptionStatusAction
public SwitchSubscriptionStatusAction()
checkPermissions
protected void checkPermissions(org.apache.struts.action.ActionMapping mapping,
org.apache.struts.action.ActionForm form,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
- Override this, actually, to send the user to login if he's not authorised.
Effectively all we do here is set the original request under
validateRequest
protected void validateRequest(org.apache.struts.action.ActionMapping mapping,
org.apache.struts.action.ActionForm form,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
- Description copied from class:
com.RuntimeCollective.permission.action.PermissibleAction
- Saves an appropriate error if the request contains invalid data.
executeLogic
public void executeLogic(org.apache.struts.action.ActionMapping mapping,
org.apache.struts.action.ActionForm form,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
throws java.sql.SQLException
sendNotificationEmail
protected void sendNotificationEmail(org.apache.struts.action.ActionMapping mapping,
javax.servlet.http.HttpServletRequest request,
com.RuntimeCollective.webapps.bean.User user,
com.RuntimeCollective.publication.bean.Publication publication,
boolean isSubscribing)
throws javax.mail.internet.AddressException,
javax.mail.MessagingException,
javax.servlet.ServletException
- Send a notification email to the user.
getNotificationEmailSubject
protected java.lang.String getNotificationEmailSubject(org.apache.struts.action.ActionMapping mapping,
javax.servlet.http.HttpServletRequest request,
com.RuntimeCollective.webapps.bean.User user,
com.RuntimeCollective.publication.bean.Publication publication,
boolean isSubscribing)
getNotificationEmailBody
protected java.lang.String getNotificationEmailBody(org.apache.struts.action.ActionMapping mapping,
javax.servlet.http.HttpServletRequest request,
com.RuntimeCollective.webapps.bean.User user,
com.RuntimeCollective.publication.bean.Publication publication,
boolean isSubscribing)