com.perforce.p4java.core.file
Interface IFileAnnotation

All Known Implementing Classes:
FileAnnotation

public interface IFileAnnotation

Describes a Perforce file annotation as returned from the annotation command. See the main Perforce documentation for the annotate command for detailed descriptions of Perforce file version annotation.


Method Summary
 java.lang.String getDepotPath()
          Get the associated depot path for this annotation, if one is available.
 java.lang.String getLine()
          Get the line being annotated.
 java.lang.String getLine(boolean processLineEndings)
          Get the line being annotated, with optional line ending processing based on client settings (if available).
 int getLower()
          Get the lower version number for the associated annotation.
 int getUpper()
          Get the upper version number for the associated annotation.
 

Method Detail

getLower

int getLower()
Get the lower version number for the associated annotation.


getUpper

int getUpper()
Get the upper version number for the associated annotation.


getLine

java.lang.String getLine()
Get the line being annotated. This will not include the associated newline character or any line ending processing, but may include any embedded carriage return characters if they exist.

The returned line will never be null, but may be empty.


getLine

java.lang.String getLine(boolean processLineEndings)
Get the line being annotated, with optional line ending processing based on client settings (if available). This method is aimed mostly at P4WSAD and other specialized usage where file content lines need to be matched or compared with sync'd file contents (etc.), and may not be particularly useful for general users: when in doubt, use the simple getLine() method instead.

The returned line will never be null, but may be empty.

Parameters:
processLineEndings - if true, and if a client is associated with this annotation (i.e. it was created by one of the IServer or IFileSpec annotation methods, and a client was associated with the server at the time the IServer or IFileSpec call was made), the returned string will attempt to honor client line end settings where possible; if there are no available settings, the local line ending is appended. If processLineEndings is not true, the results are identical to calling the no-argument getLine method.

getDepotPath

java.lang.String getDepotPath()
Get the associated depot path for this annotation, if one is available. May be null in certain (very unusual) circumstances.



Copyright (c) 2008-2010 Perforce Software. All rights reserved.