/*
 * $Id$
 * $URL$
 */

package org.subethamail.web.action;

import lombok.Getter;
import lombok.Setter;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.subethamail.core.acct.i.AuthSubscribeResult;
import org.subethamail.core.acct.i.BadTokenException;
import org.subethamail.core.acct.i.SubscribeResult;
import org.subethamail.web.Backend;
import org.subethamail.web.action.auth.AuthAction;

/**
 * Subscribes an anonymous (not logged in) user to a mailing list.
 * 
 * @author Jeff Schnitzer
 */
public class SubscribeConfirm extends AuthAction 
{
	/** */
	@SuppressWarnings("unused")
	private final static Logger log = LoggerFactory.getLogger(SubscribeConfirm.class);
	
	/** */
	@Getter @Setter String token = "";
	@Getter @Setter boolean badTokenError;
	@Getter @Setter boolean held;
	@Getter @Setter Long listId;

	/** */
	public void execute() throws Exception
	{
		try
		{
			AuthSubscribeResult authResult = Backend.instance().getAccountMgr().subscribeAnonymous(this.token);
			
			this.listId = authResult.getListId();
			
			if (SubscribeResult.HELD.equals(authResult.getResult()))
			{
				this.held = true;
			}
			
			this.login(authResult.getEmail(), authResult.getPassword());
		}
		catch (BadTokenException ex)
		{
			this.badTokenError = true;
		}
	}
	
}

@@ -112,67 +112,40 @@
 r;%0D%0A
-%0D%0A
 import 
-org.slf4j.Logger;%0D%0Aimport org.slf4j.LoggerFactory;
+lombok.extern.java.Log;%0D%0A
 %0D%0Aim
@@ -508,16 +508,22 @@
 r%0D%0A */%0D%0A
+@Log%0D%0A
 public c
@@ -581,135 +581,8 @@
 */%0D%0A
-%09@SuppressWarnings(%22unused%22)%0D%0A%09private final static Logger log = LoggerFactory.getLogger(SubscribeConfirm.class);%0D%0A%09%0D%0A%09/** */%0D%0A
 %09@Ge

switch logging framework