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.ade.containerpage.shared;
029
030import org.opencms.db.CmsResourceState;
031import org.opencms.gwt.shared.CmsAdditionalInfoBean;
032
033import java.util.ArrayList;
034
035import com.google.gwt.user.client.rpc.IsSerializable;
036
037/**
038 * Represents the setting configuration for a container element.<p>
039 */
040public class CmsElementSettingsConfig implements IsSerializable {
041
042    /** The additional infos to display. */
043    private ArrayList<CmsAdditionalInfoBean> m_additionalInfo;
044
045    /** The data for the container element. */
046    private CmsContainerElementData m_elementData;
047
048    /** Schema path for element. **/
049    private String m_schema;
050
051    /** True if the page is a copy group. */
052    private boolean m_isCopyGroup;
053
054    /** The resource state. */
055    private CmsResourceState m_state;
056
057    /**
058     * Creates a new instance.<p>
059     *
060     * @param elementData the element data
061     * @param state the resource state
062     * @param additionalInfo the additional infos
063     * @param isCopyGroup true if the page is a copy group
064     */
065    public CmsElementSettingsConfig(
066        CmsContainerElementData elementData,
067        CmsResourceState state,
068        ArrayList<CmsAdditionalInfoBean> additionalInfo,
069        String schema,
070        boolean isCopyGroup) {
071
072        m_elementData = elementData;
073        m_additionalInfo = additionalInfo;
074        m_state = state;
075        m_schema = schema;
076        m_isCopyGroup = isCopyGroup;
077    }
078
079    /**
080     * Default constructor for serialization.<p>
081     */
082    protected CmsElementSettingsConfig() {
083        // do nothing
084
085    }
086
087    /**
088     * Gets the additional info items.<p>
089     *
090     * @return the additional info items
091     */
092    public ArrayList<CmsAdditionalInfoBean> getAdditionalInfo() {
093
094        return m_additionalInfo;
095    }
096
097    /**
098     * Gets the element data.<p>
099     *
100     * @return the element data
101     */
102    public CmsContainerElementData getElementData() {
103
104        return m_elementData;
105    }
106
107    /**
108     * Gets the schema path.
109     *
110     * @return the schema path
111     */
112    public String getSchema() {
113
114        return m_schema;
115    }
116
117    /**
118     * The state.<p>
119     *
120     * @return the resource state
121     */
122    public CmsResourceState getState() {
123
124        return m_state;
125    }
126
127    /**
128     * Checks if the page is a copy group.
129     *
130     * @return true if the page is a copy group
131     */
132    public boolean isCopyGroup() {
133
134        return m_isCopyGroup;
135    }
136
137}