org.wso2.carbon.server.util
Class PatchUtils
java.lang.Object
org.wso2.carbon.server.util.PatchUtils
public class PatchUtils
- extends Object
|
Method Summary |
static void |
applyServicepacksAndPatches(File servicepackDir,
File patchesDir,
File pluginsDir)
Here is the patch applying algorithm. |
static void |
checkMD5Checksum(Map<String,JarInfo> latestPatchedJar,
File plugins,
boolean applyPatches)
|
static boolean |
checkUpdatedJars(Map<String,JarInfo> latestPatchedJar)
|
static void |
copyLatestServicepack(File source,
File target,
BufferedWriter bufWriter)
This will copy jar files on servicepacks to plugins directory |
static File |
getMetaDirectory()
|
static Map<String,JarInfo> |
getMostLatestJarsInServicepackAndPatches(File servicepackDir,
File parentPatchDir)
get the list of most latest jars in latest servicepack and patches-xxx directories |
static File |
getPatchesLogsFile()
|
static FilenameFilter |
getPatchFileNameFilter()
|
static PatchInfo |
processPatches(File patchDirLogFile,
File servicepackDir,
File patchesDir)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
PatchUtils
public PatchUtils()
applyServicepacksAndPatches
public static void applyServicepacksAndPatches(File servicepackDir,
File patchesDir,
File pluginsDir)
throws IOException
- Here is the patch applying algorithm.
1) Creates a patch0000 (if it does not exist) inside the patches directory. Backup all the bundles in the plugins
directory
2) Before applying patches on components/patches directory apply servicepacks on components/servicepacks directory
3) Then copy remaining patches which not contain on servicepacks patchxxxx to the plugins folder.
- Parameters:
servicepackDir - parent servicepack directory "repository/components/servicepacks"patchesDir - parent patch directory "repository/components/patches"pluginsDir - plugin directory "repository/components/plugins"
- Throws:
IOException
copyLatestServicepack
public static void copyLatestServicepack(File source,
File target,
BufferedWriter bufWriter)
- This will copy jar files on servicepacks to plugins directory
- Parameters:
source - servicepack directorytarget - plugin directory
- Throws:
IOException
processPatches
public static PatchInfo processPatches(File patchDirLogFile,
File servicepackDir,
File patchesDir)
throws IOException
- Throws:
IOException
getMostLatestJarsInServicepackAndPatches
public static Map<String,JarInfo> getMostLatestJarsInServicepackAndPatches(File servicepackDir,
File parentPatchDir)
throws Exception
- get the list of most latest jars in latest servicepack and patches-xxx directories
- Parameters:
servicepackDir - servicepack directoryparentPatchDir - folder which contains the patches.
- Returns:
- list of most latest jars in latest servicepack and patches directories
- Throws:
Exception
checkMD5Checksum
public static void checkMD5Checksum(Map<String,JarInfo> latestPatchedJar,
File plugins,
boolean applyPatches)
throws Exception
- Parameters:
latestPatchedJar - map of jar name and jar locationplugins - plugins directory
- Throws:
Exception
checkUpdatedJars
public static boolean checkUpdatedJars(Map<String,JarInfo> latestPatchedJar)
throws Exception
- Throws:
Exception
getPatchesLogsFile
public static File getPatchesLogsFile()
getMetaDirectory
public static File getMetaDirectory()
getPatchFileNameFilter
public static FilenameFilter getPatchFileNameFilter()
Copyright © 2014 WSO2 Inc. All rights reserved.