001
014
015 package com.liferay.portal.deploy.auto;
016
017 import com.liferay.portal.deploy.DeployUtil;
018 import com.liferay.portal.kernel.log.Log;
019 import com.liferay.portal.kernel.log.LogFactoryUtil;
020 import com.liferay.portal.kernel.util.PropsKeys;
021 import com.liferay.portal.kernel.util.ServerDetector;
022 import com.liferay.portal.kernel.util.StringPool;
023 import com.liferay.portal.tools.deploy.ThemeDeployer;
024 import com.liferay.portal.util.PrefsPropsUtil;
025 import com.liferay.portal.util.PropsValues;
026
027 import java.util.ArrayList;
028 import java.util.List;
029
030
034 public class ThemeAutoDeployer extends ThemeDeployer implements AutoDeployer {
035
036 public ThemeAutoDeployer() {
037 try {
038 baseDir = PrefsPropsUtil.getString(
039 PropsKeys.AUTO_DEPLOY_DEPLOY_DIR,
040 PropsValues.AUTO_DEPLOY_DEPLOY_DIR);
041 destDir = DeployUtil.getAutoDeployDestDir();
042 appServerType = ServerDetector.getServerId();
043 themeTaglibDTD = DeployUtil.getResourcePath("liferay-theme.tld");
044 utilTaglibDTD = DeployUtil.getResourcePath("liferay-util.tld");
045 unpackWar = PrefsPropsUtil.getBoolean(
046 PropsKeys.AUTO_DEPLOY_UNPACK_WAR,
047 PropsValues.AUTO_DEPLOY_UNPACK_WAR);
048 filePattern = StringPool.BLANK;
049 jbossPrefix = PrefsPropsUtil.getString(
050 PropsKeys.AUTO_DEPLOY_JBOSS_PREFIX,
051 PropsValues.AUTO_DEPLOY_JBOSS_PREFIX);
052 tomcatLibDir = PrefsPropsUtil.getString(
053 PropsKeys.AUTO_DEPLOY_TOMCAT_LIB_DIR,
054 PropsValues.AUTO_DEPLOY_TOMCAT_LIB_DIR);
055
056 List<String> jars = new ArrayList<String>();
057
058 addExtJar(jars, "ext-util-bridges.jar");
059 addExtJar(jars, "ext-util-java.jar");
060 addExtJar(jars, "ext-util-taglib.jar");
061 addRequiredJar(jars, "util-bridges.jar");
062 addRequiredJar(jars, "util-java.jar");
063 addRequiredJar(jars, "util-taglib.jar");
064
065 this.jars = jars;
066
067 checkArguments();
068 }
069 catch (Exception e) {
070 _log.error(e, e);
071 }
072 }
073
074 private static Log _log = LogFactoryUtil.getLog(ThemeAutoDeployer.class);
075
076 }