org.apache.james.transport.mailets.listservcommands
Class UnSubscribe
java.lang.Object
org.apache.james.transport.mailets.listservcommands.BaseCommand
org.apache.james.transport.mailets.listservcommands.UnSubscribe
- All Implemented Interfaces:
- IListServCommand
public class UnSubscribe
- extends BaseCommand
UnSubscribe handles the unsubscribe command.
It is configured by:
<command name="unsubscribe" class="UnSubscribe"/>
It uses the formatted text-based resources for its return mail body:
After formatting the text, the message is delivered with BaseCommand.sendStandardReply(Mail, String, String, String)
Note, prior to formatting and sending any text, the user is checked to see that they
are currently subscribed to this list. If so, they will be sent a confirmation mail to
be processed by UnSubscribeConfirm
- Since:
- 2.2.0
- Version:
- CVS $Revision: 684466 $ $Date: 2008-08-10 12:42:08 +0100 (Sun, 10 Aug 2008) $
- See Also:
UnSubscribeConfirm
Method Summary |
protected boolean |
checkSubscriptionStatus(org.apache.mailet.Mail mail)
Checks to see that this user is already subscribed, if not return false and send a message |
void |
init(ICommandListservManager commandListservManager,
org.apache.avalon.framework.configuration.Configuration configuration)
Perform any required initialization |
void |
onCommand(org.apache.mailet.Mail mail)
After ensuring that the user is currently subscribed, confirmation mail
will be sent to be processed by UnSubscribeConfirm . |
Methods inherited from class org.apache.james.transport.mailets.listservcommands.BaseCommand |
generateMail, getCommandListservManager, getCommandName, getConfiguration, getMailetContext, getStandardProperties, getUsersRepository, initXMLResources, log, log, sendStandardReply |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
xmlResources
protected XMLResources xmlResources
UnSubscribe
public UnSubscribe()
init
public void init(ICommandListservManager commandListservManager,
org.apache.avalon.framework.configuration.Configuration configuration)
throws org.apache.avalon.framework.configuration.ConfigurationException
- Description copied from class:
BaseCommand
- Perform any required initialization
- Specified by:
init
in interface IListServCommand
- Overrides:
init
in class BaseCommand
- Throws:
org.apache.avalon.framework.configuration.ConfigurationException
onCommand
public void onCommand(org.apache.mailet.Mail mail)
throws javax.mail.MessagingException
- After ensuring that the user is currently subscribed, confirmation mail
will be sent to be processed by
UnSubscribeConfirm
.
- Parameters:
mail
-
- Throws:
javax.mail.MessagingException
checkSubscriptionStatus
protected boolean checkSubscriptionStatus(org.apache.mailet.Mail mail)
throws javax.mail.MessagingException
- Checks to see that this user is already subscribed, if not return false and send a message
- Parameters:
mail
-
- Returns:
- false if the user isn't subscribed, true otherwise
- Throws:
javax.mail.MessagingException
Copyright ? 2002-2009 The Apache Software Foundation. All Rights Reserved.