Class AbstractDeployable

    • Constructor Detail

      • AbstractDeployable

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

      • getFile

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

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

        public void setFileHandler​(FileHandler fileHandler)
        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
        setLogger in class LoggedObject
        logger - the logger to set and set in the ancillary objects
      • isExpanded

        public boolean isExpanded()
        Specified by:
        isExpanded in interface Deployable
        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
        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
        The file or directory name for this deployable.
      • hashCode

        public int hashCode()
        hashCode in class Object