001/*
002 * This library is part of OpenCms -
003 * the Open Source Content Management System
004 *
005 * Copyright (c) Alkacon Software GmbH & Co. KG (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.shared;
029
030import org.opencms.util.CmsUUID;
031
032import java.util.List;
033
034import com.google.gwt.user.client.rpc.IsSerializable;
035
036/**
037 * Category information for a specific resource.<p>
038 */
039public class CmsResourceCategoryInfo implements IsSerializable {
040
041    /** The category tree. */
042    private List<CmsCategoryTreeEntry> m_categoryTree;
043
044    /** The current resource categories. */
045    private List<String> m_currentCategories;
046
047    /** The resource info bean. */
048    private CmsListInfoBean m_resourceInfo;
049
050    /** The resource structure id. */
051    private CmsUUID m_structureId;
052
053    /**
054     * Constructor.<p>
055     *
056     * @param structureId the resource structure id
057     * @param resourceInfo the resource info bean
058     * @param currentCategories the current resource categories
059     * @param categoryTree the category tree
060     */
061    public CmsResourceCategoryInfo(
062        CmsUUID structureId,
063        CmsListInfoBean resourceInfo,
064        List<String> currentCategories,
065        List<CmsCategoryTreeEntry> categoryTree) {
066
067        m_structureId = structureId;
068        m_resourceInfo = resourceInfo;
069        m_currentCategories = currentCategories;
070        m_categoryTree = categoryTree;
071    }
072
073    /**
074     * Constructor, for serialization only.<p>
075     */
076    protected CmsResourceCategoryInfo() {
077
078        // nothing to do
079    }
080
081    /**
082     * Returns the category tree.<p>
083     *
084     * @return the category tree
085     */
086    public List<CmsCategoryTreeEntry> getCategoryTree() {
087
088        return m_categoryTree;
089    }
090
091    /**
092     * Returns the current resource categories.<p>
093     *
094     * @return the current resource categories
095     */
096    public List<String> getCurrentCategories() {
097
098        return m_currentCategories;
099    }
100
101    /**
102     * Returns the resource info bean.<p>
103     *
104     * @return the resource info bean
105     */
106    public CmsListInfoBean getResourceInfo() {
107
108        return m_resourceInfo;
109    }
110
111    /**
112     * Returns the resource structure id.<p>
113     *
114     * @return the resource structure id
115     */
116    public CmsUUID getStructureId() {
117
118        return m_structureId;
119    }
120}