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.ui.dialogs.availability; 029 030import org.opencms.gwt.shared.CmsListInfoBean; 031import org.opencms.gwt.shared.CmsPrincipalBean; 032 033import java.io.Serializable; 034import java.util.Map; 035 036/** 037 * A bean that holds the informations of the availability dialog.<p> 038 */ 039public class CmsAvailabilityInfoBean implements Serializable { 040 041 /** The serial version id. */ 042 private static final long serialVersionUID = -3132436076946143159L; 043 044 /** The default expiration date of a resource, which is: never expires. */ 045 private static final long DATE_EXPIRED_DEFAULT = Long.MAX_VALUE; 046 047 /** The default release date of a resource, which is: always released. */ 048 private static final long DATE_PUBLISH_SCHEDULED_DEFAULT = 0; 049 050 /** The default release date of a resource, which is: always released. */ 051 private static final long DATE_RELEASED_DEFAULT = 0; 052 053 /** The expiration date. */ 054 private long m_dateExpired = DATE_EXPIRED_DEFAULT; 055 056 /** The publish scheduled date. */ 057 private long m_datePubScheduled = DATE_PUBLISH_SCHEDULED_DEFAULT; 058 059 /** The release date. */ 060 private long m_dateReleased = DATE_RELEASED_DEFAULT; 061 062 /** Signals whether the current uri has siblings or not. */ 063 private boolean m_hasSiblings; 064 065 /** Signals whether the siblings of the current uri should be modified or not. */ 066 private boolean m_modifySiblings; 067 068 /** Signals whether the notification is enabled or not. */ 069 private boolean m_notificationEnabled; 070 071 /** The notification interval. */ 072 private int m_notificationInterval; 073 074 /** The page info for displaying the CmsListItemWidget. */ 075 private CmsListInfoBean m_pageInfo; 076 077 /** A Map with all responsible users. */ 078 private Map<CmsPrincipalBean, String> m_responsibles; 079 080 /** The current resource type. */ 081 private String m_resType; 082 083 /** 084 * The default constructor.<p> 085 */ 086 public CmsAvailabilityInfoBean() { 087 088 // noop 089 } 090 091 /** 092 * The public constructor.<p> 093 * 094 * @param resType the resource type 095 * @param datePubScheduled the publish scheduled date 096 * @param dateReleased the release date 097 * @param dateExpired the expiration date 098 * @param notificationInterval the notification interval 099 * @param notificationEnabled the notification flag 100 * @param hasSiblings the sibling flag 101 * @param modifySiblings the modify sibling flag 102 * @param responsibles the responsible users map 103 * @param pageInfo the page info 104 */ 105 public CmsAvailabilityInfoBean( 106 String resType, 107 long datePubScheduled, 108 long dateReleased, 109 long dateExpired, 110 int notificationInterval, 111 boolean notificationEnabled, 112 boolean hasSiblings, 113 boolean modifySiblings, 114 Map<CmsPrincipalBean, String> responsibles, 115 CmsListInfoBean pageInfo) { 116 117 m_resType = resType; 118 m_datePubScheduled = datePubScheduled; 119 m_dateReleased = dateReleased; 120 m_dateExpired = dateExpired; 121 m_notificationInterval = notificationInterval; 122 m_notificationEnabled = notificationEnabled; 123 m_hasSiblings = hasSiblings; 124 m_modifySiblings = modifySiblings; 125 m_responsibles = responsibles; 126 m_pageInfo = pageInfo; 127 } 128 129 /** 130 * Returns the dateExpired.<p> 131 * 132 * @return the dateExpired 133 */ 134 public long getDateExpired() { 135 136 return m_dateExpired; 137 } 138 139 /** 140 * Returns the datePubScheduled.<p> 141 * 142 * @return the datePubScheduled 143 */ 144 public long getDatePubScheduled() { 145 146 return m_datePubScheduled; 147 } 148 149 /** 150 * Returns the dateReleased.<p> 151 * 152 * @return the dateReleased 153 */ 154 public long getDateReleased() { 155 156 return m_dateReleased; 157 } 158 159 /** 160 * Returns the notificationInterval.<p> 161 * 162 * @return the notificationInterval 163 */ 164 public int getNotificationInterval() { 165 166 return m_notificationInterval; 167 } 168 169 /** 170 * Returns the pageInfo.<p> 171 * 172 * @return the pageInfo 173 */ 174 public CmsListInfoBean getPageInfo() { 175 176 return m_pageInfo; 177 } 178 179 /** 180 * Returns the responsibles.<p> 181 * 182 * @return the responsibles 183 */ 184 public Map<CmsPrincipalBean, String> getResponsibles() { 185 186 return m_responsibles; 187 } 188 189 /** 190 * Returns the resType.<p> 191 * 192 * @return the resType 193 */ 194 public String getResType() { 195 196 return m_resType; 197 } 198 199 /** 200 * Returns the hasSiblings.<p> 201 * 202 * @return the hasSiblings 203 */ 204 public boolean isHasSiblings() { 205 206 return m_hasSiblings; 207 } 208 209 /** 210 * Returns the modifySiblings.<p> 211 * 212 * @return the modifySiblings 213 */ 214 public boolean isModifySiblings() { 215 216 return m_modifySiblings; 217 } 218 219 /** 220 * Returns the notificationEnabled.<p> 221 * 222 * @return the notificationEnabled 223 */ 224 public boolean isNotificationEnabled() { 225 226 return m_notificationEnabled; 227 } 228 229 /** 230 * Sets the dateExpired.<p> 231 * 232 * @param dateExpired the dateExpired to set 233 */ 234 public void setDateExpired(long dateExpired) { 235 236 m_dateExpired = dateExpired; 237 } 238 239 /** 240 * Sets the datePubScheduled.<p> 241 * 242 * @param datePubScheduled the datePubScheduled to set 243 */ 244 public void setDatePubScheduled(long datePubScheduled) { 245 246 m_datePubScheduled = datePubScheduled; 247 } 248 249 /** 250 * Sets the dateReleased.<p> 251 * 252 * @param dateReleased the dateReleased to set 253 */ 254 public void setDateReleased(long dateReleased) { 255 256 m_dateReleased = dateReleased; 257 } 258 259 /** 260 * Sets the hasSiblings.<p> 261 * 262 * @param hasSiblings the hasSiblings to set 263 */ 264 public void setHasSiblings(boolean hasSiblings) { 265 266 m_hasSiblings = hasSiblings; 267 } 268 269 /** 270 * Sets the modifySiblings.<p> 271 * 272 * @param modifySiblings the modifySiblings to set 273 */ 274 public void setModifySiblings(boolean modifySiblings) { 275 276 m_modifySiblings = modifySiblings; 277 } 278 279 /** 280 * Sets the notificationEnabled.<p> 281 * 282 * @param notificationEnabled the notificationEnabled to set 283 */ 284 public void setNotificationEnabled(boolean notificationEnabled) { 285 286 m_notificationEnabled = notificationEnabled; 287 } 288 289 /** 290 * Sets the notificationInterval.<p> 291 * 292 * @param notificationInterval the notificationInterval to set 293 */ 294 public void setNotificationInterval(int notificationInterval) { 295 296 m_notificationInterval = notificationInterval; 297 } 298 299 /** 300 * Sets the pageInfo.<p> 301 * 302 * @param pageInfo the pageInfo to set 303 */ 304 public void setPageInfo(CmsListInfoBean pageInfo) { 305 306 m_pageInfo = pageInfo; 307 } 308 309 /** 310 * Sets the responsibles.<p> 311 * 312 * @param responsibles the responsibles to set 313 */ 314 public void setResponsibles(Map<CmsPrincipalBean, String> responsibles) { 315 316 m_responsibles = responsibles; 317 } 318 319 /** 320 * Sets the resType.<p> 321 * 322 * @param resType the resType to set 323 */ 324 public void setResType(String resType) { 325 326 m_resType = resType; 327 } 328}