public class ObliterateDelegator extends BaseDelegator implements IObliterateDelegator
MAX_LIMIT_SUPPORTED_MIN_VERSION, QUERY_EXPRESSIONS_SUPPORTED_MIN_VERSION, USER_RESTRICTIONS_SUPPORTED_MIN_VERSION
Constructor and Description |
---|
ObliterateDelegator(IOptionsServer server)
Instantiate a new ObliterateDelegator, providing the server object that will be used to
execute Perforce Helix attribute commands.
|
Modifier and Type | Method and Description |
---|---|
java.util.List<IObliterateResult> |
obliterateFiles(java.util.List<IFileSpec> fileSpecs,
ObliterateFilesOptions opts)
Obliterate permanently remove files and their history from the server.
|
public ObliterateDelegator(IOptionsServer server)
server
- a concrete implementation of a Perforce Helix Serverpublic java.util.List<IObliterateResult> obliterateFiles(@Nonnull java.util.List<IFileSpec> fileSpecs, ObliterateFilesOptions opts) throws P4JavaException
IObliterateDelegator
Obliterate retrieves the disk space used by the obliterated files in the archive and clears the files from the metadata that is maintained by the server. Files in client workspaces are not physically affected, but they are no longer under Perforce control.
By default, obliterate displays a preview of the results. To execute the operation, you must specify the -y flag (opts.executeObliterate). Obliterate requires 'admin' access, which is granted by 'p4 protect'.
The "obliterate" command returns an IObliterateResult for each file passed into the command. Each IObliterateResult object contains a summary of various types of records deleted (or added) and a non-null list of returned filespecs have the equivalent of purgeFile and purgeRev output in the depotPath and endRevision fileds of the associated filespecs, and that no other file spec fields are valid. Sometimes, the server doesn't return any "purgeFile" and "purgeRev" values.
Note: error and info messages are stored in filespec objects.
obliterateFiles
in interface IObliterateDelegator
fileSpecs
- non-null list of files to be obliteratedopts
- possibly-null ObliterateFilesOptions object specifying method
options.P4JavaException
- if an error occurs processing this method and its parameters