Class InstalledFiles


  • public class InstalledFiles
    extends java.lang.Object
    Details of the files installed during a module installation into a WAR
    Author:
    Roy Wetherall
    • Constructor Summary

      Constructors 
      Constructor Description
      InstalledFiles​(java.lang.String warLocation, java.lang.String moduleId)
      Constructor
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void addAdd​(java.lang.String location)
      Add a file addition
      void addMkdir​(java.lang.String location)
      Add a directory
      void addUpdate​(java.lang.String location, java.lang.String backup)
      Add a file update
      java.util.List<java.lang.String> getAdds()
      Get all the added files
      java.lang.String getFileLocation()
      Returns the location of the modifications file based on the module id
      java.lang.String getFilePathInWar()  
      java.util.List<java.lang.String> getMkdirs()
      Gets a list of the dirs added during install
      java.util.Map<java.lang.String,​java.lang.String> getUpdates()
      Get all the updated files, key is the file that has been updated and the value is the location of the backup made before modification took place.
      void load()
      Loads the exisiting information about the installed files from the WAR
      void save()
      Saves the current modification details into the WAR
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • InstalledFiles

        public InstalledFiles​(java.lang.String warLocation,
                              java.lang.String moduleId)
        Constructor
        Parameters:
        warLocation - the war location
        moduleId - the module id
    • Method Detail

      • load

        public void load()
        Loads the exisiting information about the installed files from the WAR
      • save

        public void save()
        Saves the current modification details into the WAR
      • getFileLocation

        public java.lang.String getFileLocation()
        Returns the location of the modifications file based on the module id
        Returns:
        the file location
      • getFilePathInWar

        public java.lang.String getFilePathInWar()
        Returns:
        Returns the path of the install file within the WAR
      • getAdds

        public java.util.List<java.lang.String> getAdds()
        Get all the added files
        Returns:
        list of files added to war
      • getUpdates

        public java.util.Map<java.lang.String,​java.lang.String> getUpdates()
        Get all the updated files, key is the file that has been updated and the value is the location of the backup made before modification took place.
        Returns:
        map of file locaiton and backup
      • getMkdirs

        public java.util.List<java.lang.String> getMkdirs()
        Gets a list of the dirs added during install
        Returns:
        list of directories added
      • addAdd

        public void addAdd​(java.lang.String location)
        Add a file addition
        Parameters:
        location - the file added
      • addUpdate

        public void addUpdate​(java.lang.String location,
                              java.lang.String backup)
        Add a file update
        Parameters:
        location - the file updated
        backup - the backup location
      • addMkdir

        public void addMkdir​(java.lang.String location)
        Add a directory
        Parameters:
        location - the directory location
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object