Class RemoveFiles
- java.lang.Object
-
- adams.core.logging.LoggingObject
-
- adams.core.logging.CustomLoggingLevelObject
-
- adams.core.option.AbstractOptionHandler
-
- adams.flow.control.postflowexecution.AbstractPostFlowExecution
-
- adams.flow.control.postflowexecution.RemoveFiles
-
- All Implemented Interfaces:
Destroyable,GlobalInfoSupporter,LoggingLevelHandler,LoggingSupporter,OptionHandler,QuickInfoSupporter,SizeOfHandler,PostFlowExecution,Serializable
public class RemoveFiles extends AbstractPostFlowExecution
Removes files in the specified directory that match the regular expression.- Author:
- fracpete (fracpete at waikato dot ac dot nz)
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected PlaceholderDirectorym_Dirthe directory to clean up.protected booleanm_Recursivewhether to delete recursively.protected BaseRegExpm_RegExpthe regexp for matching files to delete.-
Fields inherited from class adams.core.option.AbstractOptionHandler
m_OptionManager
-
Fields inherited from class adams.core.logging.LoggingObject
m_Logger, m_LoggingIsEnabled, m_LoggingLevel
-
-
Constructor Summary
Constructors Constructor Description RemoveFiles()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddefineOptions()Adds options to the internal list of options.StringdirTipText()Returns the tip text for this property.protected ActordoConfigureExecution(MessageCollection errors)Configures the actor to execute after the flow has run (without calling setUp()).PlaceholderDirectorygetDir()Returns the directory to clean up.StringgetQuickInfo()Returns a quick info about the object, which can be displayed in the GUI.booleangetRecursive()Returns whether to delete files recursively.BaseRegExpgetRegExp()Returns the regexp for matching files to delete.StringglobalInfo()Returns a string describing the object.StringrecursiveTipText()Returns the tip text for this property.StringregExpTipText()Returns the tip text for this property.voidsetDir(PlaceholderDirectory value)Sets the directory to clean up.voidsetRecursive(boolean value)Sets whether to delete files recursively.voidsetRegExp(BaseRegExp value)Sets the regexp for matching files to delete.-
Methods inherited from class adams.flow.control.postflowexecution.AbstractPostFlowExecution
configureExecution
-
Methods inherited from class adams.core.option.AbstractOptionHandler
cleanUpOptions, destroy, finishInit, getDefaultLoggingLevel, getOptionManager, initialize, loggingLevelTipText, newOptionManager, reset, setLoggingLevel, toCommandLine, toString
-
Methods inherited from class adams.core.logging.LoggingObject
configureLogger, getLogger, getLoggingLevel, initializeLogging, isLoggingEnabled, sizeOf
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface adams.core.logging.LoggingLevelHandler
getLoggingLevel
-
-
-
-
Field Detail
-
m_Dir
protected PlaceholderDirectory m_Dir
the directory to clean up.
-
m_RegExp
protected BaseRegExp m_RegExp
the regexp for matching files to delete.
-
m_Recursive
protected boolean m_Recursive
whether to delete recursively.
-
-
Method Detail
-
globalInfo
public String globalInfo()
Returns a string describing the object.- Specified by:
globalInfoin interfaceGlobalInfoSupporter- Specified by:
globalInfoin classAbstractOptionHandler- Returns:
- a description suitable for displaying in the gui
-
defineOptions
public void defineOptions()
Adds options to the internal list of options.- Specified by:
defineOptionsin interfaceOptionHandler- Overrides:
defineOptionsin classAbstractOptionHandler
-
setDir
public void setDir(PlaceholderDirectory value)
Sets the directory to clean up.- Parameters:
value- the dir
-
getDir
public PlaceholderDirectory getDir()
Returns the directory to clean up.- Returns:
- the dir
-
dirTipText
public String dirTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
setRegExp
public void setRegExp(BaseRegExp value)
Sets the regexp for matching files to delete.- Parameters:
value- the regexp
-
getRegExp
public BaseRegExp getRegExp()
Returns the regexp for matching files to delete.- Returns:
- the regexp
-
regExpTipText
public String regExpTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
setRecursive
public void setRecursive(boolean value)
Sets whether to delete files recursively.- Parameters:
value- true if recursively
-
getRecursive
public boolean getRecursive()
Returns whether to delete files recursively.- Returns:
- true if recursively
-
recursiveTipText
public String recursiveTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
getQuickInfo
public String getQuickInfo()
Returns a quick info about the object, which can be displayed in the GUI.- Specified by:
getQuickInfoin interfaceQuickInfoSupporter- Overrides:
getQuickInfoin classAbstractPostFlowExecution- Returns:
- null if no info available, otherwise short string
-
doConfigureExecution
protected Actor doConfigureExecution(MessageCollection errors)
Configures the actor to execute after the flow has run (without calling setUp()).- Specified by:
doConfigureExecutionin classAbstractPostFlowExecution- Parameters:
errors- for collecting errors during configuration- Returns:
- the actor, null if none generated
-
-