KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > jboss > portal > server > deployment > WebAppAdapter


1 /*****************************************
2  * *
3  * JBoss Portal: The OpenSource Portal *
4  * *
5  * Distributable under LGPL license. *
6  * See terms of license at gnu.org. *
7  * *
8  *****************************************/

9 package org.jboss.portal.server.deployment;
10
11 import org.jboss.portal.server.deployment.jboss.ServerDeployerMBean;
12 import org.jboss.portal.server.deployment.jboss.MainDeployerFacade;
13 import org.jboss.deployment.DeploymentException;
14
15 /**
16  * @jmx.mbean
17  * @jboss.xmbean
18  *
19  * @author <a HREF="mailto:julien@jboss.org">Julien Viet</a>
20  * @version $Revision: 1.4 $
21  */

22 public class WebAppAdapter
23    extends WebAppIntercepter
24 {
25
26    /** The specific portal web app deployer. */
27    private ServerDeployerMBean deployer;
28
29    /**
30     * @jmx.managed-attribute
31     */

32    public ServerDeployerMBean getDeployer()
33    {
34       return deployer;
35    }
36
37    /**
38     * @jmx.managed-attribute
39     */

40    public void setDeployer(ServerDeployerMBean deployer)
41    {
42       this.deployer = deployer;
43    }
44
45    protected void deploy(PortalWebApp pwa)
46    {
47       try
48       {
49          deployer.deploy(pwa);
50       }
51       catch (DeploymentException e)
52       {
53          MainDeployerFacade.log(e);
54       }
55    }
56
57    protected void undeploy(PortalWebApp pwa)
58    {
59       try
60       {
61          deployer.undeploy(pwa);
62       }
63       catch (DeploymentException e)
64       {
65          MainDeployerFacade.log(e);
66       }
67    }
68 }
69
Popular Tags