Class ObliterateDelegator

    • 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 interface IObliterateDelegator
        Parameters:
        fileSpecs - non-null list of files to be obliterated
        opts - 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