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

package org.subethamail.web.action;

import java.util.List;

import lombok.Getter;
import lombok.Setter;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.subethamail.core.lists.i.MailSummary;
import org.subethamail.web.Backend;
import org.subethamail.web.action.auth.AuthAction;
import org.subethamail.web.model.PaginateModel;

/**
 * Gets one page of an archive.  Model becomes a List<MessageSummary>.
 * 
 * @author Jeff Schnitzer
 */
public class GetThreads extends AuthAction 
{
	/** */
	@SuppressWarnings("unused")
	private final static Logger log = LoggerFactory.getLogger(GetThreads.class);

	public static class Model extends PaginateModel
	{
		public Model()
		{
			this.setCount(100);	// default to 100
		}
		
		/** */
		@Getter @Setter Long listId;
		@Getter @Setter List<MailSummary> messages;
	}

	public void initialize()
	{
		this.getCtx().setModel(new Model());
	}

	/** */
	public void execute() throws Exception
	{
		Model model = (Model)this.getCtx().getModel();

		model.messages = Backend.instance().getArchiver().getThreads(model.listId, model.getSkip(), model.getCount());
		model.setTotalCount(Backend.instance().getArchiver().countMailByList(model.listId));
	}
}

@@ -138,67 +138,40 @@
 r;%0D%0A
-%0D%0A
 import 
-org.slf4j.Logger;%0D%0Aimport org.slf4j.LoggerFactory;
+lombok.extern.java.Log;%0D%0A
 %0D%0Aim
@@ -472,16 +472,22 @@
 r%0D%0A */%0D%0A
+@Log%0D%0A
 public c
@@ -530,128 +530,8 @@
 %0A%7B%0D%0A
-%09/** */%0D%0A%09@SuppressWarnings(%22unused%22)%0D%0A%09private final static Logger log = LoggerFactory.getLogger(GetThreads.class);%0D%0A%0D%0A
 %09pub

switch logging framework