001
014
015 package com.liferay.portal.kernel.deploy;
016
017 import com.liferay.portal.kernel.deploy.auto.context.AutoDeploymentContext;
018 import com.liferay.portal.kernel.plugin.PluginPackage;
019 import com.liferay.portal.kernel.security.pacl.permission.PortalRuntimePermission;
020
021 import java.util.List;
022 import java.util.Properties;
023
024
029 public class DeployManagerUtil {
030
031 public static void deploy(AutoDeploymentContext autoDeploymentContext)
032 throws Exception {
033
034 getDeployManager().deploy(autoDeploymentContext);
035 }
036
037 public static String getDeployDir() throws Exception {
038 return getDeployManager().getDeployDir();
039 }
040
041 public static DeployManager getDeployManager() {
042 PortalRuntimePermission.checkGetBeanProperty(DeployManagerUtil.class);
043
044 return _deployManager;
045 }
046
047 public static String getInstalledDir() throws Exception {
048 return getDeployManager().getInstalledDir();
049 }
050
051 public static PluginPackage getInstalledPluginPackage(String context) {
052 return getDeployManager().getInstalledPluginPackage(context);
053 }
054
055 public static List<PluginPackage> getInstalledPluginPackages() {
056 return getDeployManager().getInstalledPluginPackages();
057 }
058
059 public static List<String[]> getLevelsRequiredDeploymentContexts() {
060 return getDeployManager().getLevelsRequiredDeploymentContexts();
061 }
062
063 public static List<String[]> getLevelsRequiredDeploymentWARFileNames() {
064 return getDeployManager().getLevelsRequiredDeploymentWARFileNames();
065 }
066
067 public static boolean isDeployed(String context) {
068 return getDeployManager().isDeployed(context);
069 }
070
071 public static boolean isRequiredDeploymentContext(String context) {
072 return getDeployManager().isRequiredDeploymentContext(context);
073 }
074
075 public static PluginPackage readPluginPackageProperties(
076 String displayName, Properties properties) {
077
078 return getDeployManager().readPluginPackageProperties(
079 displayName, properties);
080 }
081
082 public static PluginPackage readPluginPackageXml(String xml)
083 throws Exception {
084
085 return getDeployManager().readPluginPackageXml(xml);
086 }
087
088 public static void redeploy(String context) throws Exception {
089 getDeployManager().redeploy(context);
090 }
091
092 public static void reset() {
093 PortalRuntimePermission.checkSetBeanProperty(DeployManagerUtil.class);
094
095 _deployManager = null;
096 }
097
098 public static void undeploy(String context) throws Exception {
099 getDeployManager().undeploy(context);
100 }
101
102 public void setDeployManager(DeployManager deployManager) {
103 PortalRuntimePermission.checkSetBeanProperty(getClass());
104
105 _deployManager = deployManager;
106 }
107
108 private static DeployManager _deployManager;
109
110 }