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 page info for displaying the CmsListItemWidget. */ 045 private CmsListInfoBean m_infoBean; 046 047 /** The properties of the resource. */ 048 private Map<String, CmsClientProperty> m_properties; 049 050 /** The property definitions for the resource type of the resource. */ 051 private Map<String, CmsXmlContentProperty> m_propertyDefinitions; 052 053 /** The structure id of the resource. */ 054 private CmsUUID m_structureId; 055 056 /** 057 * Creates a new instance.<p> 058 */ 059 public CmsPostUploadDialogPanelBean() { 060 061 } 062 063 /** 064 * Creates a new instance.<p> 065 * 066 * @param structureId the structure id of the resource 067 * @param infoBean the list info bean 068 */ 069 public CmsPostUploadDialogPanelBean(CmsUUID structureId, CmsListInfoBean infoBean) { 070 071 m_structureId = structureId; 072 m_infoBean = infoBean; 073 074 } 075 076 /** 077 * Gets the info bean for the resource.<p> 078 * 079 * @return the info bean for the resource 080 */ 081 public CmsListInfoBean getInfoBean() { 082 083 return m_infoBean; 084 } 085 086 /** 087 * Gets the properties for the resource.<p> 088 * 089 * @return the map of properties by property name 090 */ 091 public Map<String, CmsClientProperty> getProperties() { 092 093 return m_properties; 094 } 095 096 /** 097 * Gets the property definitions for the type of the resource.<p> 098 * 099 * @return the map of property definitions by property names 100 */ 101 public Map<String, CmsXmlContentProperty> getPropertyDefinitions() { 102 103 return m_propertyDefinitions; 104 } 105 106 /** 107 * Gets the structure id of the resource.<p> 108 * 109 * @return the user id 110 */ 111 public CmsUUID getStructureId() { 112 113 return m_structureId; 114 } 115 116 /** 117 * Sets the list info bean for the resource.<p> 118 * 119 * @param info the list info bean for the resource 120 */ 121 public void setInfoBean(CmsListInfoBean info) { 122 123 m_infoBean = info; 124 } 125 126 /** 127 * Sets the properties for the resource.<p> 128 * 129 * @param properties the properties for the resource 130 */ 131 public void setProperties(Map<String, CmsClientProperty> properties) { 132 133 m_properties = properties; 134 135 } 136 137 /** 138 * Sets the property definitions for the type of the resource.<p> 139 * 140 * @param propertyDefinitions the map of property definitions 141 */ 142 public void setPropertyDefinitions(Map<String, CmsXmlContentProperty> propertyDefinitions) { 143 144 m_propertyDefinitions = propertyDefinitions; 145 } 146 147 /** 148 * Sets the structure id of the resource.<p> 149 * 150 * @param structureId the structure id of the resource 151 */ 152 public void setStructureId(CmsUUID structureId) { 153 154 m_structureId = structureId; 155 } 156 157}