Java Doc for ImportIssues.java in  » Issue-Tracking » scarab-0.21 » org » tigris » scarab » util » xmlissues » 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 » Issue Tracking » scarab 0.21 » org.tigris.scarab.util.xmlissues 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.tigris.scarab.util.xmlissues.ImportIssues

ImportIssues
public class ImportIssues implements ErrorHandler(Code)
This is a bean'ish object which allows one to set values for importing issues, and then run the actual import. Amenable to the ant task wrapper or you can pass an explicit file for explicit import if turbine is already up and running.

The way the ant task wrapper works is simple: call all the appropriate set methods to define the properties. Then you will need to call the init() and execute methods to start running things. Note: If Turbine is already initialized, there is no need to call the init() method.

Instances of this class are not thread-safe.


author:
   Jon S. Stevens
author:
   Daniel Rall
version:
   $Id: ImportIssues.java 10065 2006-04-23 21:02:14Z hair $
since:
   Scarab beta 14

Inner Class :class TransformResolver implements URIResolver
Inner Class :class ScarabIssuesSetupRule extends Rule
Inner Class :final public static class ImportType

Field Summary
final public static  StringSYSTEM_DTD_URI
    

Constructor Summary
public  ImportIssues()
    
public  ImportIssues(boolean allowFileAttachments)
    

Method Summary
protected  BeanReadercreateScarabIssuesBeanReader()
     Return a bean reader for ScarabIssue.
protected  XMLIntrospectorcreateXMLIntrospector()
    
public  voiderror(SAXParseException e)
     Receive notification of a recoverable error.
public  voidexecute()
     Hook method called by Ant's Task wrapper.
public  voidfatalError(SAXParseException e)
     Receive notification of a non-recoverable error.
public  FilegetConfigDir()
    
public  StringgetConfigFile()
    
public  ScarabIssuesgetScarabIssuesBeanReader()
     Get instance of the ScarabIssues used importing. You'd use this method to get at the instance of scarab issues used importing for case where you want to print out info on the import thats just happened.
public  booleangetSendEmail()
    
public  StringgetTurbineResources()
    
public  FilegetXmlFile()
    
public  voidinit()
    
protected  ScarabIssuesinsert(String name, Reader is, BeanReader reader)
     Do actual issue insert. Assumes issues passed have already been validated.
public  CollectionrunImport(File importFile)
     Run an import. Assumes we're up and running inside of turbine.
Parameters:
  importFile - File to import.
public  CollectionrunImport(File importFile, Module currentModule)
     Run an import. Assumes we're up and running inside of turbine.
Parameters:
  importFile - File to import.
Parameters:
  currentModule - If non-null, run check that import is going against this module.
public  CollectionrunImport(FileItem importFile)
     Run an import. Assumes we're up and running inside of turbine.
public  CollectionrunImport(FileItem importFile, Module currentModule, ImportType type)
     Run an import. Assumes we're up and running inside of turbine.
protected  CollectionrunImport(String filePath, Object input, Module currentModule, ImportType type)
    
public  voidsetConfigDir(File configDir)
    
public  voidsetConfigFile(String configProps)
    
public  voidsetSendEmail(boolean state)
    
public  voidsetTurbineResources(String trProps)
    
public  voidsetXmlFile(File xmlFile)
    
protected  voidvalidate(String name, Reader is, BeanReader reader, Module currentModule)
     Run validation phase.
public  voidwarning(SAXParseException e)
     Receive notification of a warning.
protected  voidwrite(Object bean, Writer out)
     Method to output the bean object as XML.

Field Detail
SYSTEM_DTD_URI
final public static String SYSTEM_DTD_URI(Code)




Constructor Detail
ImportIssues
public ImportIssues()(Code)



ImportIssues
public ImportIssues(boolean allowFileAttachments)(Code)




Method Detail
createScarabIssuesBeanReader
protected BeanReader createScarabIssuesBeanReader() throws ParserConfigurationException, IntrospectionException, SAXNotRecognizedException, SAXNotSupportedException(Code)
Return a bean reader for ScarabIssue. A bean reader.



createXMLIntrospector
protected XMLIntrospector createXMLIntrospector()(Code)



error
public void error(SAXParseException e) throws SAXParseException(Code)
Receive notification of a recoverable error.



