1 19 20 package org.netbeans.modules.subversion.client.parser; 21 22 23 24 import java.io.File ; 25 import java.lang.UnsupportedOperationException ; 26 27 import java.net.MalformedURLException ; 28 29 import java.util.Date ; 30 31 import org.tigris.subversion.svnclientadapter.ISVNStatus; 32 33 import org.tigris.subversion.svnclientadapter.SVNNodeKind; 34 35 import org.tigris.subversion.svnclientadapter.SVNRevision; 36 37 import org.tigris.subversion.svnclientadapter.SVNStatusKind; 38 39 import org.tigris.subversion.svnclientadapter.SVNUrl; 40 41 42 43 44 51 52 public class LocalSvnStatusImpl implements ISVNStatus { 53 54 55 56 private File file = null; 57 58 private SVNUrl url = null; 59 60 private SVNRevision.Number revision = null; 61 62 private SVNNodeKind kind = null; 63 64 private SVNStatusKind textStatus = null; 65 66 private SVNStatusKind propStatus = null; 67 68 private String lastCommitAuthor = null; 69 70 private SVNRevision.Number lastChangedRevision = null; 71 72 private Date lastChangedDate = null; 73 74 private boolean isCopied = false; 75 76 private SVNUrl urlCopiedFrom = null; 77 78 private File conflictNew = null; 79 80 private File conflictOld = null; 81 82 private File conflictWorking = null; 83 84 private Date lockCreationDate = null; 85 86 private String lockComment = null; 87 88 private String lockOwner = null; 89 90 91 92 public LocalSvnStatusImpl(File file, String url, long revision, String kind, 93 94 String textStatus, String propStatus, 95 96 String lastCommitAuthor, long lastChangedRevision, Date lastChangedDate, 97 98 boolean isCopied, String urlCopiedFrom, 99 100 File conflictNew, File conflictOld, File conflictWorking, 101 102 Date lockCreationDate, String lockComment, String lockOwner) { 103 104 this.file = file; 105 106 107 108 if (url != null) { 109 110 try { 111 112 this.url = new SVNUrl(url); 113 114 } catch (MalformedURLException ex) { 115 116 throw new IllegalArgumentException (ex); 117 118 } 119 120 } 121 122 123 124 this.revision = new SVNRevision.Number(revision); 125 126 this.kind = SVNNodeKind.fromString(kind); 127 128 129 130 this.textStatus = SVNStatusKind.fromString(textStatus); 131 132 this.propStatus = SVNStatusKind.fromString(propStatus); 133 134 135 136 this.lastCommitAuthor = lastCommitAuthor; 137 138 this.lastChangedRevision = new SVNRevision.Number(lastChangedRevision); 139 140 this.lastChangedDate = lastChangedDate; 141 142 143 144 this.isCopied = isCopied; 145 146 if (urlCopiedFrom != null) { 147 148 try { 149 150 this.urlCopiedFrom = new SVNUrl(urlCopiedFrom); 151 152 } catch (MalformedURLException ex) { 153 154 throw new IllegalArgumentException (ex); 155 156 } 157 158 } 159 160 161 162 this.conflictNew = conflictNew; 163 164 this.conflictOld = conflictOld; 165 166 this.conflictWorking = conflictWorking; 167 168 this.lockCreationDate = lockCreationDate; 169 170 this.lockComment = lockComment; 171 172 this.lockOwner = lockOwner; 173 174 } 175 176 177 178 public boolean isCopied() { 179 180 return isCopied; 181 182 } 183 184 185 186 public SVNUrl getUrlCopiedFrom() { 187 188 return urlCopiedFrom; 189 190 } 191 192 193 194 public SVNUrl getUrl() { 195 196 return url; 197 198 } 199 200 201 202 public SVNStatusKind getTextStatus() { 203 204 return textStatus; 205 206 } 207 208 209 210 public SVNRevision.Number getRevision() { 211 212 return revision; 213 214 } 215 216 217 218 public SVNStatusKind getRepositoryTextStatus() { 219 220 throw new UnsupportedOperationException ("getRepositoryTextStatus() is not implemented"); 222 } 223 224 225 226 public SVNStatusKind getRepositoryPropStatus() { 227 228 throw new UnsupportedOperationException ("getRepositoryPropStatus() is not implemented"); 230 } 231 232 233 234 public File getConflictNew() { 235 236 return conflictNew; 237 238 } 239 240 241 242 public File getConflictOld() { 243 244 return conflictOld; 245 246 } 247 248 249 250 public File getConflictWorking() { 251 252 return conflictWorking; 253 254 } 255 256 257 258 public File getFile() { 259 260 return file; 261 262 } 263 264 265 266 public Date getLastChangedDate() { 267 268 return lastChangedDate; 269 270 } 271 272 273 274 public SVNRevision.Number getLastChangedRevision() { 275 276 return lastChangedRevision; 277 278 } 279 280 281 282 public String getLastCommitAuthor() { 283 284 return lastCommitAuthor; 285 286 } 287 288 289 290 public String getLockComment() { 291 292 return lockComment; 293 294 } 295 296 297 298 public Date getLockCreationDate() { 299 300 return lockCreationDate; 301 302 } 303 304 305 306 public String getLockOwner() { 307 308 return lockOwner; 309 310 } 311 312 313 314 public SVNNodeKind getNodeKind() { 315 316 return kind; 317 318 } 319 320 321 322 public String getPath() { 323 324 return file.getPath(); 325 326 } 327 328 329 330 public SVNStatusKind getPropStatus() { 331 332 return propStatus; 333 334 } 335 336 public String getUrlString() { 337 return url.toString(); 338 } 339 340 public boolean isWcLocked() { 341 throw new UnsupportedOperationException ("not implemented yet"); } 344 345 public boolean isSwitched() { 346 throw new UnsupportedOperationException ("not implemented yet"); } 349 350 351 352 } 353 354 | Popular Tags |