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 PlaceholderDirectory
m_Dir
the directory to clean up.protected boolean
m_Recursive
whether to delete recursively.protected BaseRegExp
m_RegExp
the 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 void
defineOptions()
Adds options to the internal list of options.String
dirTipText()
Returns the tip text for this property.protected Actor
doConfigureExecution(MessageCollection errors)
Configures the actor to execute after the flow has run (without calling setUp()).PlaceholderDirectory
getDir()
Returns the directory to clean up.String
getQuickInfo()
Returns a quick info about the object, which can be displayed in the GUI.boolean
getRecursive()
Returns whether to delete files recursively.BaseRegExp
getRegExp()
Returns the regexp for matching files to delete.String
globalInfo()
Returns a string describing the object.String
recursiveTipText()
Returns the tip text for this property.String
regExpTipText()
Returns the tip text for this property.void
setDir(PlaceholderDirectory value)
Sets the directory to clean up.void
setRecursive(boolean value)
Sets whether to delete files recursively.void
setRegExp(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:
globalInfo
in interfaceGlobalInfoSupporter
- Specified by:
globalInfo
in classAbstractOptionHandler
- Returns:
- a description suitable for displaying in the gui
-
defineOptions
public void defineOptions()
Adds options to the internal list of options.- Specified by:
defineOptions
in interfaceOptionHandler
- Overrides:
defineOptions
in 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:
getQuickInfo
in interfaceQuickInfoSupporter
- Overrides:
getQuickInfo
in 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:
doConfigureExecution
in classAbstractPostFlowExecution
- Parameters:
errors
- for collecting errors during configuration- Returns:
- the actor, null if none generated
-
-