001/* 002 * (C) Copyright 2006-2007 Nuxeo SA (http://nuxeo.com/) and others. 003 * 004 * Licensed under the Apache License, Version 2.0 (the "License"); 005 * you may not use this file except in compliance with the License. 006 * You may obtain a copy of the License at 007 * 008 * http://www.apache.org/licenses/LICENSE-2.0 009 * 010 * Unless required by applicable law or agreed to in writing, software 011 * distributed under the License is distributed on an "AS IS" BASIS, 012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 013 * See the License for the specific language governing permissions and 014 * limitations under the License. 015 * 016 * Contributors: 017 * Max Stepanov 018 * 019 * $Id$ 020 */ 021 022package org.nuxeo.ecm.platform.domsync.core.events; 023 024/** 025 * @author Max Stepanov 026 */ 027public class DOMCharacterDataModifiedEvent extends DOMMutationEvent { 028 029 private static final long serialVersionUID = -5523031456812911018L; 030 031 private final String newValue; 032 033 public DOMCharacterDataModifiedEvent(String target, String newValue) { 034 super(target); 035 this.newValue = newValue; 036 } 037 038 public String getNewValue() { 039 return newValue; 040 } 041 042 @Override 043 public boolean equals(Object obj) { 044 if (obj instanceof DOMCharacterDataModifiedEvent) { 045 return super.equals(obj) && newValue.equals(((DOMCharacterDataModifiedEvent) obj).newValue); 046 } 047 return false; 048 } 049 050 @Override 051 public String toString() { 052 return "DOMCharacterDataModifiedEvent " + super.toString() + " newValue=" + newValue; 053 } 054}