| |
|
| java.lang.Object org.apache.jetspeed.util.descriptor.PortletApplicationWar
PortletApplicationWar | public class PortletApplicationWar (Code) | |
This class facilitates operations a portlet applications WAR file or WAR
file-like structure.
This class is utility class used mainly implementors of
org.apache.jetspeed.pamanager.Deployment and
org.apache.jetspeed.pamanager.Registration to assist in deployment
and undeployment of portlet applications.
author: Scott T. Weaver author: Matt Avery version: $Id: PortletApplicationWar.java,v 1.10 2004/07/06 16:56:19 weaver version: Exp $ |
ELEMENTS_BEFORE_SERVLET | final protected static String[] ELEMENTS_BEFORE_SERVLET(Code) | | |
ELEMENTS_BEFORE_SERVLET_MAPPING | final protected static String[] ELEMENTS_BEFORE_SERVLET_MAPPING(Code) | | |
EXTENDED_PORTLET_XML_PATH | final public static String EXTENDED_PORTLET_XML_PATH(Code) | | |
JETSPEED_SERVLET_MAPPING_XPATH | final public static String JETSPEED_SERVLET_MAPPING_XPATH(Code) | | |
JETSPEED_SERVLET_XPATH | final public static String JETSPEED_SERVLET_XPATH(Code) | | |
MAX_BUFFER_SIZE | final protected static int MAX_BUFFER_SIZE(Code) | | |
PORTLET_XML_PATH | final public static String PORTLET_XML_PATH(Code) | | |
WEB_XML_STRING | final protected static String WEB_XML_STRING(Code) | | |
log | final protected static Log log(Code) | | |
openedResources | final protected List openedResources(Code) | | |
PortletApplicationWar | public PortletApplicationWar(FileSystemHelper warStruct, String paName, String webAppContextRoot)(Code) | | Parameters: warFile - org.apache.jetspeed.util.FileSystemHelperrepresentingthe WAR file we are working with. ThisFileSystemHelper can be an actual WAR file or adirectory structure layed out in a WAR-like fashion. name ofthe portlet application the warPath contains Parameters: webAppContextRoot - context root relative to the servlet container of this app |
close | public void close() throws IOException(Code) | |
close
Closes any resource this PortletApplicationWar may have opened.
throws: IOException - |
copyWar | public PortletApplicationWar copyWar(String targetAppRoot) throws IOException(Code) | |
copyWar
Copies the entire WAR structure to the path defined in
targetAppRoot
Parameters: targetAppRoot - target to copy this WAR's content to. If the path ends in.war or .jar . The war will becopied into that file in jar format. PortletApplicationWar representing the newly created WAR. throws: IOException - |
createClassloader | public ClassLoader createClassloader(ClassLoader parent) throws IOException(Code) | |
createClassloader
Use this method to create a classloader based on this wars structure.
I.e. it will create a ClassLoader containing the contents of
WEB-INF/classes and WEB-INF/lib and the ClassLoader will be searched in
that order.
Parameters: parent - Parent ClassLoader. Can be null @throwsIOException |
getDeployedPath | public String getDeployedPath()(Code) | |
getDeployedPath
A string representing the path to this WAR in the form of a URLor null is the URL could not be created. |
getInputStream | protected InputStream getInputStream(String path) throws IOException(Code) | |
getInputStream
Returns a java.io.InputStream to a resource within this
WAR's structure.
Parameters: path - realtive to an object within this WAR's file structure java.io.InputStream to the file within the WAR throws: IOException - if the path does not exist or there was a problem reading theWAR. |
getOutputStream | protected OutputStream getOutputStream(String path) throws IOException(Code) | |
getOutputStream
Returns a java.io.OutputStream to a resource within this
WAR's structure.
Parameters: path - realtive to an object within this WAR's file structure java.io.Reader to the file within the WAR throws: IOException - if the path does not exist or there was a problem reading theWAR. |
getPortletApplicationChecksum | public long getPortletApplicationChecksum() throws IOException(Code) | | |
getPortletApplicationName | public String getPortletApplicationName()(Code) | | Returns the paName. |
getReader | protected Reader getReader(String path) throws IOException(Code) | |
getReader
Returns a java.io.Reader to a resource within this WAR's
structure.
Parameters: path - realtive to an object within this WAR's file structure java.io.Reader to the file within the WAR throws: IOException - if the path does not exist or there was a problem reading theWAR. |
processWebXML | public void processWebXML() throws MetaDataException(Code) | |
processWebXML
Infuses this PortletApplicationWar's web.xml file with
servlet and a servlet-mapping element for
the JetspeedContainer servlet. This is only done if the descriptor does
not already contain these items.
throws: MetaDataException - if there is a problem infusing |
removeWar | public void removeWar() throws IOException(Code) | |
removeWar
Deletes this WAR. If the WAR is a file structure and not an actual WAR
file, all children are delted first, then the directory is removed.
throws: IOException - if there is an error removing the WAR from the file system. |
validate | public void validate() throws PortletApplicationException(Code) | | Validate a PortletApplicationDefinition tree AFTER its
WebApplicationDefinition has been loaded. Currently, only the security
role references of the portlet definitions are validated:
- A security role reference should reference a security role through a
roleLink. A warning message is logged if a direct reference is used.
- For a security role reference a security role must be defined in the
web application. An error message is logged and a
PortletApplicationException is thrown if not.
throws: PortletApplicationException - |
|
|
|