EnqueteSumBatchAction.java 998 Bytes
Newer Older
Kim Gyeongeun committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37
package jp.agentec.sinaburocast.action.batch;

import jp.agentec.sinaburocast.action.AbstractAction;
import jp.agentec.sinaburocast.common.util.SinaburoViewUtil;
import jp.agentec.sinaburocast.form.batch.EnqueteSumBatchForm;
import jp.agentec.sinaburocast.service.EnqueteService;

import org.apache.log4j.Logger;
import org.seasar.struts.annotation.ActionForm;
import org.seasar.struts.annotation.Execute;

/**
 * アンケート集計作成バッチ
 *
 * @author choi-c
 *
 */
public class EnqueteSumBatchAction extends AbstractAction {
	private final Logger logger = Logger.getLogger(getClass());

	@ActionForm
	public EnqueteSumBatchForm enqueteSumBatchForm;

	public EnqueteService enqueteService;

	@Execute(validator=false)
	public String index() throws Exception {
		String url = enqueteService.enqueteSumBatch(enqueteSumBatchForm, getAdmin());
		if(url !=null ){
			if(!url.contains("resultFileList")){
				addError(SinaburoViewUtil.getMessage("errors.E057"));
			}
		}
		return url;
	}

}