/*
 * $Id: TabId.java,v 1.13 2006/11/06 10:48:59 korowa Exp $
 *
 * Copyright (c) Siemens AG 2008 
 *           (c) Universität Paderborn 2008 
 * Licensed under EUPL 1.1. 
 *
 * $Log: TabId.java,v $
 * Revision 1.13  2006/11/06 10:48:59  korowa
 * Tabview License und  Admintabview License hinzugefügt
 *
 * Revision 1.12  2006/09/07 01:54:03  marbobo
 * + TabIds überarbeitet
 *
 * Revision 1.11  2006/05/12 22:14:48  marbobo
 * + Administrationssicht implementiert
 *
 * Revision 1.10  2005/06/15 12:10:04  jonyp
 * + TRASH_TAB
 *
 * Revision 1.9  2004/08/30 14:47:51  koppy
 * + Workflow TabId
 *
 * Revision 1.8  2004/07/20 08:57:44  jonyp
 * added copyright info + cvs log
 *
 *
 */
package vkc.view;

import java.util.HashMap;

import vkc.db.serializer.VKCTabViewSerializer;
import vkc.exception.DBException;

/**
 * Class defines a set of constants associated with tabs
 * in the browser view
 * <p>
 * @author bigmac
 */
public final class TabId {
    public final static int DOCUMENT_TAB;
    public final static int MESSENGER_TAB;
    public final static int PROFILE_TAB;
    public final static int SEARCH_TAB;
    public final static int HELP_TAB;
    public final static int BESTSELLER_TAB;
    public final static int LATESTADDITIONS_TAB;
	public final static int HISTORY_TAB;
	public final static int FAVORITES_TAB;
	public final static int NEWS_TAB;
	public final static int WORKFLOW_TAB;
	public final static int TRASH_TAB;
	public final static int LICENSE_TAB;
	
	public final static int ADMIN_USERMANAGEMENT_TAB;
	public final static int ADMIN_GROUPMANAGEMENT_TAB;
	public final static int ADMIN_ACTIVEUSERS_TAB;
	public final static int ADMIN_SENDEMAIL_TAB;
	public final static int ADMIN_SYSTEMPARAMETERS_TAB;
	public final static int ADMIN_SYSTEMDEFAULTS_TAB;
	public final static int ADMIN_SYSTEMMAINTENANCE_TAB;
	public final static int ADMIN_NEWSMANAGEMENT_TAB;
	public final static int ADMIN_SHOWSTATISTICS_TAB;
	public final static int ADMIN_LDAP_TAB;
	public final static int ADMIN_LICENSE_TAB;
	
	static {
		HashMap tabIds = null;
		
		try {
			tabIds = VKCTabViewSerializer.getTabIdsMappedByUniqueName();
		} catch (DBException e) {
			tabIds = new HashMap();
		}
		
	    DOCUMENT_TAB = ((Integer)tabIds.get(TabUniqueName.DOCUMENT_TAB)).intValue();
	    MESSENGER_TAB = ((Integer)tabIds.get(TabUniqueName.MESSENGER_TAB)).intValue();
	    PROFILE_TAB = ((Integer)tabIds.get(TabUniqueName.PROFILE_TAB)).intValue();
	    SEARCH_TAB = ((Integer)tabIds.get(TabUniqueName.SEARCH_TAB)).intValue();
	    HELP_TAB = ((Integer)tabIds.get(TabUniqueName.HELP_TAB)).intValue();
	    BESTSELLER_TAB = ((Integer)tabIds.get(TabUniqueName.BESTSELLER_TAB)).intValue();
	    LATESTADDITIONS_TAB = ((Integer)tabIds.get(TabUniqueName.LATESTADDITIONS_TAB)).intValue();
		HISTORY_TAB = ((Integer)tabIds.get(TabUniqueName.HISTORY_TAB)).intValue();
		FAVORITES_TAB = ((Integer)tabIds.get(TabUniqueName.FAVORITES_TAB)).intValue();
		NEWS_TAB = ((Integer)tabIds.get(TabUniqueName.NEWS_TAB)).intValue();
		WORKFLOW_TAB = ((Integer)tabIds.get(TabUniqueName.WORKFLOW_TAB)).intValue();
		TRASH_TAB = ((Integer)tabIds.get(TabUniqueName.TRASH_TAB)).intValue();
		LICENSE_TAB = ((Integer)tabIds.get(TabUniqueName.LICENSE_TAB)).intValue();
		
		ADMIN_USERMANAGEMENT_TAB = ((Integer)tabIds.get(TabUniqueName.ADMIN_USERMANAGEMENT_TAB)).intValue();
		ADMIN_GROUPMANAGEMENT_TAB = ((Integer)tabIds.get(TabUniqueName.ADMIN_GROUPMANAGEMENT_TAB)).intValue();
		ADMIN_ACTIVEUSERS_TAB = ((Integer)tabIds.get(TabUniqueName.ADMIN_ACTIVEUSERS_TAB)).intValue();
		ADMIN_SENDEMAIL_TAB = ((Integer)tabIds.get(TabUniqueName.ADMIN_SENDEMAIL_TAB)).intValue();
		ADMIN_SYSTEMPARAMETERS_TAB = ((Integer)tabIds.get(TabUniqueName.ADMIN_SYSTEMPARAMETERS_TAB)).intValue();
		ADMIN_SYSTEMDEFAULTS_TAB = ((Integer)tabIds.get(TabUniqueName.ADMIN_SYSTEMDEFAULTS_TAB)).intValue();
		ADMIN_SYSTEMMAINTENANCE_TAB = ((Integer)tabIds.get(TabUniqueName.ADMIN_SYSTEMMAINTENANCE_TAB)).intValue();
		ADMIN_NEWSMANAGEMENT_TAB = ((Integer)tabIds.get(TabUniqueName.ADMIN_NEWSMANAGEMENT_TAB)).intValue();
		ADMIN_SHOWSTATISTICS_TAB = ((Integer)tabIds.get(TabUniqueName.ADMIN_SHOWSTATISTICS_TAB)).intValue();
		ADMIN_LDAP_TAB = ((Integer)tabIds.get(TabUniqueName.ADMIN_LDAP_TAB)).intValue();
		ADMIN_LICENSE_TAB = ((Integer)tabIds.get(TabUniqueName.ADMIN_LICENSE_TAB)).intValue();
	}

	private TabId () {
    }
}