Class UpdateUtil

java.lang.Object
com.logicaldoc.enterprise.update.UpdateUtil

public class UpdateUtil extends Object
Utility class to check available updates
Since:
7.3.1
Author:
Marco Meschieri - LogicalDOC
  • Method Details

    • getBaseUrl

      public static String getBaseUrl()
    • checkUpdate

      public static Properties checkUpdate(String userNo) throws ResourceUnavailableException
      Checks the existence of an update for the given license
      Parameters:
      userNo - UserNo of the license
      Returns:
      A fieldsMap with the license details
      Throws:
      ResourceUnavailableException - thrown in case a resource exists but is not avaliable at the moment
    • matchesCurrentRelease

      public static boolean matchesCurrentRelease(Properties localUpdatePackage)
    • currentRelease

      public static String currentRelease()
    • readUpdateFile

      public static Properties readUpdateFile(File updateFile) throws IOException, ParseException
      Reads a local update package and extracts the same metadata as they were obtained from the remote LM
      Parameters:
      updateFile - The update package file
      Returns:
      The metadata
      Throws:
      IOException - Error extracting the metadata from the compressed archive
      ParseException - Error parsing the file name
    • readPatchFile

      public static Properties readPatchFile(File patchFile) throws IOException, ParseException
      Reads a local patch package and extracts the same metadata as they were obtained from the remote LM
      Parameters:
      patchFile - The patch package file
      Returns:
      The metadata
      Throws:
      IOException - Error extracting the metadata from the compressed archive
      ParseException - Error parsing the file name
    • getUpdateFile

      public static File getUpdateFile(String fileName, boolean temp)
    • isUpdateFileName

      public static boolean isUpdateFileName(String fileName)
    • isPatchFileName

      public static boolean isPatchFileName(String fileName)
    • checkPatches

      public static Properties checkPatches(String userNo)
      Checks the existence of a patch for the given license
      Parameters:
      userNo - UserNo of the license
      Returns:
      A fieldsMap with the patches details
    • getPatchFile

      public static File getPatchFile(String fileName, boolean temp)