001/*
002 * This library is part of OpenCms -
003 * the Open Source Content Management System
004 *
005 * Copyright (C) Alkacon Software (http://www.alkacon.com)
006 *
007 * This library is free software; you can redistribute it and/or
008 * modify it under the terms of the GNU Lesser General Public
009 * License as published by the Free Software Foundation; either
010 * version 2.1 of the License, or (at your option) any later version.
011 *
012 * This library is distributed in the hope that it will be useful,
013 * but WITHOUT ANY WARRANTY; without even the implied warranty of
014 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
015 * Lesser General Public License for more details.
016 *
017 * For further information about Alkacon Software, please see the
018 * company website: http://www.alkacon.com
019 *
020 * For further information about OpenCms, please see the
021 * project website: http://www.opencms.org
022 *
023 * You should have received a copy of the GNU Lesser General Public
024 * License along with this library; if not, write to the Free Software
025 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
026 */
027
028package org.opencms.gwt;
029
030import static org.opencms.gwt.Messages.GUI_STATUS_TAB_FROM_CP_0;
031import static org.opencms.gwt.Messages.GUI_STATUS_TAB_FROM_OTHER_0;
032import static org.opencms.gwt.Messages.GUI_STATUS_TAB_FROM_XML_0;
033import static org.opencms.gwt.Messages.GUI_STATUS_TAB_SIBLINGS_0;
034import static org.opencms.gwt.Messages.GUI_STATUS_TAB_STATUS_0;
035import static org.opencms.gwt.Messages.GUI_STATUS_TAB_TO_CP_0;
036import static org.opencms.gwt.Messages.GUI_STATUS_TAB_TO_OTHER_0;
037import static org.opencms.gwt.Messages.GUI_STATUS_TAB_TO_XML_0;
038import static org.opencms.gwt.Messages.get;
039import static org.opencms.gwt.shared.CmsResourceStatusTabId.tabRelationsFrom;
040import static org.opencms.gwt.shared.CmsResourceStatusTabId.tabRelationsTo;
041import static org.opencms.gwt.shared.CmsResourceStatusTabId.tabSiblings;
042import static org.opencms.gwt.shared.CmsResourceStatusTabId.tabStatus;
043
044import org.opencms.gwt.shared.CmsResourceStatusTabId;
045import org.opencms.i18n.CmsMessageContainer;
046
047import java.util.Collections;
048import java.util.LinkedHashMap;
049import java.util.Map;
050
051import com.google.common.collect.Maps;
052
053/**
054 * Constants for the resource info dialog.<p>
055 */
056public final class CmsResourceStatusConstants {
057
058    /** Tab configuration for container pages. */
059    public static final Map<CmsResourceStatusTabId, CmsMessageContainer> STATUS_TABS_CONTAINER_PAGE;
060
061    /** Tab configuration for contents. */
062    public static final Map<CmsResourceStatusTabId, CmsMessageContainer> STATUS_TABS_CONTENT;
063
064    /** Tab configuration for other resources. */
065    public static final Map<CmsResourceStatusTabId, CmsMessageContainer> STATUS_TABS_OTHER;
066
067    /**
068     * Hidden default constructor.<p>
069     */
070    private CmsResourceStatusConstants() {
071
072    }
073
074    static {
075        LinkedHashMap<CmsResourceStatusTabId, CmsMessageContainer> pageTabs = Maps.newLinkedHashMap();
076        pageTabs.put(tabRelationsFrom, get().container(GUI_STATUS_TAB_FROM_CP_0));
077        pageTabs.put(tabStatus, get().container(GUI_STATUS_TAB_STATUS_0));
078        pageTabs.put(tabRelationsTo, get().container(GUI_STATUS_TAB_TO_CP_0));
079        pageTabs.put(tabSiblings, get().container(GUI_STATUS_TAB_SIBLINGS_0));
080        STATUS_TABS_CONTAINER_PAGE = Collections.unmodifiableMap(pageTabs);
081
082        LinkedHashMap<CmsResourceStatusTabId, CmsMessageContainer> contentTabs = Maps.newLinkedHashMap();
083        contentTabs.put(tabRelationsFrom, get().container(GUI_STATUS_TAB_FROM_XML_0));
084        contentTabs.put(tabStatus, get().container(GUI_STATUS_TAB_STATUS_0));
085        contentTabs.put(tabRelationsTo, get().container(GUI_STATUS_TAB_TO_XML_0));
086        contentTabs.put(tabSiblings, get().container(GUI_STATUS_TAB_SIBLINGS_0));
087        STATUS_TABS_CONTENT = Collections.unmodifiableMap(contentTabs);
088
089        LinkedHashMap<CmsResourceStatusTabId, CmsMessageContainer> otherTabs = Maps.newLinkedHashMap();
090        otherTabs.put(tabRelationsTo, get().container(GUI_STATUS_TAB_TO_OTHER_0));
091        otherTabs.put(tabStatus, get().container(GUI_STATUS_TAB_STATUS_0));
092        otherTabs.put(tabRelationsFrom, get().container(GUI_STATUS_TAB_FROM_OTHER_0));
093        otherTabs.put(tabSiblings, get().container(GUI_STATUS_TAB_SIBLINGS_0));
094        STATUS_TABS_OTHER = Collections.unmodifiableMap(otherTabs);
095    }
096
097}