/*
 * $Id: LdapServerListForm.java,v 1.4 2004/11/10 15:02:49 koppy Exp $
 *
 * Copyright (c) Siemens AG 2008 
 *           (c) Universität Paderborn 2008 
 * Licensed under EUPL 1.1. 
 *
 * $Log: LdapServerListForm.java,v $
 * Revision 1.4  2004/11/10 15:02:49  koppy
 * Projektweite Überarbeitung von Error-Logs, Stacktraces,..
 *
 * Revision 1.3  2004/10/18 13:18:36  vchris
 * *** empty log message ***
 *
 * Revision 1.2  2004/10/18 00:26:56  vchris
 * *** empty log message ***
 *
 * Revision 1.1  2004/10/15 15:42:08  vchris
 * Initiale Version
 *
 *
 * @author: vchris
 * 
 **/

package vkc.ldap.administration.form;

import java.util.Collection;
import javax.servlet.http.HttpServletRequest;
import org.apache.struts.action.ActionMapping;
import vkc.ldap.db.serializer.VKCLdapServerSerializer;
import vkc.misc.VKCLogManager;
import vkc.view.form.BasicActionForm;

public class LdapServerListForm extends BasicActionForm {
	
	private String 		selectedContext = "";
	private Integer 	selectedIds[] = new Integer [0];
	private String    	selectedCmdAction 	= "noaction";
	
    public void reset(ActionMapping mapping, HttpServletRequest request) {
        super.reset(mapping, request);
    }
    
	public Collection getAllLdapServers() {

		Collection ldapservers = null;
		
		try {
			ldapservers = VKCLdapServerSerializer.getAllLdapServers().values();
		}
		catch (Exception e) {
			VKCLogManager.errorLog(this, "", "Could not retrieve all LDAP Servers from DB",e);
		}
	  	
	  	return ldapservers;
	  	
	}    
    
	public Integer[] getSelectedIds() {
		return selectedIds;
	}

	public void setSelectedIds(Integer[] integers) {
		selectedIds = integers;
	}

	public String getSelectedCmdAction() {
		return selectedCmdAction;
	}

	public String getSelectedContext() {
		return selectedContext;
	}

	public void setSelectedCmdAction(String string) {
		selectedCmdAction = string;
	}

	public void setSelectedContext(String string) {
		selectedContext = string;
	}

}