站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > JBOSS Portal 2.2 API 英文版文档

PortalWebApp - JBOSS Portal 2.2 API 英文版文档


org.jboss.portal.server.deployment
Class PortalWebApp

java.lang.Object
  extended byorg.jboss.portal.server.deployment.PortalWebApp
Direct Known Subclasses:
PortalWebTomcat4App, PortalWebTomcat5App

public abstract class PortalWebApp
extends java.lang.Object

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


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)
           
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.


getContextPath

public final java.lang.String getContextPath()
Returns the context path of the web application.


getServletContext

public final javax.servlet.ServletContext getServletContext()
Returns the servlet context of the web application.


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

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)
                   throws CannotCreatePortletWebAppException
Throws:
CannotCreatePortletWebAppException

toString

public java.lang.String toString()