1 19 20 package org.netbeans.modules.subversion.client.parser; 21 22 import java.io.File ; 23 import java.lang.UnsupportedOperationException ; 24 import java.net.MalformedURLException ; 25 import java.util.Date ; 26 import org.tigris.subversion.svnclientadapter.ISVNStatus; 27 import org.tigris.subversion.svnclientadapter.SVNNodeKind; 28 import org.tigris.subversion.svnclientadapter.SVNRevision; 29 import org.tigris.subversion.svnclientadapter.SVNStatusKind; 30 import org.tigris.subversion.svnclientadapter.SVNUrl; 31 32 36 public class ParserSvnStatus implements ISVNStatus { 37 38 private File file = null; 39 private SVNUrl url = null; 40 private SVNRevision.Number revision = null; 41 private SVNNodeKind kind = null; 42 private SVNStatusKind textStatus = null; 43 private SVNStatusKind propStatus = null; 44 private String lastCommitAuthor = null; 45 private SVNRevision.Number lastChangedRevision = null; 46 private Date lastChangedDate = null; 47 private boolean isCopied = false; 48 private SVNUrl urlCopiedFrom = null; 49 private File conflictNew = null; 50 private File conflictOld = null; 51 private File conflictWorking = null; 52 private Date lockCreationDate = null; 53 private String lockComment = null; 54 private String lockOwner = null; 55 56 57 public ParserSvnStatus(File file, String url, long revision, String kind, 58 String textStatus, String propStatus, 59 String lastCommitAuthor, long lastChangedRevision, Date lastChangedDate, 60 boolean isCopied, String urlCopiedFrom, 61 File conflictNew, File conflictOld, File conflictWorking, 62 Date lockCreationDate, String lockComment, String lockOwner) { 63 64 this.file = file; 65 66 if (url != null) { 67 try { 68 this.url = new SVNUrl(url); 69 } catch (MalformedURLException ex) { 70 throw new IllegalArgumentException (ex); 71 } 72 } 73 74 this.revision = new SVNRevision.Number(revision); 75 this.kind = SVNNodeKind.fromString(kind); 76 77 this.textStatus = SVNStatusKind.fromString(textStatus); 78 this.propStatus = SVNStatusKind.fromString(propStatus); 79 this.lastCommitAuthor = lastCommitAuthor; 80 81 this.lastChangedRevision = new SVNRevision.Number(lastChangedRevision); 82 this.lastChangedDate = lastChangedDate; 83 84 this.isCopied = isCopied; 85 if (urlCopiedFrom != null) { 86 try { 87 this.urlCopiedFrom = new SVNUrl(urlCopiedFrom); 88 } catch (MalformedURLException ex) { 89 throw new IllegalArgumentException (ex); 90 } 91 } 92 93 this.conflictNew = conflictNew; 94 this.conflictOld = conflictOld; 95 this.conflictWorking = conflictWorking; 96 this.lockCreationDate = lockCreationDate; 97 this.lockComment = lockComment; 98 this.lockOwner = lockOwner; 99 } 100 101 public boolean isCopied() { 102 return isCopied; 103 } 104 105 public SVNUrl getUrlCopiedFrom() { 106 return urlCopiedFrom; 107 } 108 109 public SVNUrl getUrl() { 110 return url; 111 } 112 113 public SVNStatusKind getTextStatus() { 114 return textStatus; 115 } 116 117 public SVNRevision.Number getRevision() { 118 return revision; 119 } 120 121 public SVNStatusKind getRepositoryTextStatus() { 122 throw new UnsupportedOperationException ("getRepositoryTextStatus() is not implemented"); } 124 125 public SVNStatusKind getRepositoryPropStatus() { 126 throw new UnsupportedOperationException ("getRepositoryPropStatus() is not implemented"); } 128 129 public File getConflictNew() { 130 return conflictNew; 131 } 132 133 public File getConflictOld() { 134 return conflictOld; 135 } 136 137 public File getConflictWorking() { 138 return conflictWorking; 139 } 140 141 public File getFile() { 142 return file; 143 } 144 145 public Date getLastChangedDate() { 146 return lastChangedDate; 147 } 148 149 public SVNRevision.Number getLastChangedRevision() { 150 return lastChangedRevision; 151 } 152 153 public String getLastCommitAuthor() { 154 return lastCommitAuthor; 155 } 156 157 public String getLockComment() { 158 return lockComment; 159 } 160 161 public Date getLockCreationDate() { 162 return lockCreationDate; 163 } 164 165 public String getLockOwner() { 166 return lockOwner; 167 } 168 169 public SVNNodeKind getNodeKind() { 170 return kind; 171 } 172 173 public String getPath() { 174 return file.getPath(); 175 } 176 177 public SVNStatusKind getPropStatus() { 178 return propStatus; 179 } 180 181 public String getUrlString() { 182 return url.toString(); 183 } 184 185 public boolean isWcLocked() { 186 throw new UnsupportedOperationException ("not implemented yet"); } 189 190 public boolean isSwitched() { 191 throw new UnsupportedOperationException ("not implemented yet"); } 194 195 } 196 197 | Popular Tags |