Class AbstractSmbDirectoryListerBasedSearchlet
- java.lang.Object
-
- adams.core.logging.LoggingObject
-
- adams.core.logging.CustomLoggingLevelObject
-
- adams.core.option.AbstractOptionHandler
-
- adams.flow.source.filesystemsearch.AbstractFileSystemSearchlet
-
- adams.flow.source.filesystemsearch.AbstractSmbDirectoryListerBasedSearchlet
-
- All Implemented Interfaces:
Destroyable,GlobalInfoSupporter,LoggingLevelHandler,LoggingSupporter,OptionHandler,QuickInfoSupporter,ShallowCopySupporter<AbstractFileSystemSearchlet>,SizeOfHandler,Stoppable,StoppableWithFeedback,FlowContextHandler,Serializable
- Direct Known Subclasses:
SmbDirectorySearch,SmbDirectorySearchWithComparator,SmbDirectorySearchWithCustomSort,SmbFileSearch
public abstract class AbstractSmbDirectoryListerBasedSearchlet extends AbstractFileSystemSearchlet
Ancestor for search algorithms that useSmbDirectoryListerunder the hood.- Author:
- fracpete (fracpete at waikato dot ac dot nz)
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected com.hierynomus.smbj.share.DiskSharem_DiskSharethe diskshare instance.protected SmbDirectoryListerm_Listerfor listing the contents.-
Fields inherited from class adams.flow.source.filesystemsearch.AbstractFileSystemSearchlet
m_FlowContext, m_Stopped
-
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 AbstractSmbDirectoryListerBasedSearchlet()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidcheck()Performs a setup check before search.protected voidcleanUpSmb()Cleans up SMB resources.voiddefineOptions()Adds options to the internal list of options.protected List<String>doSearch()Performs the actual search.StringgetShare()Returns the share to access.protected voidinitialize()Initializes the members.protected voidreset()Resets the scheme.voidsetLoggingLevel(LoggingLevel value)Sets the logging level.voidsetShare(String value)Sets the share to access.StringshareTipText()Returns the tip text for this property.voidstopExecution()Stops the execution.-
Methods inherited from class adams.flow.source.filesystemsearch.AbstractFileSystemSearchlet
getFlowContext, getQuickInfo, isStopped, search, setFlowContext, shallowCopy, shallowCopy
-
Methods inherited from class adams.core.option.AbstractOptionHandler
cleanUpOptions, destroy, finishInit, getDefaultLoggingLevel, getOptionManager, globalInfo, loggingLevelTipText, newOptionManager, 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_Lister
protected SmbDirectoryLister m_Lister
for listing the contents.
-
m_DiskShare
protected transient com.hierynomus.smbj.share.DiskShare m_DiskShare
the diskshare instance.
-
-
Method Detail
-
defineOptions
public void defineOptions()
Adds options to the internal list of options.- Specified by:
defineOptionsin interfaceOptionHandler- Overrides:
defineOptionsin classAbstractOptionHandler
-
reset
protected void reset()
Resets the scheme.- Overrides:
resetin classAbstractOptionHandler
-
initialize
protected void initialize()
Initializes the members.- Overrides:
initializein classAbstractOptionHandler
-
setLoggingLevel
public void setLoggingLevel(LoggingLevel value)
Sets the logging level.- Specified by:
setLoggingLevelin interfaceLoggingLevelHandler- Overrides:
setLoggingLevelin classAbstractOptionHandler- Parameters:
value- the level
-
setShare
public void setShare(String value)
Sets the share to access.- Parameters:
value- the share
-
getShare
public String getShare()
Returns the share to access.- Returns:
- the share
-
shareTipText
public String shareTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
check
protected void check() throws ExceptionPerforms a setup check before search.- Overrides:
checkin classAbstractFileSystemSearchlet- Throws:
Exception- if checks failed
-
doSearch
protected List<String> doSearch() throws Exception
Performs the actual search.- Specified by:
doSearchin classAbstractFileSystemSearchlet- Returns:
- the search result
- Throws:
Exception- if search failed
-
stopExecution
public void stopExecution()
Stops the execution.- Specified by:
stopExecutionin interfaceStoppable- Specified by:
stopExecutionin classAbstractFileSystemSearchlet
-
cleanUpSmb
protected void cleanUpSmb()
Cleans up SMB resources.
-
-