Java Doc for ImportMvnForum.java in  » Forum » mvnforum-1.1 » com » mvnforum » admin » importexport » mvnforum » 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 » Forum » mvnforum 1.1 » com.mvnforum.admin.importexport.mvnforum 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   com.mvnforum.admin.ImportWebHelper
      com.mvnforum.admin.importexport.mvnforum.ImportMvnForum

ImportMvnForum
public class ImportMvnForum extends ImportWebHelper (Code)

author:
   Igor Manic
version:
   $Revision: 1.15 $, $Date: 2007/06/22 09:08:30 $
version:
  

version:
   ImportMvnForum class encapsulates processing
version:
   of MVN Forum's XML or ZIP backups, and imports all the data into MVN Forum.
version:
   For details see ImportMvnForum.importXml(File,HttpServletRequest,HttpServletResponse,int,String,Calendar,String,boolean,int)
version:
   and ImportMvnForum.importZip(File,HttpServletRequest,HttpServletResponse,int,String,Calendar,String,boolean,int)
version:
  

version:
   This class cannot be instantiated.




Method Summary
public static  voidaddImportantMessage(String message)
     Adds important (bold) message to the output stream that was setup in ImportMvnForum.importXml(File,HttpServletRequest,HttpServletResponse,int,String,Calendar,String,boolean,int) .
public static  voidaddMessage(String message)
     Adds message to the output stream that was setup in ImportMvnForum.importXml(File,HttpServletRequest,HttpServletResponse,int,String,Calendar,String,boolean,int) .
public static  voidcreateDefaultContents()
     Ensure that default entries in MVN Forum (admin and virtual guest members, rank titles, Registered Members group, ...) are created.
This method was made public to be available to MVN Forum XML processing classes.
Since these defaults will be imported from XML (they are supposed to be in the XML), this method won't do anything.
public static  voidimportXml(File importFile, HttpServletRequest request, HttpServletResponse response, int logonMemberID, String logonMemberName, Calendar importTime, String importIP, boolean clearIfError, int messageLevel)
     This method performs processing of MVN Forum's XML backup file importFile and imports the data into the MVN Forum system.
public static  voidimportZip(File importFile, HttpServletRequest request, HttpServletResponse response, int logonMemberID, String logonMemberName, Calendar importTime, String importIP, boolean clearIfError, int messageLevel)
     This method performs processing of MVN Forum's ZIP backup file importFile and imports the data into the MVN Forum system.
protected static  voidprocessXml(File inputFile, Calendar importTime)
     This method performs actual processing of MVN Forum's XML file inputFile and imports the data into the MVN Forum system.
Don't use this method directly.



Method Detail
addImportantMessage
public static void addImportantMessage(String message)(Code)
Adds important (bold) message to the output stream that was setup in ImportMvnForum.importXml(File,HttpServletRequest,HttpServletResponse,int,String,Calendar,String,boolean,int) .
This method was made public to be available to MVN Forum XML processing classes.
Parameters:
  message - Message to be written to output.
See Also:   com.mvnforum.admin.ImportWebHelper.addImportantMessage(java.lang.String)



addMessage
public static void addMessage(String message)(Code)
Adds message to the output stream that was setup in ImportMvnForum.importXml(File,HttpServletRequest,HttpServletResponse,int,String,Calendar,String,boolean,int) .
This method was made public to be available to MVN Forum XML processing classes.
Parameters:
  message - Message to be written to output.
See Also:   com.mvnforum.admin.ImportWebHelper.addMessage(java.lang.String)



createDefaultContents
public static void createDefaultContents() throws CreateException, DuplicateKeyException, ObjectNotFoundException, DatabaseException, ForeignKeyNotFoundException(Code)
Ensure that default entries in MVN Forum (admin and virtual guest members, rank titles, Registered Members group, ...) are created.
This method was made public to be available to MVN Forum XML processing classes.
Since these defaults will be imported from XML (they are supposed to be in the XML), this method won't do anything. At the end of import, defaults will be checked and created in case XML didn't contain them.
See Also:   com.mvnforum.admin.ImportWebHelper.addMessage(java.lang.String)



importXml
public static void importXml(File importFile, HttpServletRequest request, HttpServletResponse response, int logonMemberID, String logonMemberName, Calendar importTime, String importIP, boolean clearIfError, int messageLevel) throws ImportException(Code)
This method performs processing of MVN Forum's XML backup file importFile and imports the data into the MVN Forum system. It clears the database and files, does neccessary setup (including startup of message output), and calls ImportMvnForum.processXml(File,Calendar) to do actual processing.

Parameters:
  importFile - MVN Forum XML backup file to be imported.
Parameters:
  request - Current session's HttpServletRequest object.
Parameters:
  response - Current session's HttpServletResponse object.
Parameters:
  logonMemberID - MemberID of user who is logged in, and who initiated import process.
Parameters:
  logonMemberName - MemberName of user who is logged in, and who initiated import process.
Parameters:
  importTime - The moment when import process was started.
Parameters:
  importIP - From this IP address admin requested import.
Parameters:
  clearIfError - Should it clear/reset the database in case of error.
