/*
 * $Id: WorklistForm.java,v 1.3 2005/07/18 14:45:59 marbobo Exp $
 *
 * Copyright (c) Siemens AG 2008 
 *           (c) Universität Paderborn 2008 
 * Licensed under EUPL 1.1. 
 * 
 * Created on 07.07.2004
 *
 * $Log: WorklistForm.java,v $
 * Revision 1.3  2005/07/18 14:45:59  marbobo
 * + Datentypen-Anzeigen anzeigen abschaltbar
 *
 * Revision 1.2  2004/09/20 10:26:12  koppy
 * +javadoc Dokumentation
 *
 * Revision 1.1  2004/08/30 14:49:56  koppy
 * Initiale Version der Workflow-Komponente
 *
 */
package vkc.workflow.web;

import java.util.Collection;

import javax.servlet.http.HttpServletRequest;

import org.apache.struts.action.ActionErrors;
import org.apache.struts.action.ActionMapping;

import vkc.view.WebShare;
import vkc.view.form.DynaForm;

/**
 * This class represents the corresponding 
 * struts form bean used with <code>WorklistAction</code>
 * @author Andreas Koop
 */
public class WorklistForm extends DynaForm {
    private String activityId = null;
    private String detailId = null;
    private String action = null;
    
    /**
     * for reassignment
     */
    private Collection userInfos = null;
    private String newAssigneeName = null;
    
    /** 
     * (non-Javadoc)
     * @see org.apache.struts.action.ActionForm#reset(org.apache.struts.action.ActionMapping, javax.servlet.http.HttpServletRequest)
     */
    public void reset(ActionMapping mapping, HttpServletRequest request) {
        super.reset(mapping, request);
    }
    
    /**
     * @return Returns the detailId.
     */
    public String getDetailId() {
        return detailId;
    }

    /**
     * @param detailId The detailId to set.
     */
    public void setDetailId(String detailId) {
        this.detailId = detailId;
    }
    
    /** 
     * (non-Javadoc)
     * @see org.apache.struts.action.ActionForm#validate(org.apache.struts.action.ActionMapping, javax.servlet.http.HttpServletRequest)
     */
    public ActionErrors validate(ActionMapping mapping, HttpServletRequest request) {
        return super.validate(mapping, request);
    }
    
    /**
     * @return Returns the activityId.
     */
    public String getActivityId() {
        return activityId;
    }

    /**
     * @param activityId The activityId to set.
     */
    public void setActivityId(String activityId) {
        this.activityId = activityId;
    }
    
    /**
     * @return Returns the fn.
     */
    public String getAction() {
        return action;
    }
    
    /**
     * @param fn The fn to set.
     */
    public void setAction(String fn) {
        this.action = fn;
    }
    
    public String getNewAssigneeName() {
        return newAssigneeName;
    }
    
    public void setNewAssigneeName(String newAssigneeName) {
        this.newAssigneeName = newAssigneeName;
    }

    public Collection getUserInfos() {
        return userInfos;
    }
    
    public void setUserInfos(Collection userInfos) {
        this.userInfos = userInfos;
    }
    
    public boolean isShowDataTypes() {
        return Integer.parseInt(WebShare.getSysParameterValue("WORKFLOW", "ShowDatatype", "1")) != 0 ? true : false;
    }
}