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 com.google.gwt.user.client.rpc.IsSerializable; 031 032/** 033 * File replace dialog info.<p> 034 */ 035public class CmsReplaceInfo implements IsSerializable { 036 037 /** The file info. */ 038 private CmsListInfoBean m_fileInfo; 039 040 /** If the file is lockable. */ 041 private boolean m_isLockable; 042 043 /** The maximum file upload size. */ 044 private long m_maxFileSize; 045 046 /** The resource site path. */ 047 private String m_sitepath; 048 049 /** 050 * Constructor.<p> 051 * 052 * @param fileInfo the file info 053 * @param sitepath the resource site path 054 * @param isLockable if the file is lockable 055 * @param maxFileSize the maximum file upload size 056 */ 057 public CmsReplaceInfo(CmsListInfoBean fileInfo, String sitepath, boolean isLockable, long maxFileSize) { 058 059 m_fileInfo = fileInfo; 060 m_sitepath = sitepath; 061 m_isLockable = isLockable; 062 m_maxFileSize = maxFileSize; 063 } 064 065 /** 066 * Constructor. For serialization only.<p> 067 */ 068 protected CmsReplaceInfo() { 069 070 // nothing to do 071 } 072 073 /** 074 * Returns the file info.<p> 075 * 076 * @return the file info 077 */ 078 public CmsListInfoBean getFileInfo() { 079 080 return m_fileInfo; 081 } 082 083 /** 084 * Returns the maximum file upload size.<p> 085 * 086 * @return the maximum file upload size 087 */ 088 public long getMaxFileSize() { 089 090 return m_maxFileSize; 091 } 092 093 /** 094 * Returns the resource site path.<p> 095 * 096 * @return the resource site path 097 */ 098 public String getSitepath() { 099 100 return m_sitepath; 101 } 102 103 /** 104 * Returns if the file is lockable.<p> 105 * 106 * @return <code>true</code> if the file is lockable 107 */ 108 public boolean isLockable() { 109 110 return m_isLockable; 111 } 112}