1
14
15 package com.liferay.portal.deploy.auto;
16
17 import com.liferay.portal.kernel.deploy.auto.AutoDeployException;
18 import com.liferay.portal.kernel.deploy.auto.BaseAutoDeployListener;
19 import com.liferay.portal.kernel.log.Log;
20 import com.liferay.portal.kernel.log.LogFactoryUtil;
21
22 import java.io.File;
23
24
29 public class ExtAutoDeployListener extends BaseAutoDeployListener {
30
31 public ExtAutoDeployListener() {
32 _deployer = new ExtAutoDeployer();
33 }
34
35 public void deploy(File file) throws AutoDeployException {
36 if (_log.isDebugEnabled()) {
37 _log.debug("Invoking deploy for " + file.getPath());
38 }
39
40 if (!isExtPlugin(file)) {
41 return;
42 }
43
44 if (_log.isInfoEnabled()) {
45 _log.info("Copying web plugin for " + file.getPath());
46 }
47
48 _deployer.autoDeploy(file.getName());
49
50 if (_log.isInfoEnabled()) {
51 _log.info(
52 "Extension environment for " + file.getPath() +
53 " copied successfully. Deployment will start in a few " +
54 "seconds.");
55 }
56 }
57
58 private static Log _log = LogFactoryUtil.getLog(
59 ExtAutoDeployListener.class);
60
61 private AutoDeployer _deployer;
62
63 }