KickJava   Java API By Example, From Geeks To Geeks.

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


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 java.net.URL JavaDoc;
12
13 import javax.servlet.ServletContext JavaDoc;
14
15 import org.apache.log4j.Logger;
16 import org.jboss.web.WebApplication;
17
18 /**
19  * Encapsulate the infos needed by the portal deployment layer to create the application.
20  *
21  * @author <a HREF="mailto:julien@jboss.org">Julien Viet</a>
22  * @version $Revision: 1.4 $
23  */

24 public abstract class PortalWebApp
25 {
26
27    /** The logger. */
28    protected final Logger log = Logger.getLogger(getClass());
29
30    /** The web application as seen by JBoss. */
31    protected final WebApplication webApp;
32
33    /** The URL the webapp comes from. */
34    protected final URL JavaDoc url;
35
36    /**
37     * Constructor with the given web app.
38     */

39    protected PortalWebApp(WebApplication webApp)
40    {
41       this.webApp = webApp;
42       this.url = webApp.getURL();
43    }
44
45    /**
46     * Instrument the web application.
47     */

48    public abstract void instrument() throws Exception JavaDoc;
49
50    /**
51     * Return the URL associated to this webapp.
52     */

53    public URL JavaDoc getURL()
54    {
55       return url;
56    }
57
58    /**
59     * Return the classloader of the web app.
60     */

61    public abstract ClassLoader JavaDoc getClassLoader();
62
63    /**
64     * Returns the context path of the web application.
65     */

66    public abstract String JavaDoc getContextPath();
67
68    /**
69     * Returns the servlet context of the web application.
70     */

71    public abstract ServletContext JavaDoc getServletContext();
72 }
73
Popular Tags