001: /**
002: * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE, version 2.1, dated February 1999.
003: *
004: * This program is free software; you can redistribute it and/or modify
005: * it under the terms of the latest version of the GNU Lesser General
006: * Public License as published by the Free Software Foundation;
007: *
008: * This program is distributed in the hope that it will be useful,
009: * but WITHOUT ANY WARRANTY; without even the implied warranty of
010: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
011: * GNU Lesser General Public License for more details.
012: *
013: * You should have received a copy of the GNU Lesser General Public License
014: * along with this program (LICENSE.txt); if not, write to the Free Software
015: * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
016: */package org.jamwiki.model;
017:
018: import org.jamwiki.utils.WikiLogger;
019:
020: /**
021: * Provides an object representing the difference between two topic versions,
022: * as created by {@link org.jamwiki.utils.DiffUtil}.
023: */
024: public class WikiDiff {
025:
026: private static final WikiLogger logger = WikiLogger
027: .getLogger(WikiDiff.class.getName());
028: private boolean change = false;
029: private String newLine = null;
030: private String oldLine = null;
031: private int lineNumber = -1;
032:
033: /**
034: *
035: */
036: public WikiDiff() {
037: }
038:
039: /**
040: *
041: */
042: public WikiDiff(String oldLine, String newLine, int lineNumber,
043: boolean change) {
044: this .oldLine = oldLine;
045: this .newLine = newLine;
046: this .lineNumber = lineNumber;
047: this .change = change;
048: }
049:
050: /**
051: *
052: */
053: public boolean getChange() {
054: return this .change;
055: }
056:
057: /**
058: *
059: */
060: public void setChange(boolean change) {
061: this .change = change;
062: }
063:
064: /**
065: *
066: */
067: public int getLineNumber() {
068: return this .lineNumber;
069: }
070:
071: /**
072: *
073: */
074: public void setLineNumber(int lineNumber) {
075: this .lineNumber = lineNumber;
076: }
077:
078: /**
079: *
080: */
081: public String getNewLine() {
082: return this .newLine;
083: }
084:
085: /**
086: *
087: */
088: public void setNewLine(String newLine) {
089: this .newLine = newLine;
090: }
091:
092: /**
093: *
094: */
095: public String getOldLine() {
096: return this .oldLine;
097: }
098:
099: /**
100: *
101: */
102: public void setOldLine(String oldLine) {
103: this.oldLine = oldLine;
104: }
105: }
|