Class FileAnnotateDelegator
- java.lang.Object
-
- com.perforce.p4java.impl.mapbased.server.cmd.BaseDelegator
-
- com.perforce.p4java.impl.mapbased.server.cmd.FileAnnotateDelegator
-
- All Implemented Interfaces:
IFileAnnotateDelegator
public class FileAnnotateDelegator extends BaseDelegator implements IFileAnnotateDelegator
Implementation to handle the Annotate command.
-
-
Field Summary
-
Fields inherited from class com.perforce.p4java.impl.mapbased.server.cmd.BaseDelegator
MAX_LIMIT_SUPPORTED_MIN_VERSION, QUERY_EXPRESSIONS_SUPPORTED_MIN_VERSION, USER_RESTRICTIONS_SUPPORTED_MIN_VERSION
-
-
Constructor Summary
Constructors Constructor Description FileAnnotateDelegator(IOptionsServer server)
Instantiate a new FileAnnotateDelegator, providing the server object that will be used to execute Perforce Helix attribute commands.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.List<IFileAnnotation>
getFileAnnotations(java.util.List<IFileSpec> fileSpecs, DiffType diffType, boolean allResults, boolean useChangeNumbers, boolean followBranches)
java.util.List<IFileAnnotation>
getFileAnnotations(java.util.List<IFileSpec> fileSpecs, GetFileAnnotationsOptions opts)
Get a list of revision annotations for the specified files.
-
-
-
Constructor Detail
-
FileAnnotateDelegator
public FileAnnotateDelegator(IOptionsServer server)
Instantiate a new FileAnnotateDelegator, providing the server object that will be used to execute Perforce Helix attribute commands.- Parameters:
server
- a concrete implementation of a Perforce Helix Server
-
-
Method Detail
-
getFileAnnotations
public java.util.List<IFileAnnotation> getFileAnnotations(java.util.List<IFileSpec> fileSpecs, @Nonnull DiffType diffType, boolean allResults, boolean useChangeNumbers, boolean followBranches) throws ConnectionException, RequestException, AccessException
- Specified by:
getFileAnnotations
in interfaceIFileAnnotateDelegator
- Parameters:
fileSpecs
- non-null list of file specs to be annotated.diffType
- If non-null, use theDiffType
value to determine whitespace options.allResults
- If true, include both deleted files and lines no longer present at the head revision; corresponds to the -a flag.useChangeNumbers
- If true, annotate with change numbers rather than revision numbers with each line; correspond to the -c flag.followBranches
- If true, follow branches; corresponds to the -f flag.- Returns:
- list of file annotations
- Throws:
ConnectionException
- connection errorsRequestException
- server request errorsAccessException
- access restrictions
-
getFileAnnotations
public java.util.List<IFileAnnotation> getFileAnnotations(java.util.List<IFileSpec> fileSpecs, GetFileAnnotationsOptions opts) throws P4JavaException
Description copied from interface:IFileAnnotateDelegator
Get a list of revision annotations for the specified files.- Specified by:
getFileAnnotations
in interfaceIFileAnnotateDelegator
- Parameters:
fileSpecs
- non-null list of file specs to be annotated.opts
- GetFileAnnotationsOptions object describing optional parameters; if null, no options are set.- Returns:
- non-null (but possibly-empty) list of IFileAnnotation objects representing version annotations for the passed-in file specs.
- Throws:
P4JavaException
- if any error occurs in the processing of this method.
-
-