36
36
public class Status implements java.io.Serializable
38
// Update the serialVersionUID when there is a incompatible change
39
// made to this class. See any of the following, depending upon
41
// http://java.sun.com/j2se/1.3/docs/guide/serialization/spec/version.doc7.html
42
// http://java.sun.com/j2se/1.4/pdf/serial-spec.pdf
43
// http://java.sun.com/j2se/1.5.0/docs/guide/serialization/spec/version.html#6678
44
// http://java.sun.com/javase/6/docs/platform/serialization/spec/version.html#6678
45
private static final long serialVersionUID = 2L;
38
// Update the serialVersionUID when there is a incompatible change made to
39
// this class. See the java documentation for when a change is incompatible.
40
// http://java.sun.com/javase/7/docs/platform/serialization/spec/version.html#6678
41
private static final long serialVersionUID = 3L;
48
44
* the url for accessing the item
178
193
* @param lastChangedRevision the last revision this item was changed
179
194
* @param lastChangedDate the last date this item was changed
180
195
* @param lastCommitAuthor the author of the last change
181
* @param textStatus the file or directory status (See
183
* @param propStatus the property status (See StatusKind)
184
* @param repositoryTextStatus the file or directory status of the base
196
* @param nodeStatus the status of the node
197
* @param textStatus the file or directory contents status
198
* @param propStatus the property status
199
* @param repositoryNodeStatus the status of the base node
200
* @param repositoryTextStatus the file or directory contents status of the base
185
201
* @param repositoryPropStatus the property status of the base
186
202
* @param locked if the item is locked (running or aborted
188
204
* @param copied if the item is copy
205
* @param depth the inherent depth of the node in the working copy
189
206
* @param isConflicted if the item is part of a conflict
190
* @param conflictDescriptor the description of the tree conflict
191
* @param conflictOld in case of conflict, the file name of the
192
* the common base version
193
* @param conflictNew in case of conflict, the file name of new
195
* @param conflictWorking in case of conflict, the file name of the
196
* former working copy version
197
207
* @param switched flag if the node has been switched in the
199
209
* @param fileExternal flag if the node is a file external
209
219
* @param changelist the changelist the item is a member of
210
220
* @param movedFromAbspath path moved from
211
221
* @param movedToAbspath path moved from
213
224
public Status(String path, String url, NodeKind nodeKind, long revision,
214
225
long lastChangedRevision, long lastChangedDate,
215
String lastCommitAuthor, Kind textStatus, Kind propStatus,
226
String lastCommitAuthor,
227
Kind nodeStatus, Kind textStatus, Kind propStatus,
228
Kind repositoryNodeStatus,
216
229
Kind repositoryTextStatus, Kind repositoryPropStatus,
217
boolean locked, boolean copied, boolean isConflicted,
230
boolean locked, boolean copied, Depth depth,
231
boolean isConflicted,
218
232
boolean switched, boolean fileExternal, Lock localLock,
219
233
Lock reposLock, long reposLastCmtRevision,
220
234
long reposLastCmtDate, NodeKind reposKind,
228
242
this.lastChangedRevision = lastChangedRevision;
229
243
this.lastChangedDate = lastChangedDate;
230
244
this.lastCommitAuthor = lastCommitAuthor;
245
this.nodeStatus = nodeStatus;
231
246
this.textStatus = textStatus;
232
247
this.propStatus = propStatus;
248
this.repositoryNodeStatus = repositoryNodeStatus;
249
this.repositoryTextStatus = repositoryTextStatus;
250
this.repositoryPropStatus = repositoryPropStatus;
233
251
this.locked = locked;
234
252
this.copied = copied;
235
254
this.isConflicted = isConflicted;
236
this.repositoryTextStatus = repositoryTextStatus;
237
this.repositoryPropStatus = repositoryPropStatus;
238
255
this.switched = switched;
239
256
this.fileExternal = fileExternal;
240
257
this.localLock = localLock;
269
* this constructor should only called from JNI code
270
* @param path the file system path of item
271
* @param url the url of the item
272
* @param nodeKind kind of item (directory, file or unknown
273
* @param revision the revision number of the base
274
* @param lastChangedRevision the last revision this item was changed
275
* @param lastChangedDate the last date this item was changed
276
* @param lastCommitAuthor the author of the last change
277
* @param textStatus the file or directory status (See
279
* @param propStatus the property status (See StatusKind)
280
* @param repositoryTextStatus the file or directory status of the base
281
* @param repositoryPropStatus the property status of the base
282
* @param locked if the item is locked (running or aborted
284
* @param copied if the item is copy
285
* @param isConflicted if the item is part of a conflict
286
* @param switched flag if the node has been switched in the
288
* @param fileExternal flag if the node is a file external
289
* @param localLock the current lock
290
* @param reposLock the lock as stored in the repository if
292
* @param reposLastCmtRevision the youngest revision, if out of date
293
* @param reposLastCmtDate the last commit date, if out of date
294
* @param reposKind the kind of the youngest revision, if
296
* @param reposLastCmtAuthor the author of the last commit, if out of
298
* @param changelist the changelist the item is a member of
299
* @param movedFromAbspath path moved from
300
* @param movedToAbspath path moved from
304
public Status(String path, String url, NodeKind nodeKind, long revision,
305
long lastChangedRevision, long lastChangedDate,
306
String lastCommitAuthor, Kind textStatus, Kind propStatus,
307
Kind repositoryTextStatus, Kind repositoryPropStatus,
308
boolean locked, boolean copied, boolean isConflicted,
309
boolean switched, boolean fileExternal, Lock localLock,
310
Lock reposLock, long reposLastCmtRevision,
311
long reposLastCmtDate, NodeKind reposKind,
312
String reposLastCmtAuthor, String changelist,
313
String movedFromAbspath, String movedToAbspath)
315
this(path, url, nodeKind, revision,
316
lastChangedRevision, lastChangedDate, lastCommitAuthor,
317
Kind.none, textStatus, propStatus,
318
Kind.none, repositoryTextStatus, repositoryPropStatus,
319
locked, copied, Depth.unknown, isConflicted,
320
switched, fileExternal, localLock, reposLock,
321
reposLastCmtRevision, reposLastCmtDate, reposKind,
322
reposLastCmtAuthor, changelist,
323
movedFromAbspath, movedToAbspath);
252
327
* Returns the file system path of the item
253
328
* @return path of status entry
308
* Returns the status of the item (See StatusKind)
383
* Returns the status of the node.
386
public Kind getNodeStatus()
392
* Returns the status of the node as text.
395
public String getNodeStatusDescription()
397
return nodeStatus.toString();
401
* Returns the real status of the item's contents.
404
public Kind getRawTextStatus()
410
* Returns the real status of the item's contents as a string.
413
public String getRawTextStatusDescription()
415
return textStatus.toString();
419
* Returns the adjusted status of the item's contents, as
420
* compatible with JavaHL 1.8 and older verions.
309
421
* @return file status property enum of the "textual" component.
311
423
public Kind getTextStatus()
425
if (nodeStatus == Kind.modified || nodeStatus == Kind.conflicted)
317
* Returns the status of the item as text.
431
* Returns the adjusted status of the item's contents as text.
318
432
* @return english text
320
434
public String getTextStatusDescription()
322
return textStatus.toString();
436
return getTextStatus().toString();
326
* Returns the status of the properties (See Status Kind)
440
* Returns the status of the properties.
327
441
* @return file status property enum of the "property" component.
329
443
public Kind getPropStatus()
344
* Returns the status of the item in the repository (See StatusKind)
458
* Returns the status of the node in the repository.
461
public Kind getRepositoryNodeStatus()
463
return repositoryNodeStatus;
467
* Returns the real status of the item's contents in the repository.
470
public Kind getRawRepositoryTextStatus()
472
return repositoryTextStatus;
476
* Returns the adjusted status of the item's contents in the
477
* repository, as compatible with JavaHL 1.8 and older verions.
345
478
* @return file status property enum of the "textual" component in the
348
481
public Kind getRepositoryTextStatus()
350
return repositoryTextStatus;
483
if (repositoryNodeStatus == Kind.modified
484
|| repositoryNodeStatus == Kind.conflicted)
485
return repositoryTextStatus;
486
return repositoryNodeStatus;
354
* Returns test status of the properties in the repository (See StatusKind)
490
* Returns test status of the properties in the repository.
355
491
* @return file status property enum of the "property" component im the