Class TagDelegator
java.lang.Object
com.perforce.p4java.impl.mapbased.server.cmd.BaseDelegator
com.perforce.p4java.impl.mapbased.server.cmd.TagDelegator
- All Implemented Interfaces:
ITagDelegator
Implementation to handle the Tag 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
ConstructorsConstructorDescriptionTagDelegator(IOptionsServer server) Instantiate a new TagDelegator, providing the server object that will be used to execute Perforce Helix attribute commands. -
Method Summary
-
Constructor Details
-
TagDelegator
Instantiate a new TagDelegator, 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 Details
-
tagFiles
public List<IFileSpec> tagFiles(List<IFileSpec> fileSpecs, String labelName, boolean listOnly, boolean delete) throws ConnectionException, RequestException, AccessException Description copied from interface:ITagDelegatorTag files with a Perforce label.- Specified by:
tagFilesin interfaceITagDelegator- Parameters:
fileSpecs- non-null list of files to be tagged.labelName- non-null label name to use for the tagging.listOnly- if true, don't do the actual tag, just return the list of files that would have been tagged.delete- if true, delete the label tag from the files.- Returns:
- a non-null (but possibly empty) list of affected file specs
- Throws:
ConnectionException- if the Perforce server is unreachable or is not connected.RequestException- if the Perforce server encounters an error during its processing of the requestAccessException- if the Perforce server denies access to the caller
-
tagFiles
public List<IFileSpec> tagFiles(List<IFileSpec> fileSpecs, String labelName, TagFilesOptions opts) throws P4JavaException - Specified by:
tagFilesin interfaceITagDelegator- Parameters:
fileSpecs- non-null list of files to be tagged.labelName- non-null label name to use for the tagging.opts- TagFilesOptions object describing optional parameters; if null, no options are set.- Returns:
- a non-null (but possibly empty) list of affected file specs.
- Throws:
P4JavaException- if any error occurs in the processing of this method.
-