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 String[] getPatchLevels() {
052 return getPatcher().getPatchLevels();
053 }
054
055 public static Properties getProperties() {
056 return getPatcher().getProperties();
057 }
058
059 public static boolean isConfigured() {
060 return getPatcher().isConfigured();
061 }
062
063 public static boolean hasInconsistentPatchLevels() {
064 return getPatcher().hasInconsistentPatchLevels();
065 }
066
067 public void setPatcher(Patcher patcher) {
068 PortalRuntimePermission.checkSetBeanProperty(getClass());
069
070 _patcher = patcher;
071 }
072
073 public static void verifyPatchLevels() throws PatchInconsistencyException {
074 getPatcher().verifyPatchLevels();
075 }
076
077 private static Patcher _patcher;
078
079 }