Java Doc for PortletApplicationWar.java in  » Portal » jetspeed-2.1.3 » org » apache » jetspeed » util » descriptor » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Portal » jetspeed 2.1.3 » org.apache.jetspeed.util.descriptor 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


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 $



Field Summary
final protected static  String[]ELEMENTS_BEFORE_SERVLET
    
final protected static  String[]ELEMENTS_BEFORE_SERVLET_MAPPING
    
final public static  StringEXTENDED_PORTLET_XML_PATH
    
final public static  StringJETSPEED_SERVLET_MAPPING_XPATH
    
final public static  StringJETSPEED_SERVLET_XPATH
    
final protected static  intMAX_BUFFER_SIZE
    
final public static  StringPORTLET_XML_PATH
    
final public static  StringWEB_XML_PATH
    
final protected static  StringWEB_XML_STRING
    
final protected static  Loglog
    
final protected  ListopenedResources
    
protected  StringpaName
    
protected  FileSystemHelperwarStruct
    
protected  StringwebAppContextRoot
    

Constructor Summary
public  PortletApplicationWar(FileSystemHelper warStruct, String paName, String webAppContextRoot)
    
Parameters:
  warFile - org.apache.jetspeed.util.FileSystemHelperrepresentingthe WAR file we are working with.
public  PortletApplicationWar(FileSystemHelper warStruct, String paName, String webAppContextRoot, long paChecksum)
    

Method Summary
public  voidclose()
    

close

Closes any resource this PortletApplicationWar may have opened.
public  PortletApplicationWarcopyWar(String targetAppRoot)
    

copyWar

Copies the entire WAR structure to the path defined in targetAppRoot
Parameters:
  targetAppRoot - target to copy this WAR's content to.
public  ClassLoadercreateClassloader(ClassLoader parent)
    

createClassloader

Use this method to create a classloader based on this wars structure. I.e.
public  MutablePortletApplicationcreatePortletApp(ClassLoader classLoader)
    
public  MutablePortletApplicationcreatePortletApp()
    
public  MutableWebApplicationcreateWebApp()
    
public  StringgetDeployedPath()
    
public  FileSystemHelpergetFileSystem()
    
protected  InputStreamgetInputStream(String path)
    

getInputStream

Returns a java.io.InputStream to a resource within this WAR's structure.
protected  OutputStreamgetOutputStream(String path)
    

getOutputStream

Returns a java.io.OutputStream to a resource within this WAR's structure.
public  longgetPortletApplicationChecksum()
    
public  StringgetPortletApplicationName()
    
protected  ReadergetReader(String path)
    

getReader

Returns a java.io.Reader to a resource within this WAR's structure.
protected  WritergetWriter(String path)
    
public  voidprocessWebXML()
    

processWebXML

Infuses this PortletApplicationWar's web.xml file with servlet and a servlet-mapping element for the JetspeedContainer servlet.
public  voidremoveWar()
    

removeWar

Deletes this WAR.
public  voidvalidate()
     Validate a PortletApplicationDefinition tree AFTER its WebApplicationDefinition has been loaded.

Field Detail
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_PATH
final public static String WEB_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)



paName
protected String paName(Code)



warStruct
protected FileSystemHelper warStruct(Code)



webAppContextRoot
protected String webAppContextRoot(Code)




Constructor Detail
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



PortletApplicationWar
public PortletApplicationWar(FileSystemHelper warStruct, String paName, String webAppContextRoot, long paChecksum)(Code)




Method Detail
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



createPortletApp
public MutablePortletApplication createPortletApp(ClassLoader classLoader) throws PortletApplicationException, IOException(Code)

createPortletApp

Creates a portlet application object based of the WAR file's WEB-INF/portlet.xml @throwsPortletApplicationException
throws:
  IOException -
See Also:   org.apache.jetspeed.uitl.descriptor.PortletApplicationDescriptor



createPortletApp
public MutablePortletApplication createPortletApp() throws PortletApplicationException, IOException(Code)



createWebApp
public MutableWebApplication createWebApp() throws PortletApplicationException, IOException(Code)

createWebApp

Creates a web applicaiton object based on the values in this WAR's WEB-INF/web.xml @throwsPortletApplicationException
throws:
  IOException -
See Also:   org.apache.jetspeed.util.descriptor.WebApplicationDescriptor



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.



getFileSystem
public FileSystemHelper getFileSystem()(Code)



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.



getWriter
protected Writer getWriter(String path) throws IOException(Code)



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 -



Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.