Class 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
    • Field Summary

      • Fields inherited from class adams.core.base.BaseObject

        m_Internal, m_Properties, SUFFIX_DISPLAY, SUFFIX_VALUE
    • 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
      • Methods inherited from class adams.core.base.BaseObject

        compareTo, equals, getClone, getInternal, getTemplates, getUnicode, hasFavoritesSupport, hashCode, isValidUnicode, newInstance, setUnicode, toObjectArray, toObjectArray, toString, toStringArray, toStringList
    • 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 directory
        containerDir - the container directory
      • DockerDirectoryMapping

        public DockerDirectoryMapping​(String localDir,
                                      String containerDir)
        Initializes the mapping with the provided dirs.
        Parameters:
        localDir - the local directory
        containerDir - 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 class adams.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 class adams.core.base.AbstractBaseString
        Returns:
        the tool tip
      • collapseLocalDir

        public static String collapseLocalDir​(String mapping)
        Collapses the local dir in the mapping ("localDir:containerDir") into a placeholder one.
        Parameters:
        mapping - the mapping to process
        Returns:
        the updated mapping