Parameters:
  messageLevel - What messages should be written to output during the process.For details see com.mvnforum.MVNForumConfig.MESSAGE_LEVEL_ALL_MESSAGES,com.mvnforum.MVNForumConfig.MESSAGE_LEVEL_IMPORTANT_MESSAGES andcom.mvnforum.MVNForumConfig.MESSAGE_LEVEL_ONLY_ERRORS.
exception:
  ImportException - If there is an error during the process. See net.myvietnam.mvncore.exception.ImportException.



importZip
public static void importZip(File importFile, HttpServletRequest request, HttpServletResponse response, int logonMemberID, String logonMemberName, Calendar importTime, String importIP, boolean clearIfError, int messageLevel) throws ImportException(Code)
This method performs processing of MVN Forum's ZIP backup file importFile and imports the data into the MVN Forum system. It clears the database and files, does neccessary setup (including startup of message output), extracts the files from ZIP, and calls ImportMvnForum.processXml(File,Calendar) to do actual processing of the main XML file (found in ZIP).

Parameters:
  importFile - MVN Forum ZIP backup file to be imported.
Parameters:
  request - Current session's HttpServletRequest object.
Parameters:
  response - Current session's HttpServletResponse object.
Parameters:
  logonMemberID - MemberID of user who is logged in, and who initiated import process.
Parameters:
  logonMemberName - MemberName of user who is logged in, and who initiated import process.
Parameters:
  importTime - The moment when import process was started.
Parameters:
  importIP - From this IP address admin requested import.
Parameters:
  clearIfError - If true, the database will be cleared/resetin case of error rises during the import. Default Guestand Admin users will be created.
Parameters:
  messageLevel - What amount of messages (informational, important, error)will be written to output.
exception:
  ImportException - If there is an error during the process. See net.myvietnam.mvncore.exception.ImportException.



processXml
protected static void processXml(File inputFile, Calendar importTime) throws IOException, SAXException, ImportException(Code)
This method performs actual processing of MVN Forum's XML file inputFile and imports the data into the MVN Forum system.
Don't use this method directly. Instead, you should use ImportMvnForum.importXml(File,HttpServletRequest,HttpServletResponse,int,String,Calendar,String,boolean,int) .
Parameters:
  inputFile - MVN Forum XML file to be imported.
Parameters:
  importTime - The moment when import process was started.
exception:
  IOException - If there is an I/O error while processing XML file.
exception:
  SAXException - If there is an error while parsing XML file.
exception:
  ImportException - If there is some other error during the import.



Methods inherited from com.mvnforum.admin.ImportWebHelper
protected static void addErrorMessage(String message)(Code)(Java Doc)
protected static void addFinalErrorHandling(HttpServletRequest request, boolean clearIfError)(Code)(Java Doc)
protected static void addImportantMessage(String message)(Code)(Java Doc)
protected static void addMessage(String message)(Code)(Java Doc)
protected static void addSuccessMessage(HttpServletRequest request)(Code)(Java Doc)
protected static void clearDatabase() throws DatabaseException(Code)(Java Doc)
protected static void clearFiles(ServletContext context) throws IOException(Code)(Java Doc)
public static void createDefaultAdminMember() throws ObjectNotFoundException, CreateException, DatabaseException, DuplicateKeyException, ForeignKeyNotFoundException(Code)(Java Doc)
public static void createDefaultAdminMember(String adminName) throws ObjectNotFoundException, CreateException, DatabaseException, DuplicateKeyException, ForeignKeyNotFoundException(Code)(Java Doc)
public static void createDefaultContents() throws DuplicateKeyException, ObjectNotFoundException, CreateException, DatabaseException, ForeignKeyNotFoundException(Code)(Java Doc)
public static void createDefaultGuestMember() throws DuplicateKeyException, ObjectNotFoundException, CreateException, DatabaseException, ForeignKeyNotFoundException(Code)(Java Doc)
public static void createDefaultGuestMember(String guestName) throws DuplicateKeyException, ObjectNotFoundException, CreateException, DatabaseException, ForeignKeyNotFoundException(Code)(Java Doc)
public static void createDefaultRanks() throws CreateException, DuplicateKeyException, ObjectNotFoundException, DatabaseException, ForeignKeyNotFoundException(Code)(Java Doc)
public static void createDefaultRegisteredMembersGroup() throws CreateException, DuplicateKeyException, ObjectNotFoundException, DatabaseException, ForeignKeyNotFoundException(Code)(Java Doc)
public static void createDefaultRegisteredMembersGroup(String groupOwnerName) throws CreateException, DuplicateKeyException, ObjectNotFoundException, DatabaseException, ForeignKeyNotFoundException(Code)(Java Doc)
protected static void endHtml()(Code)(Java Doc)
protected static int execUpdateQuery(String query) throws DatabaseException(Code)(Java Doc)
protected static void setMessageOutputLevel(int messageLevel)(Code)(Java Doc)
protected static void setOutputHtmlWriter(PrintWriter outWriter)(Code)(Java Doc)
protected static void startHtml(HttpServletRequest request)(Code)(Java Doc)

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.