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

package org.subethamail.web.action;

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

/**
 * Gets a single subscription from a list, suitable for editing.  The model
 * becomes a SaveSubscription.Model.
 * 
 * @author Jeff Schnitzer
 */
public class GetSubscriptionForEdit extends AuthAction 
{
	/** */
	@SuppressWarnings("unused")
	private final static Logger log = LoggerFactory.getLogger(GetMyListRelationship.class);

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

	/** */
	public void execute() throws Exception
	{
		SaveSubscription.Model model = (SaveSubscription.Model)this.getCtx().getModel();
		
		model.data = Backend.instance().getListMgr().getSubscription(model.listId, model.personId);
		
		model.deliverTo = model.data.getDeliverTo();
		model.note = model.data.getNote();
		model.name = model.data.getName();
		
		RoleData role = model.data.getRole();
		
		model.roleId = role == null ? null : role.getId();
	}
}

@@ -73,58 +73,33 @@
 ort 
-org.slf4j.Logger;%0D%0Aimport org.slf4j.LoggerFactory;
+lombok.extern.java.Log;%0D%0A
 %0D%0Aim
@@ -391,16 +391,22 @@
 r%0D%0A */%0D%0A
+@Log%0D%0A
 public c
@@ -461,139 +461,8 @@
 %0A%7B%0D%0A
-%09/** */%0D%0A%09@SuppressWarnings(%22unused%22)%0D%0A%09private final static Logger log = LoggerFactory.getLogger(GetMyListRelationship.class);%0D%0A%0D%0A
 %09pub

switch logging framework