Package adams.gui.chooser
Class SmbRemoteDirectorySetup
- java.lang.Object
-
- adams.core.logging.LoggingObject
-
- adams.core.logging.CustomLoggingLevelObject
-
- adams.core.option.AbstractOptionHandler
-
- adams.gui.chooser.SmbRemoteDirectorySetup
-
- All Implemented Interfaces:
CleanUpHandler,Destroyable,GlobalInfoSupporter,LoggingLevelHandler,LoggingSupporter,SMBSessionProvider,OptionHandler,PasswordSupporter,SizeOfHandler,RemoteDirectorySetup,Serializable
public class SmbRemoteDirectorySetup extends AbstractOptionHandler implements SMBSessionProvider, RemoteDirectorySetup, PasswordSupporter
For configuring an SMB connection and remote directory.- 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.SMBClientm_Clientthe SMB client.protected com.hierynomus.smbj.connection.Connectionm_Connectionthe SMB connection.protected Stringm_Domainthe domain.protected Stringm_Hostthe host.protected booleanm_ListHiddenwhether to list hidden files/dirs.protected BasePasswordm_Passwordthe SMB password to use.protected Stringm_RemoteDirthe directory to list.protected com.hierynomus.smbj.session.Sessionm_Sessionthe SMB authentication context.protected Stringm_Sharethe share to access.protected Stringm_Userthe SMB user to use.-
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 SmbRemoteDirectorySetup()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcleanUp()Cleans up after the execution has finished.protected voidcleanUpSmb()Cleans up the SMB components.voiddefineOptions()Adds options to the internal list of options.StringdomainTipText()Returns the tip text for this property.StringgetDomain()Returns the domain to connect to.StringgetHost()Returns the host to connect to.booleangetListHidden()Returns whether to list hidden files/dirs.BasePasswordgetPassword()Returns the SMB password to use.StringgetRemoteDir()Returns the remote directory.com.hierynomus.smbj.session.SessiongetSession()Returns the SMB authentication.StringgetShare()Returns the share to access.StringgetUser()Returns the SMB user name to use.StringglobalInfo()Returns a string describing the object.StringhostTipText()Returns the tip text for this property.StringlistHiddenTipText()Returns the tip text for this property.com.hierynomus.smbj.session.SessionnewSession()Returns a new SMB authentication.StringpasswordTipText()Returns the tip text for this property.StringremoteDirTipText()Returns the tip text for this property.booleanrequiresInitialization()Returns whether the setup needs to be configured by the user or whether it can be used straight away.protected voidreset()Resets the scheme.voidsetDomain(String value)Sets the domain to connect to.voidsetHost(String value)Sets the host to connect to.voidsetListHidden(boolean value)Sets whether to list hidden files/dirs.voidsetPassword(BasePassword value)Sets the SMB password to use.voidsetRemoteDir(String value)Sets the remote directory.voidsetShare(String value)Sets the share to access.voidsetUser(String value)Sets the SMB user to use.StringshareTipText()Returns the tip text for this property.StringuserTipText()Returns the tip text for this property.-
Methods inherited from class adams.core.option.AbstractOptionHandler
cleanUpOptions, destroy, finishInit, getDefaultLoggingLevel, getOptionManager, initialize, loggingLevelTipText, newOptionManager, 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.Destroyable
destroy
-
Methods inherited from interface adams.core.logging.LoggingLevelHandler
getLoggingLevel
-
Methods inherited from interface adams.core.option.OptionHandler
cleanUpOptions, getOptionManager, toCommandLine
-
-
-
-
Field Detail
-
m_Domain
protected String m_Domain
the domain.
-
m_Share
protected String m_Share
the share to access.
-
m_User
protected String m_User
the SMB user to use.
-
m_Password
protected BasePassword m_Password
the SMB password to use.
-
m_Host
protected String m_Host
the host.
-
m_RemoteDir
protected String m_RemoteDir
the directory to list.
-
m_ListHidden
protected boolean m_ListHidden
whether to list hidden files/dirs.
-
m_Client
protected transient com.hierynomus.smbj.SMBClient m_Client
the SMB client.
-
m_Connection
protected transient com.hierynomus.smbj.connection.Connection m_Connection
the SMB connection.
-
m_Session
protected transient com.hierynomus.smbj.session.Session m_Session
the SMB authentication context.
-
-
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
-
reset
protected void reset()
Resets the scheme.- Overrides:
resetin classAbstractOptionHandler
-
setHost
public void setHost(String value)
Sets the host to connect to.- Parameters:
value- the host name/ip
-
getHost
public String getHost()
Returns the host to connect to.- Returns:
- the host name/ip
-
hostTipText
public String hostTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
setDomain
public void setDomain(String value)
Sets the domain to connect to.- Parameters:
value- the domain name
-
getDomain
public String getDomain()
Returns the domain to connect to.- Returns:
- the domain name
-
domainTipText
public String domainTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
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.
-
setUser
public void setUser(String value)
Sets the SMB user to use.- Parameters:
value- the user name
-
getUser
public String getUser()
Returns the SMB user name to use.- Returns:
- the user name
-
userTipText
public String userTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
setPassword
public void setPassword(BasePassword value)
Sets the SMB password to use.- Specified by:
setPasswordin interfacePasswordSupporter- Parameters:
value- the password
-
getPassword
public BasePassword getPassword()
Returns the SMB password to use.- Specified by:
getPasswordin interfacePasswordSupporter- Returns:
- the password
-
passwordTipText
public String passwordTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
setRemoteDir
public void setRemoteDir(String value)
Sets the remote directory.- Parameters:
value- the remote directory
-
getRemoteDir
public String getRemoteDir()
Returns the remote directory.- Returns:
- the remote directory.
-
remoteDirTipText
public String remoteDirTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
setListHidden
public void setListHidden(boolean value)
Sets whether to list hidden files/dirs.- Parameters:
value- true if to list
-
getListHidden
public boolean getListHidden()
Returns whether to list hidden files/dirs.- Returns:
- true if to list
-
listHiddenTipText
public String listHiddenTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
getSession
public com.hierynomus.smbj.session.Session getSession()
Returns the SMB authentication.- Specified by:
getSessionin interfaceSMBSessionProvider- Returns:
- the SMB authentication, null if not connected
-
newSession
public com.hierynomus.smbj.session.Session newSession()
Returns a new SMB authentication.- Specified by:
newSessionin interfaceSMBSessionProvider- Returns:
- the SMB authentication
-
requiresInitialization
public boolean requiresInitialization()
Returns whether the setup needs to be configured by the user or whether it can be used straight away.- Specified by:
requiresInitializationin interfaceRemoteDirectorySetup- Returns:
- true if user needs to configure first
-
cleanUpSmb
protected void cleanUpSmb()
Cleans up the SMB components.
-
cleanUp
public void cleanUp()
Cleans up after the execution has finished. Also removes graphical components.- Specified by:
cleanUpin interfaceCleanUpHandler
-
-