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.gwt.shared.alias; 029 030import java.util.ArrayList; 031import java.util.List; 032 033import com.google.gwt.user.client.rpc.IsSerializable; 034 035/** 036 * Bean which is sent to the server when validating an alias table.<p> 037 */ 038public class CmsAliasEditValidationRequest implements IsSerializable { 039 040 /** The already edited data. */ 041 private List<CmsAliasTableRow> m_editedData; 042 043 /** The new entry added by the user (may be null). */ 044 private CmsAliasTableRow m_newEntry; 045 046 /** The original data before any of it was edited. */ 047 private List<CmsAliasTableRow> m_originalData; 048 049 /** Default constructor.<p> */ 050 public CmsAliasEditValidationRequest() { 051 052 } 053 054 /** 055 * Creates a new instance.<p> 056 * 057 * @param originalData the original data 058 * @param editedData the edited data 059 * @param newEntry the new entry which has been added (may be null) 060 */ 061 public CmsAliasEditValidationRequest( 062 List<CmsAliasTableRow> originalData, 063 List<CmsAliasTableRow> editedData, 064 CmsAliasTableRow newEntry) { 065 066 m_originalData = originalData; 067 m_editedData = editedData; 068 m_newEntry = newEntry; 069 } 070 071 /** 072 * Gets the edited data.<p> 073 * 074 * @return the edited data 075 */ 076 public List<CmsAliasTableRow> getEditedData() { 077 078 return m_editedData; 079 } 080 081 /** 082 * Gets the new entry added by the user.<p> 083 * 084 * @return the new entry, or null if there is no new entry 085 */ 086 public CmsAliasTableRow getNewEntry() { 087 088 return m_newEntry; 089 } 090 091 /** 092 * Gets the original data list.<p> 093 * 094 * @return the original list of data 095 */ 096 public List<CmsAliasTableRow> getOriginalData() { 097 098 return m_originalData; 099 } 100 101 /** 102 * Sets the edited data list.<p> 103 * 104 * @param data the edited data list 105 */ 106 public void setEditedData(List<CmsAliasTableRow> data) { 107 108 m_editedData = new ArrayList<CmsAliasTableRow>(); 109 m_editedData.addAll(data); 110 } 111 112 /** 113 * Sets the new entry.<p> 114 * 115 * @param newEntry the new entry 116 */ 117 public void setNewEntry(CmsAliasTableRow newEntry) { 118 119 m_newEntry = newEntry; 120 } 121 122 /** 123 * Sets the original data list.<p> 124 * 125 * @param originalData the original data list 126 */ 127 public void setOriginalData(List<CmsAliasTableRow> originalData) { 128 129 m_originalData = originalData; 130 } 131 132}