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
,SMBAuthenticationProvider
,OptionHandler
,PasswordSupporter
,SizeOfHandler
,RemoteDirectorySetup
,Serializable
public class SmbRemoteDirectorySetup extends AbstractOptionHandler implements SMBAuthenticationProvider, 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 String
m_Domain
the domain.protected String
m_Host
the host.protected BasePassword
m_Password
the SMB password to use.protected String
m_RemoteDir
the directory to list.protected jcifs.smb.NtlmPasswordAuthentication
m_Session
the SMB authentication.protected String
m_User
the 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 void
cleanUp()
Cleans up data structures, frees up memory.void
defineOptions()
Adds options to the internal list of options.String
domainTipText()
Returns the tip text for this property.jcifs.smb.NtlmPasswordAuthentication
getAuthentication()
Returns the SMB authentication.String
getDomain()
Returns the domain to connect to.String
getHost()
Returns the host to connect to.BasePassword
getPassword()
Returns the SMB password to use.String
getRemoteDir()
Returns the remote directory.String
getUser()
Returns the SMB user name to use.String
globalInfo()
Returns a string describing the object.String
hostTipText()
Returns the tip text for this property.jcifs.smb.NtlmPasswordAuthentication
newAuthentication()
Returns a new SMB authentication.String
passwordTipText()
Returns the tip text for this property.String
remoteDirTipText()
Returns the tip text for this property.boolean
requiresInitialization()
Returns whether the setup needs to be configured by the user or whether it can be used straight away.void
setDomain(String value)
Sets the domain to connect to.void
setHost(String value)
Sets the host to connect to.void
setPassword(BasePassword value)
Sets the SMB password to use.void
setRemoteDir(String value)
Sets the remote directory.void
setUser(String value)
Sets the SMB user to use.String
userTipText()
Returns the tip text for this property.-
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.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_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_Session
protected transient jcifs.smb.NtlmPasswordAuthentication m_Session
the SMB authentication.
-
-
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
-
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.
-
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:
setPassword
in interfacePasswordSupporter
- Parameters:
value
- the password
-
getPassword
public BasePassword getPassword()
Returns the SMB password to use.- Specified by:
getPassword
in 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.
-
getAuthentication
public jcifs.smb.NtlmPasswordAuthentication getAuthentication()
Returns the SMB authentication.- Specified by:
getAuthentication
in interfaceSMBAuthenticationProvider
- Returns:
- the SMB authentication, null if not connected
-
newAuthentication
public jcifs.smb.NtlmPasswordAuthentication newAuthentication()
Returns a new SMB authentication.- Specified by:
newAuthentication
in interfaceSMBAuthenticationProvider
- Returns:
- the SMB authentication
-
cleanUp
public void cleanUp()
Cleans up data structures, frees up memory.- Specified by:
cleanUp
in interfaceCleanUpHandler
-
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:
requiresInitialization
in interfaceRemoteDirectorySetup
- Returns:
- true if user needs to configure first
-
-