001: /*
002: * ====================================================================
003: * Copyright (c) 2004-2008 TMate Software Ltd. All rights reserved.
004: *
005: * This software is licensed as described in the file COPYING, which
006: * you should have received as part of this distribution. The terms
007: * are also available at http://svnkit.com/license.html
008: * If newer versions of this license are posted there, you may use a
009: * newer version instead, at your option.
010: * ====================================================================
011: */
012: package org.tmatesoft.svn.core.wc;
013:
014: import java.io.File;
015:
016: import org.tmatesoft.svn.core.SVNNodeKind;
017: import org.tmatesoft.svn.core.SVNURL;
018:
019: /**
020: * The <b>SVNDiffStatus</b> class is used to provide short information on path changes
021: * during diff status operations.
022: *
023: * @version 1.1.1
024: * @author TMate Software Ltd.
025: * @since 1.1.0
026: */
027: public class SVNDiffStatus {
028:
029: private SVNStatusType myModificationType;
030: private boolean myIsPropertiesModified;
031: private SVNNodeKind myKind;
032: private SVNURL myURL;
033: private String myPath;
034: private File myFile;
035:
036: /**
037: * Instantiates a new object.
038: *
039: * @param file a wc item path
040: * @param url an item url
041: * @param path a relative item path (may be <span class="javakeyword">null</span>)
042: * @param type a type of path change
043: * @param propsModified sets whether properties are modified
044: * @param kind a path kind (dir or file)
045: */
046: public SVNDiffStatus(File file, SVNURL url, String path,
047: SVNStatusType type, boolean propsModified, SVNNodeKind kind) {
048: myURL = url;
049: myPath = path;
050: myModificationType = type;
051: myIsPropertiesModified = propsModified;
052: myKind = kind;
053: myFile = file;
054: }
055:
056: /**
057: * Returns File representation of the Working Copy item path.
058: *
059: * @return wc item path as File
060: */
061: public File getFile() {
062: return myFile;
063: }
064:
065: /**
066: * Says whether properties of the Working Copy item are modified.
067: *
068: * @return <span class="javakeyword">true</span> if properties were modified
069: * in a particular revision, <span class="javakeyword">false</span>
070: * otherwise
071: */
072: public boolean isPropertiesModified() {
073: return myIsPropertiesModified;
074: }
075:
076: /**
077: * Returns the node kind of the Working Copy item.
078: *
079: * @return node kind
080: */
081: public SVNNodeKind getKind() {
082: return myKind;
083: }
084:
085: /**
086: * Returns the type of modification for the current
087: * item.
088: *
089: * @return a path change type
090: */
091: public SVNStatusType getModificationType() {
092: return myModificationType;
093: }
094:
095: /**
096: * Returns a relative path of the item.
097: * Set for Working Copy items and relative to the anchor of diff status operation.
098: *
099: * @return item path
100: */
101: public String getPath() {
102: return myPath;
103: }
104:
105: /**
106: * Url of the item.
107: *
108: * @return item url
109: */
110: public SVNURL getURL() {
111: return myURL;
112: }
113:
114: }
|