001
014
015 package com.liferay.portal.kernel.patcher;
016
017 import com.liferay.portal.kernel.security.pacl.permission.PortalRuntimePermission;
018
019 import java.io.File;
020
021 import java.util.Properties;
022
023
027 public class PatcherUtil {
028
029 public static boolean applyPatch(File patchFile) {
030 return getPatcher().applyPatch(patchFile);
031 }
032
033 public static String[] getFixedIssues() {
034 return getPatcher().getFixedIssues();
035 }
036
037 public static String[] getInstalledPatches() {
038 return getPatcher().getInstalledPatches();
039 }
040
041 public static File getPatchDirectory() {
042 return getPatcher().getPatchDirectory();
043 }
044
045 public static Patcher getPatcher() {
046 PortalRuntimePermission.checkGetBeanProperty(Patcher.class);
047
048 return _patcher;
049 }
050
051 public static int getPatchingToolVersion() {
052 return getPatcher().getPatchingToolVersion();
053 }
054
055 public static String[] getPatchLevels() {
056 return getPatcher().getPatchLevels();
057 }
058
059 public static Properties getProperties() {
060 return getPatcher().getProperties();
061 }
062
063 public static boolean hasInconsistentPatchLevels() {
064 return getPatcher().hasInconsistentPatchLevels();
065 }
066
067 public static boolean isConfigured() {
068 return getPatcher().isConfigured();
069 }
070
071 public static void verifyPatchLevels() throws PatchInconsistencyException {
072 getPatcher().verifyPatchLevels();
073 }
074
075 public void setPatcher(Patcher patcher) {
076 PortalRuntimePermission.checkGetBeanProperty(Patcher.class);
077
078 _patcher = patcher;
079 }
080
081 private static Patcher _patcher;
082
083 }