execute
public void execute() throws ScarabException(Code)
Hook method called by Ant's Task wrapper.



fatalError
public void fatalError(SAXParseException e) throws SAXParseException(Code)
Receive notification of a non-recoverable error.



getConfigDir
public File getConfigDir()(Code)



getConfigFile
public String getConfigFile()(Code)



getScarabIssuesBeanReader
public ScarabIssues getScarabIssuesBeanReader()(Code)
Get instance of the ScarabIssues used importing. You'd use this method to get at the instance of scarab issues used importing for case where you want to print out info on the import thats just happened. Call after a successful import. Calling before will give undefined results. Instance of ScarabIssues we ran the import with.



getSendEmail
public boolean getSendEmail()(Code)



getTurbineResources
public String getTurbineResources()(Code)



getXmlFile
public File getXmlFile()(Code)



init
public void init() throws ScarabException, MalformedURLException, IOException(Code)



insert
protected ScarabIssues insert(String name, Reader is, BeanReader reader) throws ParserConfigurationException, SAXException, IOException, ScarabException(Code)
Do actual issue insert. Assumes issues passed have already been validated. If they haven't been, could damage scarab.
Parameters:
  name - Name to use in log messages (E.g. filename). May be null.
Parameters:
  is - Input stream of xml to insert.
Parameters:
  reader - ScarabIssues bean reader instance. The instance of scarabissues we inserted in case you need to display info about the issues inserted.



runImport
public Collection runImport(File importFile) throws ScarabException(Code)
Run an import. Assumes we're up and running inside of turbine.
Parameters:
  importFile - File to import. List of errors if any.
exception:
  Exception -



runImport
public Collection runImport(File importFile, Module currentModule) throws ScarabException(Code)
Run an import. Assumes we're up and running inside of turbine.
Parameters:
  importFile - File to import.
Parameters:
  currentModule - If non-null, run check that import is going against this module. List of errors if any.
exception:
  Exception -



runImport
public Collection runImport(FileItem importFile) throws ScarabException(Code)
Run an import. Assumes we're up and running inside of turbine. Awkwardly duplicates ImportIssues.runImport(File) import but duplication is so we can do the reget of the input stream; FileInput "manages" backing up the Upload for us on the second get of the input stream (It creates new ByteArrayInputStream w/ the src being a byte array of the file its kept in memory or in temporary storage on disk).
Parameters:
  importFile - FileItem reference to use importing. List of errors if any.
exception:
  Exception -



runImport
public Collection runImport(FileItem importFile, Module currentModule, ImportType type) throws ScarabException(Code)
Run an import. Assumes we're up and running inside of turbine. Awkwardly duplicates ImportIssues.runImport(File) import but duplication is so we can do the reget of the input stream; FileInput "manages" backing up the Upload for us on the second get of the input stream (It creates new ByteArrayInputStream w/ the src being a byte array of the file its kept in memory or in temporary storage on disk).
Parameters:
  importFile - FileItem reference to use importing.
Parameters:
  currentModule - If non-null, run check that import is going against this module. List of errors if any.
exception:
  Exception -



runImport
protected Collection runImport(String filePath, Object input, Module currentModule, ImportType type) throws ScarabException(Code)

Parameters:
  input - A File or FileItem.



setConfigDir
public void setConfigDir(File configDir)(Code)



setConfigFile
public void setConfigFile(String configProps)(Code)



setSendEmail
public void setSendEmail(boolean state)(Code)



setTurbineResources
public void setTurbineResources(String trProps)(Code)



setXmlFile
public void setXmlFile(File xmlFile)(Code)



validate
protected void validate(String name, Reader is, BeanReader reader, Module currentModule) throws ParserConfigurationException, SAXException, IOException(Code)
Run validation phase. Starts by performing XML-well formed-ness and DTD validation (if present), then checks the content.
Parameters:
  name - Filename to output in log message. May be null.
Parameters:
  is - Input stream to read.
Parameters:
  reader - ScarabIssues bean reader instance.
Parameters:
  currentModule - If not null, check whetherimport is going against this module. Any errors encountered during XML or contentvalidation.
exception:
  Exception -



warning
public void warning(SAXParseException e)(Code)
Receive notification of a warning.



write
protected void write(Object bean, Writer out) throws IOException, SAXException, IntrospectionException(Code)
Method to output the bean object as XML. Not used right now.



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.