Package adams.flow.source
Class FTPLister
-
- All Implemented Interfaces:
AdditionalInformationHandler
,ArrayProvider
,CleanUpHandler
,Destroyable
,GlobalInfoSupporter
,LoggingLevelHandler
,LoggingSupporter
,OptionHandler
,QuickInfoSupporter
,ShallowCopySupporter<Actor>
,SizeOfHandler
,Stoppable
,StoppableWithFeedback
,VariablesInspectionHandler
,VariableChangeListener
,Actor
,ArrayProvider
,ErrorHandler
,OutputProducer
,Serializable
,Comparable
@Deprecated public class FTPLister extends AbstractArrayProvider
Deprecated.Returns the contents of a FTP directory (files/dirs).
Input/output:
- generates:
java.lang.String
Valid options are:
-D <int> (property: debugLevel) The greater the number the more additional info the scheme may output to the console (0 = off). default: 0 minimum: 0
-name <java.lang.String> (property: name) The name of the actor. default: FTPLister
-annotation <adams.core.base.BaseText> (property: annotations) The annotations to attach to this actor. default:
-skip (property: skip) If set to true, transformation is skipped and the input token is just forwarded as it is.
-stop-flow-on-error (property: stopFlowOnError) If set to true, the flow gets stopped in case this actor encounters an error; useful for critical actors.
-output-array (property: outputArray) Whether to output the files as array or as single strings.
-remote-dir <java.lang.String> (property: remoteDir) The FTP directory to list the files for. default: /pub
-list-dirs (property: listDirs) Whether to include directories in the output.
-list-files (property: listFiles) Whether to include files in the output.
-regexp <adams.core.base.BaseRegExp> (property: regExp) The regular expression that the files/dirs must match (empty string matches all). default:
-sorting <NO_SORTING|SORT_BY_NAME|SORT_BY_LAST_MODIFIED> (property: sorting) The type of sorting to perform. default: NO_SORTING
-descending (property: sortDescending) If set to true, the files are sorted in descending manner.
- Version:
- $Revision$
- Author:
- fracpete (fracpete at waikato dot ac dot nz)
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
FTPLister.Sorting
Deprecated.The type of sorting.
-
Field Summary
Fields Modifier and Type Field Description protected FTPConnection
m_Connection
Deprecated.the FTP connection to use.protected boolean
m_ListDirs
Deprecated.whether to list directories.protected boolean
m_ListFiles
Deprecated.whether to list files.protected BaseRegExp
m_RegExp
Deprecated.the regular expression on the file/dir names.protected String
m_RemoteDir
Deprecated.the directory to list.protected boolean
m_SortDescending
Deprecated.whether to sort descending instead of ascending.protected FTPLister.Sorting
m_Sorting
Deprecated.the sorting.-
Fields inherited from class adams.flow.source.AbstractArrayProvider
m_Index, m_OutputArray, m_Queue
-
Fields inherited from class adams.flow.core.AbstractActor
m_Annotations, m_BackupState, m_DetectedObjectVariables, m_DetectedVariables, m_ErrorHandler, m_Executed, m_Executing, m_ExecutionListeningSupporter, m_FullName, m_LoggingPrefix, m_Name, m_Parent, m_ScopeHandler, m_Self, m_Silent, m_Skip, m_StopFlowOnError, m_StopMessage, m_Stopped, m_StorageHandler, m_VariablesUpdated
-
Fields inherited from class adams.core.option.AbstractOptionHandler
m_OptionManager
-
Fields inherited from class adams.core.logging.LoggingObject
m_Logger, m_LoggingIsEnabled, m_LoggingLevel
-
Fields inherited from interface adams.flow.core.Actor
FILE_EXTENSION, FILE_EXTENSION_GZ
-
-
Constructor Summary
Constructors Constructor Description FTPLister()
Deprecated.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description void
defineOptions()
Deprecated.Adds options to the internal list of options.protected String
doExecute()
Deprecated.Executes the flow item.protected Class
getItemClass()
Deprecated.Returns the based class of the items.boolean
getListDirs()
Deprecated.Returns whether directories are listed.boolean
getListFiles()
Deprecated.Returns whether directories are listed.String
getQuickInfo()
Deprecated.Returns a quick info about the actor, which will be displayed in the GUI.BaseRegExp
getRegExp()
Deprecated.Returns the regular expression for the files/dirs.String
getRemoteDir()
Deprecated.Returns the remote directory.boolean
getSortDescending()
Deprecated.Returns whether to sort descendingly.FTPLister.Sorting
getSorting()
Deprecated.Returns the type of sorting to perform.String
globalInfo()
Deprecated.Returns a string describing the object.String
listDirsTipText()
Deprecated.Returns the tip text for this property.String
listFilesTipText()
Deprecated.Returns the tip text for this property.String
outputArrayTipText()
Deprecated.Returns the tip text for this property.String
regExpTipText()
Deprecated.Returns the tip text for this property.String
remoteDirTipText()
Deprecated.Returns the tip text for this property.void
setListDirs(boolean value)
Deprecated.Sets whether to list directories.void
setListFiles(boolean value)
Deprecated.Sets whether to list files.void
setRegExp(BaseRegExp value)
Deprecated.Sets the regular expression for the files/dirs.void
setRemoteDir(String value)
Deprecated.Sets the remote directory.void
setSortDescending(boolean value)
Deprecated.Sets whether to sort descendingly.void
setSorting(FTPLister.Sorting value)
Deprecated.Sets the type of sorting to perform.String
setUp()
Deprecated.Initializes the item for flow execution.String
sortDescendingTipText()
Deprecated.Returns the tip text for this property.String
sortingTipText()
Deprecated.Returns the tip text for this property.-
Methods inherited from class adams.flow.source.AbstractArrayProvider
generates, getOutputArray, hasPendingOutput, output, preExecute, reset, setOutputArray, wrapUp
-
Methods inherited from class adams.flow.core.AbstractActor
annotationsTipText, backupState, canInspectOptions, canPerformSetUpCheck, cleanUp, compareTo, configureLogger, destroy, equals, execute, finalUpdateVariables, findVariables, findVariables, forceVariables, forCommandLine, forName, forName, getAdditionalInformation, getAnnotations, getDefaultName, getDetectedVariables, getErrorHandler, getFlowActors, getFlowExecutionListeningSupporter, getFullName, getName, getNextSibling, getParent, getParentComponent, getPreviousSibling, getRoot, getScopeHandler, getSilent, getSkip, getStopFlowOnError, getStopMessage, getStorageHandler, getVariables, handleError, handleException, hasErrorHandler, hasStopMessage, index, initialize, isBackedUp, isExecuted, isExecuting, isFinished, isHeadless, isStopped, nameTipText, performSetUpChecks, performVariableChecks, postExecute, pruneBackup, pruneBackup, restoreState, setAnnotations, setErrorHandler, setName, setParent, setSilent, setSkip, setStopFlowOnError, setVariables, shallowCopy, shallowCopy, silentTipText, sizeOf, skipTipText, stopExecution, stopExecution, stopFlowOnErrorTipText, updateDetectedVariables, updatePrefix, updateVariables, variableChanged
-
Methods inherited from class adams.core.option.AbstractOptionHandler
cleanUpOptions, finishInit, getDefaultLoggingLevel, getOptionManager, loggingLevelTipText, newOptionManager, setLoggingLevel, toCommandLine, toString
-
Methods inherited from class adams.core.logging.LoggingObject
getLogger, getLoggingLevel, initializeLogging, isLoggingEnabled
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface adams.flow.core.Actor
cleanUp, compareTo, destroy, equals, execute, findVariables, getAnnotations, getDefaultName, getDetectedVariables, getErrorHandler, getFlowExecutionListeningSupporter, getFullName, getName, getNextSibling, getParent, getParentComponent, getPreviousSibling, getRoot, getScopeHandler, getSilent, getSkip, getStopFlowOnError, getStopMessage, getStorageHandler, getVariables, handleError, hasErrorHandler, hasStopMessage, index, isExecuted, isFinished, isHeadless, isStopped, setAnnotations, setErrorHandler, setName, setParent, setSilent, setSkip, setStopFlowOnError, setVariables, shallowCopy, shallowCopy, sizeOf, stopExecution, stopExecution, toCommandLine, variableChanged
-
Methods inherited from interface adams.core.AdditionalInformationHandler
getAdditionalInformation
-
Methods inherited from interface adams.core.logging.LoggingLevelHandler
getLoggingLevel, setLoggingLevel
-
Methods inherited from interface adams.core.logging.LoggingSupporter
getLogger, isLoggingEnabled
-
Methods inherited from interface adams.core.option.OptionHandler
cleanUpOptions, getOptionManager
-
Methods inherited from interface adams.core.VariablesInspectionHandler
canInspectOptions
-
-
-
-
Field Detail
-
m_RemoteDir
protected String m_RemoteDir
Deprecated.the directory to list.
-
m_RegExp
protected BaseRegExp m_RegExp
Deprecated.the regular expression on the file/dir names.
-
m_ListDirs
protected boolean m_ListDirs
Deprecated.whether to list directories.
-
m_ListFiles
protected boolean m_ListFiles
Deprecated.whether to list files.
-
m_Sorting
protected FTPLister.Sorting m_Sorting
Deprecated.the sorting.
-
m_SortDescending
protected boolean m_SortDescending
Deprecated.whether to sort descending instead of ascending.
-
m_Connection
protected FTPConnection m_Connection
Deprecated.the FTP connection to use.
-
-
Method Detail
-
globalInfo
public String globalInfo()
Deprecated.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()
Deprecated.Adds options to the internal list of options.- Specified by:
defineOptions
in interfaceOptionHandler
- Overrides:
defineOptions
in classAbstractArrayProvider
-
getQuickInfo
public String getQuickInfo()
Deprecated.Returns a quick info about the actor, which will be displayed in the GUI.- Specified by:
getQuickInfo
in interfaceActor
- Specified by:
getQuickInfo
in interfaceQuickInfoSupporter
- Overrides:
getQuickInfo
in classAbstractActor
- Returns:
- null if no info available, otherwise short string
-
setRemoteDir
public void setRemoteDir(String value)
Deprecated.Sets the remote directory.- Parameters:
value
- the remote directory
-
getRemoteDir
public String getRemoteDir()
Deprecated.Returns the remote directory.- Returns:
- the remote directory.
-
remoteDirTipText
public String remoteDirTipText()
Deprecated.Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
outputArrayTipText
public String outputArrayTipText()
Deprecated.Returns the tip text for this property.- Specified by:
outputArrayTipText
in interfaceArrayProvider
- Specified by:
outputArrayTipText
in interfaceArrayProvider
- Specified by:
outputArrayTipText
in classAbstractArrayProvider
- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
setRegExp
public void setRegExp(BaseRegExp value)
Deprecated.Sets the regular expression for the files/dirs.- Parameters:
value
- the regular expression
-
getRegExp
public BaseRegExp getRegExp()
Deprecated.Returns the regular expression for the files/dirs.- Returns:
- the regular expression
-
regExpTipText
public String regExpTipText()
Deprecated.Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
setListDirs
public void setListDirs(boolean value)
Deprecated.Sets whether to list directories.- Parameters:
value
- true if directories are to be listed
-
getListDirs
public boolean getListDirs()
Deprecated.Returns whether directories are listed.- Returns:
- true if directories are listed
-
listDirsTipText
public String listDirsTipText()
Deprecated.Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
setListFiles
public void setListFiles(boolean value)
Deprecated.Sets whether to list files.- Parameters:
value
- true if files are to be listed
-
getListFiles
public boolean getListFiles()
Deprecated.Returns whether directories are listed.- Returns:
- true if directories are listed
-
listFilesTipText
public String listFilesTipText()
Deprecated.Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
setSorting
public void setSorting(FTPLister.Sorting value)
Deprecated.Sets the type of sorting to perform.- Parameters:
value
- the type of sorting
-
getSorting
public FTPLister.Sorting getSorting()
Deprecated.Returns the type of sorting to perform.- Returns:
- the type of sorting
-
sortingTipText
public String sortingTipText()
Deprecated.Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
setSortDescending
public void setSortDescending(boolean value)
Deprecated.Sets whether to sort descendingly.- Parameters:
value
- true if sorting in descending order
-
getSortDescending
public boolean getSortDescending()
Deprecated.Returns whether to sort descendingly.- Returns:
- true if sorting in descending order
-
sortDescendingTipText
public String sortDescendingTipText()
Deprecated.Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
getItemClass
protected Class getItemClass()
Deprecated.Returns the based class of the items.- Specified by:
getItemClass
in classAbstractArrayProvider
- Returns:
- the class
-
setUp
public String setUp()
Deprecated.Initializes the item for flow execution.- Specified by:
setUp
in interfaceActor
- Overrides:
setUp
in classAbstractActor
- Returns:
- null if everything is fine, otherwise error message
- See Also:
AbstractActor.reset()
-
doExecute
protected String doExecute()
Deprecated.Executes the flow item.- Specified by:
doExecute
in classAbstractActor
- Returns:
- null if everything is fine, otherwise error message
-
-