/*
 * $Id: ShowVersionsAction.java,v 1.3 2006/08/30 21:08:14 marbobo Exp $
 *
 * Copyright (c) Siemens AG 2008 
 *           (c) Universität Paderborn 2008 
 * Licensed under EUPL 1.1. 
 *
 * $Log: ShowVersionsAction.java,v $
 * Revision 1.3  2006/08/30 21:08:14  marbobo
 * + Rückkehr zur Projekt- und Funktionssicht korrigiert
 *
 * Revision 1.2  2006/01/26 12:43:49  korowa
 * *** empty log message ***
 *
 * Revision 1.1  2006/01/20 12:43:24  korowa
 * Ermöglicht ein Vergleich von verschiedenen Versionen eines Dokumentes
 *
 *
 */

package vkc.view.action;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.apache.struts.action.Action;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionForward;
import org.apache.struts.action.ActionMapping;

import vkc.misc.VKCLogManager;
import vkc.view.form.ShowVersionsForm;

/**
 * Action für die Wiedergabe eines Dokumentes aus dem Archiv
 * 
 * 
 */
public final class ShowVersionsAction extends Action {
	private ActionForward DEFAULT_FORWARD = new ActionForward(
			"/templates/${template.name}/common/ShowVersions.jsp", false);

	/**
	 * Zeigt Versionen zu vergleichenden Documenten
	 * 
	 */
	public ActionForward execute(ActionMapping mapping, 
								 ActionForm f,
								 HttpServletRequest request, 
								 HttpServletResponse response)
	throws ServletException {
		try {
			ShowVersionsForm form = (ShowVersionsForm) f;
			
			return handleInitialzeAction(form, request);
		} catch (Exception e) {
			VKCLogManager.errorLog(this, "", e.getMessage(), e);
			throw new ServletException(e);
		}
	}

	private ActionForward handleInitialzeAction(ShowVersionsForm form,
			HttpServletRequest request) throws Exception {
		return DEFAULT_FORWARD;
	}
}