Class AbstractDeployable

    • Constructor Detail

      • AbstractDeployable

        public AbstractDeployable​(String file)
        Parameters:
        file - the location of the deploybale 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.
      • 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
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object