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.ade.postupload.shared;
029
030import org.opencms.gwt.shared.CmsListInfoBean;
031import org.opencms.gwt.shared.property.CmsClientProperty;
032import org.opencms.util.CmsUUID;
033import org.opencms.xml.content.CmsXmlContentProperty;
034
035import java.util.Map;
036
037import com.google.gwt.user.client.rpc.IsSerializable;
038
039/**
040 * A bean representing the state of a single resource to be edited in the upload property dialog.<p>
041 */
042public class CmsPostUploadDialogPanelBean implements IsSerializable {
043
044    /** The warning to display. */ 
045    private String m_warning;
046
047    /** The page info for displaying the CmsListItemWidget. */
048    private CmsListInfoBean m_infoBean;
049
050    /** The properties of the resource. */
051    private Map<String, CmsClientProperty> m_properties;
052
053    /** The property definitions for the resource type of the resource. */
054    private Map<String, CmsXmlContentProperty> m_propertyDefinitions;
055
056    /** The structure id of the resource. */
057    private CmsUUID m_structureId;
058
059    /**
060     * Creates a new instance.<p>
061     */
062    public CmsPostUploadDialogPanelBean() {
063
064    }
065
066    /**
067     * Creates a new instance.<p>
068     *
069     * @param structureId the structure id of the resource
070     * @param infoBean the list info bean
071     */
072    public CmsPostUploadDialogPanelBean(CmsUUID structureId, CmsListInfoBean infoBean) {
073
074        m_structureId = structureId;
075        m_infoBean = infoBean;
076
077    }
078
079    /**
080     * Gets the info bean for the resource.<p>
081     *
082     * @return the info bean for the resource
083     */
084    public CmsListInfoBean getInfoBean() {
085
086        return m_infoBean;
087    }
088
089    /**
090     * Gets the properties for the resource.<p>
091     *
092     * @return the map of properties by property name
093     */
094    public Map<String, CmsClientProperty> getProperties() {
095
096        return m_properties;
097    }
098
099    /**
100     * Gets the property definitions for the type of the resource.<p>
101     *
102     * @return the map of property definitions by property names
103     */
104    public Map<String, CmsXmlContentProperty> getPropertyDefinitions() {
105
106        return m_propertyDefinitions;
107    }
108
109    /**
110     * Gets the structure id of the resource.<p>
111     *
112     * @return the user id
113     */
114    public CmsUUID getStructureId() {
115
116        return m_structureId;
117    }
118
119    /**
120     * Gets the warning to display.
121     * 
122     * @return the warning to display
123     */
124    public String getWarning() {
125
126        return m_warning;
127    }
128
129    /**
130     * Sets the list info bean for the resource.<p>
131     *
132     * @param info the list info bean for the resource
133     */
134    public void setInfoBean(CmsListInfoBean info) {
135
136        m_infoBean = info;
137    }
138
139    /**
140     * Sets the properties for the resource.<p>
141     *
142     * @param properties the properties for the resource
143     */
144    public void setProperties(Map<String, CmsClientProperty> properties) {
145
146        m_properties = properties;
147
148    }
149
150    /**
151     * Sets the property definitions for the type of the resource.<p>
152     *
153     * @param propertyDefinitions the map of property definitions
154     */
155    public void setPropertyDefinitions(Map<String, CmsXmlContentProperty> propertyDefinitions) {
156
157        m_propertyDefinitions = propertyDefinitions;
158    }
159
160    /**
161     * Sets the structure id of the resource.<p>
162     *
163     * @param structureId the structure id of the resource
164     */
165    public void setStructureId(CmsUUID structureId) {
166
167        m_structureId = structureId;
168    }
169
170    /**
171     * Sets the warning to display.
172     * 
173     * @param warning the warning to display
174     */
175    public void setWarning(String warning) {
176
177        m_warning = warning;
178    }
179
180}