Class ObliterateDelegator
- java.lang.Object
-
- com.perforce.p4java.impl.mapbased.server.cmd.BaseDelegator
-
- com.perforce.p4java.impl.mapbased.server.cmd.ObliterateDelegator
-
- All Implemented Interfaces:
IObliterateDelegator
public class ObliterateDelegator extends BaseDelegator implements IObliterateDelegator
Implementation to handle the Obliterate 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 ObliterateDelegator(IOptionsServer server)
Instantiate a new ObliterateDelegator, 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<IObliterateResult>
obliterateFiles(java.util.List<IFileSpec> fileSpecs, ObliterateFilesOptions opts)
Obliterate permanently remove files and their history from the server.
-
-
-
Constructor Detail
-
ObliterateDelegator
public ObliterateDelegator(IOptionsServer server)
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 Detail
-
obliterateFiles
public java.util.List<IObliterateResult> obliterateFiles(@Nonnull java.util.List<IFileSpec> fileSpecs, ObliterateFilesOptions opts) throws P4JavaException
Description copied from interface:IObliterateDelegator
Obliterate 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:
obliterateFiles
in 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
-
-