public class FileAnnotation extends java.lang.Object implements IFileAnnotation
Constructor and Description |
---|
FileAnnotation(int upper,
int lower,
java.lang.String depotPath,
java.lang.String line,
IClientSummary.ClientLineEnd lineEnd)
Default all-field constructor.
|
FileAnnotation(int order,
java.lang.String depotPath,
int upper,
int lower)
Create a new non-data file annotation with the passed-in parameters.
|
FileAnnotation(java.util.Map<java.lang.String,java.lang.Object> map,
java.lang.String depotPath,
IClientSummary.ClientLineEnd lineEnd)
Construct a suitable FileAnnotation object from the passed-in
map; this map must be in the format and use the fields returned from
a Perforce server annotate command.
|
Modifier and Type | Method and Description |
---|---|
void |
addIntegrationAnnotation(IFileAnnotation annotation)
Add an integration annotation to the contributingSources list.
|
java.util.List<IFileAnnotation> |
getAllIntegrations()
Get a list of all contributing integration annotations for this annotation,
if such a list exists.
|
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).
|
IClientSummary.ClientLineEnd |
getLineEnd() |
int |
getLower()
Get the lower version or change number for the associated annotation.
|
int |
getOrdering()
Get the ordering of this annotation in the associated allIntegrations
list, if it exists.
|
int |
getUpper()
Get the upper version or change number for the associated annotation.
|
void |
setDepotPath(java.lang.String depotPath) |
void |
setLine(java.lang.String line) |
void |
setLineEnd(IClientSummary.ClientLineEnd lineEnd) |
void |
setLower(int lower) |
FileAnnotation |
setOrdering(int ordering) |
void |
setUpper(int upper) |
public FileAnnotation(int upper, int lower, java.lang.String depotPath, java.lang.String line, IClientSummary.ClientLineEnd lineEnd)
public FileAnnotation(java.util.Map<java.lang.String,java.lang.Object> map, java.lang.String depotPath, IClientSummary.ClientLineEnd lineEnd)
Leave lineEnd null for normal use.
public FileAnnotation(int order, java.lang.String depotPath, int upper, int lower)
public void addIntegrationAnnotation(IFileAnnotation annotation)
public java.lang.String getDepotPath()
IFileAnnotation
getDepotPath
in interface IFileAnnotation
IFileAnnotation.getDepotPath()
public java.lang.String getLine()
IFileAnnotation
The returned line will never be null, but may be empty.
getLine
in interface IFileAnnotation
IFileAnnotation.getLine()
public java.lang.String getLine(boolean processLineEndings)
IFileAnnotation
The returned line will never be null, but may be empty.
getLine
in interface IFileAnnotation
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.IFileAnnotation.getLine(boolean)
public java.util.List<IFileAnnotation> getAllIntegrations()
IFileAnnotation
getAllIntegrations
in interface IFileAnnotation
com.perforce.p4java.core.file.IFileAnnotation#getContributingSources()
public int getLower()
IFileAnnotation
getLower
in interface IFileAnnotation
IFileAnnotation.getLower()
public int getUpper()
IFileAnnotation
getUpper
in interface IFileAnnotation
IFileAnnotation.getUpper()
public void setUpper(int upper)
public void setLower(int lower)
public void setDepotPath(java.lang.String depotPath)
public void setLine(java.lang.String line)
public IClientSummary.ClientLineEnd getLineEnd()
public void setLineEnd(IClientSummary.ClientLineEnd lineEnd)
public int getOrdering()
IFileAnnotation
getOrdering
in interface IFileAnnotation
public FileAnnotation setOrdering(int ordering)
Copyright © 2018 Perforce Software. All Rights Reserved.