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 java.util.List;
031
032import com.google.gwt.user.client.rpc.IsSerializable;
033
034/**
035 * A bean that holds the upload file infos.<p>
036 *
037 * @since 8.0.0
038 */
039public class CmsUploadFileBean implements IsSerializable {
040
041    /** The active upload flag. */
042    private boolean m_active;
043
044    /** The list of resource names that already exist on the VFS. */
045    private List<String> m_existingFileNames;
046
047    /** The list of filenames that are invalid. */
048    private List<String> m_invalidFileNames;
049
050    /** The list of filenames that point to existing but deleted files. */
051    private List<String> m_existingDeletedFileNames;
052
053    /**
054     * The default constructor.<p>
055     */
056    public CmsUploadFileBean() {
057
058        // noop
059    }
060
061    /**
062     * The constructor with parameters.<p>
063     *
064     * @param existingFileNames list of filenames that already exist on the VFS
065     * @param invalidFileNames list of filenames that are invalid
066     * @param existingDeleted the list of filenames that point to existing but deleted files
067     * @param active the upload active flag
068     */
069    public CmsUploadFileBean(
070        List<String> existingFileNames,
071        List<String> invalidFileNames,
072        List<String> existingDeleted,
073        boolean active) {
074
075        m_existingFileNames = existingFileNames;
076        m_invalidFileNames = invalidFileNames;
077        m_existingDeletedFileNames = existingDeleted;
078        m_active = active;
079    }
080
081    /**
082     * Returns the list of filenames that point to existing but deleted files.<p>
083     *
084     * @return the list of filenames that point to existing but deleted files
085     */
086    public List<String> getExistingDeletedFileNames() {
087
088        return m_existingDeletedFileNames;
089    }
090
091    /**
092     * Returns the list of resource names that already exist on the VFS.<p>
093     *
094     * @return the list of resource names that already exist on the VFS
095     */
096    public List<String> getExistingResourceNames() {
097
098        return m_existingFileNames;
099    }
100
101    /**
102     * Returns the list of filenames that are invalid.<p>
103     *
104     * @return the list of filenames that are invalid
105     */
106    public List<String> getInvalidFileNames() {
107
108        return m_invalidFileNames;
109    }
110
111    /**
112     * Returns the active.<p>
113     *
114     * @return the active
115     */
116    public boolean isActive() {
117
118        return m_active;
119    }
120
121    /**
122     * Sets the active.<p>
123     *
124     * @param active the active to set
125     */
126    public void setActive(boolean active) {
127
128        m_active = active;
129    }
130
131    /**
132     * Sets the list of filenames that point to existing but deleted files.<p>
133     *
134     * @param existingDeletedFileNames list of filenames that point to existing but deleted files
135     */
136    public void setExistingDeletedFileNames(List<String> existingDeletedFileNames) {
137
138        m_existingDeletedFileNames = existingDeletedFileNames;
139    }
140
141    /**
142     * Sets the list of resource names that already exist on the VFS.<p>
143     *
144     * @param existingResourceNames the list of resource names that already exist on the VFS to set
145     */
146    public void setExistingResourceNames(List<String> existingResourceNames) {
147
148        m_existingFileNames = existingResourceNames;
149    }
150
151    /**
152     * Sets the list of filenames that are invalid.<p>
153     *
154     * @param invalidFileNames the list of filenames that are invalid to set
155     */
156    public void setInvalidFileNames(List<String> invalidFileNames) {
157
158        m_invalidFileNames = invalidFileNames;
159    }
160}