Class FilesDelegator
- java.lang.Object
-
- com.perforce.p4java.impl.mapbased.server.cmd.BaseDelegator
-
- com.perforce.p4java.impl.mapbased.server.cmd.FilesDelegator
-
- All Implemented Interfaces:
IFilesDelegator
public class FilesDelegator extends BaseDelegator implements IFilesDelegator
Delegator for the 'p4 files' 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 FilesDelegator(IOptionsServer server)
Instantiates a new files delegator.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.List<IFileSpec>
getDepotFiles(java.util.List<IFileSpec> fileSpecs, boolean allRevs)
List all Perforce depot files known to the Perforce server that conform to the passed-in wild-card file specification(s).java.util.List<IFileSpec>
getDepotFiles(java.util.List<IFileSpec> fileSpecs, GetDepotFilesOptions opts)
List all Perforce depot files known to the Perforce server that conform to the passed-in wild-card file specification(s).
-
-
-
Constructor Detail
-
FilesDelegator
public FilesDelegator(IOptionsServer server)
Instantiates a new files delegator.- Parameters:
server
- the server
-
-
Method Detail
-
getDepotFiles
public java.util.List<IFileSpec> getDepotFiles(@Nonnull java.util.List<IFileSpec> fileSpecs, boolean allRevs) throws ConnectionException, AccessException
Description copied from interface:IFilesDelegator
List all Perforce depot files known to the Perforce server that conform to the passed-in wild-card file specification(s).If client file names are given as file spec arguments the current Perforce client view mapping is used to list the corresponding depot files, if the client and view exist (if not, the results are undefined).
Normally, the head revision of each matching file is listed, but you can change this by specifying specific revisions or revision ranges. If the file spec argument includes a revision, then all files as of that revision are returned. If the file spec argument has a revision range, then only files selected by that revision range are returned, and the highest revision in the range is used for each file. If GetDepotFilesOptions.allRevs is true, all revisions within the specific range, rather than just the highest revision in the range, are returned.
See 'p4 help revisions' for help specifying revisions.
Note that the IFileSpec objects returned will have null client and local path components.
- Specified by:
getDepotFiles
in interfaceIFilesDelegator
- Parameters:
fileSpecs
- the file specsallRevs
- the all revs- Returns:
- the depot files
- Throws:
ConnectionException
- the connection exceptionAccessException
- the access exception
-
getDepotFiles
public java.util.List<IFileSpec> getDepotFiles(@Nonnull java.util.List<IFileSpec> fileSpecs, GetDepotFilesOptions opts) throws P4JavaException
Description copied from interface:IFilesDelegator
List all Perforce depot files known to the Perforce server that conform to the passed-in wild-card file specification(s).If client file names are given as file spec arguments the current Perforce client view mapping is used to list the corresponding depot files, if the client and view exist (if not, the results are undefined).
Normally, the head revision of each matching file is listed, but you can change this by specifying specific revisions or revision ranges. If the file spec argument includes a revision, then all files as of that revision are returned. If the file spec argument has a revision range, then only files selected by that revision range are returned, and the highest revision in the range is used for each file. If GetDepotFilesOptions.allRevs is true, all revisions within the specific range, rather than just the highest revision in the range, are returned.
See 'p4 help revisions' for help specifying revisions.
Note that the IFileSpec objects returned will have null client and local path components.
- Specified by:
getDepotFiles
in interfaceIFilesDelegator
- Parameters:
fileSpecs
- a non-null list of one or more IFileSpecs to be used to qualify Perforce depot filesopts
- GetDepotFilesOptions describing the associated options; if null, no options are set.- Returns:
- a non-null (but possible empty) list of all qualifying depot files
- Throws:
P4JavaException
- if any error occurs in the processing of this method.
-
-