Class AbstractDeployable

    • Constructor Detail

      • AbstractDeployable

        public AbstractDeployable​(String file)
        Parameters:
        file - the location of the deployable file being wrapped.
    • Method Detail

      • getFile

        public String getFile()
        Specified by:
        getFile in interface Deployable
        Returns:
        the file representing the archive to deploy
      • getFileHandler

        public FileHandler getFileHandler()
        Returns:
        the Cargo file utility class
      • setFileHandler

        public void setFileHandler​(FileHandler fileHandler)
        Parameters:
        fileHandler - the Cargo file utility class to use. This method is useful for unit testing with Mock objects as it can be passed a test file handler that doesn't perform any real file action.
      • setLogger

        public void setLogger​(Logger logger)
        Overriden in order to set the logger on ancillary components.
        Specified by:
        setLogger in interface Loggable
        Overrides:
        setLogger in class LoggedObject
        Parameters:
        logger - the logger to set and set in the ancillary objects
      • isExpanded

        public boolean isExpanded()
        Specified by:
        isExpanded in interface Deployable
        Returns:
        If the deployable is a directory or not
      • getName

        public String getName()
        Returns the name of this deployable. Default value is computed from the Deployable file name (removing the filename extension).
        Specified by:
        getName in interface Deployable
        Returns:
        the name of this deployable
      • getFilename

        public String getFilename()
        Deployable file name, taking into account the Deployable.getName(), including any deployable-specific aspects of it, and the escaping in order to avoid unwanted file system actions (for example, ensuring the file name contains no slashes).

        Default value is the Deployable file name.
        Specified by:
        getFilename in interface Deployable
        Returns:
        The file or directory name for this deployable.
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object