Java Doc for ArchiveConfigMBean.java in  » J2EE » JOnAS-4.8.6 » org » objectweb » jonas » resource » 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 » J2EE » JOnAS 4.8.6 » org.objectweb.jonas.resource 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


org.objectweb.jonas.resource.ArchiveConfigMBean

All known Subclasses:   org.objectweb.jonas.resource.RarConfigMBean,
ArchiveConfigMBean
public class ArchiveConfigMBean extends BaseModelMBean (Code)
A generic archive configuration MBean class which provides the ability to extract an XML configuration file from an archive (jar/war/ear/rar) as either a Document or as a String of XML. As well as storing an updated configuration file.
author:
   Patrick Smith
author:
   Greg Lapouchnian



Constructor Summary
public  ArchiveConfigMBean()
     Default constructor, constructs a BaseModelMBean.

Method Summary
public  voidaddXML(String archiveName, String xmlFilePath, String docString)
    
public  voidcreateArchiveWithXmlFile(String archiveName, String xmlFilePath, String doc)
    
public  DocumentextractDocument(String archiveName, String xmlFilePath)
     Extracts a Document representation of the XML file provided by xmlFilePath within the archive archiveName.
Parameters:
  archiveName - The archive from which to extract the XML.
Parameters:
  xmlFilePath - The path within the archive to the XML file.
public  StringextractXML(String archiveName, String xmlFilePath)
     Extracts a String representation of the XML file provided by xmlFilePath within the archive archiveName.
Parameters:
  archiveName - The archive from which to extract the XML.
Parameters:
  xmlFilePath - The path within the archive to the XML file.
protected  EntityResolvergetEntityResolver()
     Return an EntityResolver for this MBean.
protected  ListgetSchemaList()
     Get a list of possible schema locations to validate against.
public  voidsaveXML(String archiveName, String xmlFilePath, Document doc)
     Saves the given org.w3c.dom.Document back into an archive of the name given by archiveName.
public  voidverifyDocument(Document doc)
     Verifies that the Document is correct with respect to the schemas associated with the XML.


Constructor Detail
ArchiveConfigMBean
public ArchiveConfigMBean() throws MBeanException(Code)
Default constructor, constructs a BaseModelMBean.
throws:
  MBeanException - from the super class.




Method Detail
addXML
public void addXML(String archiveName, String xmlFilePath, String docString) throws IOException(Code)



createArchiveWithXmlFile
public void createArchiveWithXmlFile(String archiveName, String xmlFilePath, String doc) throws IOException(Code)



extractDocument
public Document extractDocument(String archiveName, String xmlFilePath) throws Exception(Code)
Extracts a Document representation of the XML file provided by xmlFilePath within the archive archiveName.
Parameters:
  archiveName - The archive from which to extract the XML.
Parameters:
  xmlFilePath - The path within the archive to the XML file. A document representation of the XML file.
throws:
  Exception - if the document cannot be extracted.



extractXML
public String extractXML(String archiveName, String xmlFilePath) throws Exception(Code)
Extracts a String representation of the XML file provided by xmlFilePath within the archive archiveName.
Parameters:
  archiveName - The archive from which to extract the XML.
Parameters:
  xmlFilePath - The path within the archive to the XML file. A String representation of the XML file.
throws:
  Exception - if the XML cannot be extracted.



getEntityResolver
protected EntityResolver getEntityResolver()(Code)
Return an EntityResolver for this MBean. an EntityResolver for this MBean.



getSchemaList
protected List getSchemaList()(Code)
Get a list of possible schema locations to validate against. a list of schemas that are available for this type of deploymentdescriptor.



saveXML
public void saveXML(String archiveName, String xmlFilePath, Document doc) throws IOException(Code)
Saves the given org.w3c.dom.Document back into an archive of the name given by archiveName. The Java Jar/Archive classes apparently do not provide support for simply updating a file in place in an archive, so a temporary archive must be created and have the contents of the existing archive copied over (with the exception of the updated Document file) then remove the existing archive and rename the temporary one.
Parameters:
  archiveName - The name (and path) of the archive to updated.
Parameters:
  xmlFilePath - The path within the archive to the XML file being updated.
Parameters:
  doc - The Document representation of the XML file being updated.
throws:
  IOException - If the updating fails.



verifyDocument
public void verifyDocument(Document doc) throws SAXException, IOException(Code)
Verifies that the Document is correct with respect to the schemas associated with the XML. If no exception is thrown then the XML is either valid or no schemas were available for this XML. In which case the Document can be considered verified.
Parameters:
  doc - The Document to validate.
throws:
  SAXException - If the document fails validation.
throws:
  IOException - If there is an error opening a schema.



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