Class AbstractPatcher
- java.lang.Object
-
- jetbrains.buildServer.vcs.patches.InterruptablePatcherBase
-
- jetbrains.buildServer.vcs.patches.AbstractPatcher
-
- All Implemented Interfaces:
Patcher
- Direct Known Subclasses:
VerifyingPatcher
public abstract class AbstractPatcher extends InterruptablePatcherBase implements Patcher
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedAbstractPatcher(DataInputStream input)protectedAbstractPatcher(LowLevelPatcher input)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract voidaddDirectory(String filePath)voidapplyPatch()Applies patch.voidclose()Disposes the patcher process.protected abstract voiddeleteFile(String filePath, boolean deleteParentDirectoryIfEmpty, boolean isFile)voidinterrupt()Interrupts patching process.protected voidpatchFailed(String message)protected voidpatchSucceeded(String message)protected abstract voidrenameFile(String filePath, String newPath, boolean deleteParentDirectoryIfEmpty, boolean isFile)protected abstract voidreplaceBinary(String filePath, long length, boolean newFile, LowLevelPatcherListener.ReadFileContent content)protected abstract voidreplaceTextUsingBytes(String filePath, long size, byte[] sep, boolean newFile, LowLevelPatcherListener.ReadFileContent content)protected abstract voidsetFileMode(String filePath, String fileMode)protected abstract voidsetTimeStamp(String filePath, long timeStamp)-
Methods inherited from class jetbrains.buildServer.vcs.patches.InterruptablePatcherBase
checkInterrupted
-
-
-
-
Constructor Detail
-
AbstractPatcher
protected AbstractPatcher(@NotNull DataInputStream input)
-
AbstractPatcher
protected AbstractPatcher(@NotNull LowLevelPatcher input)
-
-
Method Detail
-
replaceTextUsingBytes
protected abstract void replaceTextUsingBytes(@NotNull String filePath, long size, @NotNull byte[] sep, boolean newFile, @NotNull LowLevelPatcherListener.ReadFileContent content) throws IOException- Throws:
IOException
-
setFileMode
protected abstract void setFileMode(@NotNull String filePath, @NotNull String fileMode) throws IOException- Throws:
IOException
-
replaceBinary
protected abstract void replaceBinary(@NotNull String filePath, long length, boolean newFile, @NotNull LowLevelPatcherListener.ReadFileContent content) throws IOException- Throws:
IOException
-
setTimeStamp
protected abstract void setTimeStamp(@NotNull String filePath, long timeStamp) throws IOException- Throws:
IOException
-
deleteFile
protected abstract void deleteFile(@NotNull String filePath, boolean deleteParentDirectoryIfEmpty, boolean isFile) throws IOException- Throws:
IOException
-
renameFile
protected abstract void renameFile(@NotNull String filePath, @NotNull String newPath, boolean deleteParentDirectoryIfEmpty, boolean isFile) throws IOException- Throws:
IOException
-
addDirectory
protected abstract void addDirectory(@NotNull String filePath) throws IOException- Throws:
IOException
-
applyPatch
public void applyPatch() throws IOExceptionDescription copied from interface:PatcherApplies patch.- Specified by:
applyPatchin interfacePatcher- Throws:
IOException- some file system operation failed or patch process terminated with see jetbrains.buildServer.vcs.patches.InterruptedPatchException or some problem occurred during the patch process (see jetbrains.buildServer.vcs.patches.UnsuccessfulPatchException).
-
patchFailed
protected void patchFailed(@NotNull String message)
-
patchSucceeded
protected void patchSucceeded(@NotNull String message)
-
close
public void close()
Description copied from interface:PatcherDisposes the patcher process.
-
interrupt
public void interrupt()
Description copied from interface:PatcherInterrupts patching process.Patcher.applyPatch()may throw {see jetbrains.buildServer.vcs.patches.InterruptedPatchException}- Specified by:
interruptin interfacePatcher- Overrides:
interruptin classInterruptablePatcherBase
-
-