Package adams.core.base
Class DockerDirectoryMapping
- java.lang.Object
-
- adams.core.base.BaseObject
-
- adams.core.base.AbstractBaseString
-
- adams.core.base.DockerDirectoryMapping
-
- All Implemented Interfaces:
adams.core.CloneHandler<adams.core.base.BaseObject>
,Serializable
,Comparable
public class DockerDirectoryMapping extends adams.core.base.AbstractBaseString
For mapping local dir with container dir.- Author:
- fracpete (fracpete at waikato dot ac dot nz)
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description DockerDirectoryMapping()
Initializes the directory mapping with a default value.DockerDirectoryMapping(File localDir, File containerDir)
Initializes the mapping with the provided dirs.DockerDirectoryMapping(String mapping)
Uses the specified mapping.DockerDirectoryMapping(String localDir, String containerDir)
Initializes the mapping with the provided dirs.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static String
collapseLocalDir(String mapping)
Collapses the local dir in the mapping ("localDir:containerDir") into a placeholder one.String
containerDir()
Returns the "container" part of the mapping.String
getExpandedValue()
Returns the expanded value.String
getTipText()
Returns a tool tip for the GUI editor (ignored if null is returned).boolean
isValid(String value)
Checks whether the string value is a valid presentation for this class.String
localDir()
Returns the "local" part of the mapping.-
Methods inherited from class adams.core.base.AbstractBaseString
convert, getValue, initialize, isEmpty, length, setValue, stringValue
-
-
-
-
Constructor Detail
-
DockerDirectoryMapping
public DockerDirectoryMapping()
Initializes the directory mapping with a default value.
-
DockerDirectoryMapping
public DockerDirectoryMapping(String mapping)
Uses the specified mapping.- Parameters:
mapping
- the mapping (local dir : container dir)
-
DockerDirectoryMapping
public DockerDirectoryMapping(File localDir, File containerDir)
Initializes the mapping with the provided dirs.- Parameters:
localDir
- the local directorycontainerDir
- the container directory
-
-
Method Detail
-
isValid
public boolean isValid(String value)
Checks whether the string value is a valid presentation for this class.- Overrides:
isValid
in classadams.core.base.AbstractBaseString
- Parameters:
value
- the string value to check- Returns:
- true if non-null
-
localDir
public String localDir()
Returns the "local" part of the mapping.- Returns:
- the local part
-
containerDir
public String containerDir()
Returns the "container" part of the mapping.- Returns:
- the container part
-
getExpandedValue
public String getExpandedValue()
Returns the expanded value.- Returns:
- the expanded value
-
getTipText
public String getTipText()
Returns a tool tip for the GUI editor (ignored if null is returned).- Specified by:
getTipText
in classadams.core.base.AbstractBaseString
- Returns:
- the tool tip
-
-