jetbrains.buildServer.agent
Class BuildDirectoryCleanerCallback

java.lang.Object
  extended by jetbrains.buildServer.agent.BuildDirectoryCleanerCallback
All Implemented Interfaces:
SmartDirectoryCleanerCallback

public class BuildDirectoryCleanerCallback
extends java.lang.Object
implements SmartDirectoryCleanerCallback

Provides build logging build messages for SmartDirectoryCleaner operations under a running build.


Constructor Summary
BuildDirectoryCleanerCallback(BuildProgressLogger logger, org.apache.log4j.Logger LOG)
          Creates instance of callback
 
Method Summary
 boolean isHasErrors()
           
 void logCleanStarted(java.io.File f)
          Clean is started
 void logFailedToCleanEntireFolder(java.io.File file)
          Called on the end of cleaning process to indicate there were directories/files that was not cleaned.
 void logFailedToCleanFile(java.io.File problem)
          Failed to clean file
 void logFailedToCleanFilesUnderDirectory(java.io.File problem)
          Directory contains files that has not been cleaned up
 void logFailedToDeleteEmptyDirectory(java.io.File f)
          Empty directory can not be deleted
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BuildDirectoryCleanerCallback

public BuildDirectoryCleanerCallback(@NotNull
                                     BuildProgressLogger logger,
                                     @NotNull
                                     org.apache.log4j.Logger LOG)
Creates instance of callback

Parameters:
logger - build logger to log problems and progress
LOG - agent logger to log precise problems and debug messages
Method Detail

logCleanStarted

public void logCleanStarted(java.io.File f)
Description copied from interface: SmartDirectoryCleanerCallback
Clean is started

Specified by:
logCleanStarted in interface SmartDirectoryCleanerCallback
Parameters:
f - folder to clean

logFailedToDeleteEmptyDirectory

public void logFailedToDeleteEmptyDirectory(java.io.File f)
Description copied from interface: SmartDirectoryCleanerCallback
Empty directory can not be deleted

Specified by:
logFailedToDeleteEmptyDirectory in interface SmartDirectoryCleanerCallback
Parameters:
f - directory

logFailedToCleanFilesUnderDirectory

public void logFailedToCleanFilesUnderDirectory(java.io.File problem)
Description copied from interface: SmartDirectoryCleanerCallback
Directory contains files that has not been cleaned up

Specified by:
logFailedToCleanFilesUnderDirectory in interface SmartDirectoryCleanerCallback
Parameters:
problem - directory

logFailedToCleanFile

public void logFailedToCleanFile(java.io.File problem)
Description copied from interface: SmartDirectoryCleanerCallback
Failed to clean file

Specified by:
logFailedToCleanFile in interface SmartDirectoryCleanerCallback
Parameters:
problem - file

logFailedToCleanEntireFolder

public void logFailedToCleanEntireFolder(java.io.File file)
Description copied from interface: SmartDirectoryCleanerCallback
Called on the end of cleaning process to indicate there were directories/files that was not cleaned. Note, empty directory is not treated as error.

Specified by:
logFailedToCleanEntireFolder in interface SmartDirectoryCleanerCallback
Parameters:
file - directory

isHasErrors

public boolean isHasErrors()
Returns:
true is there were remove errors detected