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 boolean isDeployed(String context) {
060 return getDeployManager().isDeployed(context);
061 }
062
063 public static PluginPackage readPluginPackageProperties(
064 String displayName, Properties properties) {
065
066 return getDeployManager().readPluginPackageProperties(
067 displayName, properties);
068 }
069
070 public static PluginPackage readPluginPackageXml(String xml)
071 throws Exception {
072
073 return getDeployManager().readPluginPackageXml(xml);
074 }
075
076 public static void redeploy(String context) throws Exception {
077 getDeployManager().redeploy(context);
078 }
079
080 public static void reset() {
081 PortalRuntimePermission.checkSetBeanProperty(DeployManagerUtil.class);
082
083 _deployManager = null;
084 }
085
086 public static void undeploy(String context) throws Exception {
087 getDeployManager().undeploy(context);
088 }
089
090 public void setDeployManager(DeployManager deployManager) {
091 PortalRuntimePermission.checkSetBeanProperty(getClass());
092
093 _deployManager = deployManager;
094 }
095
096 private static DeployManager _deployManager;
097
098 }