1185N/A/*
1185N/A * CDDL HEADER START
1185N/A *
1185N/A * The contents of this file are subject to the terms of the
1185N/A * Common Development and Distribution License (the "License").
1185N/A * You may not use this file except in compliance with the License.
1185N/A *
1185N/A * See LICENSE.txt included in this distribution for the specific
1185N/A * language governing permissions and limitations under the License.
1185N/A *
1185N/A * When distributing Covered Code, include this CDDL HEADER in each
1185N/A * file and include the License file at LICENSE.txt.
1185N/A * If applicable, add the following below this CDDL HEADER, with the
1185N/A * fields enclosed by brackets "[]" replaced with your own identifying
1185N/A * information: Portions Copyright [yyyy] [name of copyright owner]
1185N/A *
1185N/A * CDDL HEADER END
1185N/A */
1220N/A
1185N/A/*
1185N/A * Copyright 2009 - 2011 Jens Elkner.
1185N/A */
1185N/Apackage org.opensolaris.opengrok.web;
1185N/A
1185N/Aimport org.apache.commons.jrcs.diff.Revision;
1185N/Aimport org.opensolaris.opengrok.analysis.FileAnalyzer.Genre;
1185N/A
1185N/A/**
1185N/A * A simple container to store the data required to generated a view of diffs
1185N/A * for a certain versioned file.
1465N/A * NOTE:
1465N/A * For HTML revision escaping is usually not needed, but filenames should be.
1465N/A * For URI's both, filenames and revisions, should be encoded.
1190N/A *
1185N/A * @author Jens Elkner
1185N/A * @version $Revision$
1185N/A */
1185N/Apublic class DiffData {
1465N/A /** request URI, that has been used to fetch this data, i.e. something like
1465N/A * /$webapp/diff/$path/$filename (NOTE: no query string!).
1465N/A * E.g.: /source/diff/opengrok/src/org/opensolaris/opengrok/web/PageConfig.java */
1388N/A public String reqURI;
1185N/A /** the genre of the requested diff */
1185N/A public Genre genre;
1185N/A /** the orignal and new revision container */
1185N/A public Revision revision;
1465N/A /** file part of the URI request parameter 'r1' (decoded).
1465N/A * E.g. /opengrok/src/org/opensolaris/opengrok/web/PageConfig.java */
1465N/A public String fp1;
1465N/A /** file part of the URI request parameter 'r2' (decoded).
1465N/A * E.g. /opengrok/src/org/opensolaris/opengrok/web/PageConfig.java */
1465N/A public String fp2;
1465N/A /** revision part of the URI request parameter 'r1' (decoded).
1465N/A * E.g. 1374:a34d0ff8421d */
1465N/A public String rev1;
1465N/A /** revision part of the URI request parameter 'r2' (decoded).
1465N/A * E.g. 1402:4bad063b48d3 */
1465N/A public String rev2;
1465N/A
1465N/A /** the URI encoded request parameter 'r1' ({@link #fp1}@{@link #rev1}).
1465N/A * E.g. /opengrok/src/org/opensolaris/opengrok/web/PageConfig.java@1374:a34d0ff8421d */
1388N/A public String rp1;
1465N/A /** the URI encoded request parameter 'r2' ({@link #fp2}@{@link #rev2}).
1465N/A * E.g. /opengrok/src/org/opensolaris/opengrok/web/PageConfig.java@1402:4bad063b48d3 */
1388N/A public String rp2;
1468N/A /** the content of the original {@link #rev1} and new {@link #rev2} file.
1468N/A * Each entry in file[n] represents exactly one line of source. */
1185N/A public String[][] file;
1465N/A /** html encoded error message to show, if diffs are not available */
1185N/A public String errorMsg;
1185N/A /** If {@code true} a full diff is desired (request parameter {@code full=1} */
1185N/A public boolean full;
1185N/A /** How should the data be displayed (request parameter {@code format} */
1185N/A public DiffType type;
1185N/A}