Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.jboss.portal.server.deployment
Class PortalWebApp

    java.lang.Object
      org.jboss.portal.server.deployment.PortalWebApp

All Implemented Interfaces:
  org.jboss.portal.web.WebApp

Direct Known Subclasses:
  PortalWebTomcat4App, PortalWebTomcat5App, PortalWebTomcat6App

    public abstract class PortalWebApp

extends java.lang.Object
implements org.jboss.portal.web.WebApp

Encapsulate the infos needed by the portal deployment layer to create the application.

Version:
  $Revision: 10228 $
Author:
  Julien Viet

Field Summary
`protected org.apache.log4j.Logger` | `log` The logger.

Constructor Summary
`protected` | `PortalWebApp()` Constructor with the given web app.

Method Summary
`java.lang.ClassLoader` | `getClassLoader()` Return the classloader of the web app.
`java.lang.String` | `getContextPath()` Returns the context path of the web application.
`org.w3c.dom.Document` | `getDescriptor()`
`java.lang.String` | `getId()` Return the application id.
`javax.servlet.ServletContext` | `getServletContext()` Returns the servlet context of the web application.
`java.net.URL` | `getURL()` Return the URL associated to this webapp.
`boolean` | `importFile(java.lang.String parentDirRelativePath, java.lang.String name, java.io.InputStream source, boolean overwrite)` Import a file in the war file.
`protected void` | `init(javax.servlet.ServletContext servletContext, java.net.URL url, java.lang.ClassLoader loader, java.lang.String contextPath, org.xml.sax.EntityResolver jbossAppEntityResolver)`
`abstract void` | `instrument()` Instrument the web application.
`java.lang.String` | `toString()`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Field Detail

### log

    protected final org.apache.log4j.Logger log

  The logger.

Constructor Detail

### PortalWebApp

    protected PortalWebApp()

  Constructor with the given web app.

Method Detail

### instrument

    public abstract void instrument()
                             throws java.lang.Exception

  Instrument the web application.

  Throws:
    `java.lang.Exception`

### getURL

    public final java.net.URL getURL()

  Return the URL associated to this webapp.

### getId

    public final java.lang.String getId()

  Return the application id.

### getClassLoader

    public final java.lang.ClassLoader getClassLoader()

  Return the classloader of the web app.

  Specified by:
    `getClassLoader` in interface `org.jboss.portal.web.WebApp`

### getContextPath

    public final java.lang.String getContextPath()

  Returns the context path of the web application.

  Specified by:
    `getContextPath` in interface `org.jboss.portal.web.WebApp`

### getServletContext

    public final javax.servlet.ServletContext getServletContext()

  Returns the servlet context of the web application.

  Specified by:
    `getServletContext` in interface `org.jboss.portal.web.WebApp`

### getDescriptor

    public final org.w3c.dom.Document getDescriptor()

### importFile

    public final boolean importFile(java.lang.String parentDirRelativePath,
                                    java.lang.String name,
                                    java.io.InputStream source,
                                    boolean overwrite)
                             throws java.io.IOException

  Import a file in the war file. The file could not be created for some reasons which are :
  - The parent dir exists and is a file
  - The parent dir does not exist and its creation failed
  - An underlying exception occurs when writing bytes from the source `Inputstream` to the target `OutputStream`

  Specified by:
    `importFile` in interface `org.jboss.portal.web.WebApp`
  Parameters:
    `parentDirRelativePath` - the parent relative path in the web app starting from the app root
    `name` - the name the created file should have
    `source` - the data of the target file
    `overwrite` - if false and the file already exists nothing is done
  Returns:
    true if the file has been created
  Throws:
    `java.io.IOException` - if the file cannot be created

### init

    protected final void init(javax.servlet.ServletContext servletContext,
                              java.net.URL url,
                              java.lang.ClassLoader loader,
                              java.lang.String contextPath,
                              org.xml.sax.EntityResolver jbossAppEntityResolver)
                       throws CannotCreatePortletWebAppException

  Throws:
    `CannotCreatePortletWebAppException`

### toString

    public java.lang.String toString()

  Overrides:
    `toString` in class `java.lang.Object`

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD