Source code: com/xpn/xwiki/doc/MetaDataDiff.java
1 /**
2 * ===================================================================
3 *
4 * Copyright (c) 2003,2004 Ludovic Dubost, All rights reserved.
5 *
6 * This program is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public License
8 * as published by the Free Software Foundation; either version 2
9 * of the License, or (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU Lesser General Public License for more details, published at
15 * http://www.gnu.org/copyleft/lesser.html or in lesser.txt in the
16 * root folder of this distribution.
17
18 * Created by
19 * User: Ludovic Dubost
20 * Date: 22 juin 2004
21 * Time: 13:24:57
22 */
23 package com.xpn.xwiki.doc;
24
25 public class MetaDataDiff extends Object {
26 private String field;
27 private Object prevvalue;
28 private Object newvalue;
29
30 public MetaDataDiff(String field, Object prevvalue, Object newvalue) {
31 this.setField(field);
32 this.setPrevvalue(prevvalue);
33 this.setNewvalue(newvalue);
34 }
35
36 public String getField() {
37 return field;
38 }
39
40 public void setField(String field) {
41 this.field = field;
42 }
43
44 public Object getPrevvalue() {
45 return prevvalue;
46 }
47
48 public void setPrevvalue(Object prevvalue) {
49 this.prevvalue = prevvalue;
50 }
51
52 public Object getNewvalue() {
53 return newvalue;
54 }
55
56 public void setNewvalue(Object newvalue) {
57 this.newvalue = newvalue;
58 }
59
60 public String toString() {
61 StringBuffer buf = new StringBuffer(field);
62 buf.append(": ");
63 buf.append(prevvalue.toString());
64 buf.append(" > ");
65 buf.append(newvalue.toString());
66 return buf.toString();
67 }
68 }