Class ObliterateDelegator
- All Implemented Interfaces:
IObliterateDelegator
-
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
ConstructorsConstructorDescriptionObliterateDelegator(IOptionsServer server) Instantiate a new ObliterateDelegator, providing the server object that will be used to execute Perforce Helix attribute commands. -
Method Summary
Modifier and TypeMethodDescriptionobliterateFiles(List<IFileSpec> fileSpecs, ObliterateFilesOptions opts) Obliterate permanently remove files and their history from the server.
-
Constructor Details
-
ObliterateDelegator
Instantiate a new ObliterateDelegator, 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
-
obliterateFiles
public List<IObliterateResult> obliterateFiles(@Nonnull List<IFileSpec> fileSpecs, ObliterateFilesOptions opts) throws P4JavaException Description copied from interface:IObliterateDelegatorObliterate permanently remove files and their history from the server.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.
- Specified by:
obliterateFilesin interfaceIObliterateDelegator- Parameters:
fileSpecs- non-null list of files to be obliteratedopts- possibly-null ObliterateFilesOptions object specifying method options.- Returns:
- a non-null list of IObliterateResult objects containing the records purged.
- Throws:
P4JavaException- if an error occurs processing this method and its parameters
-