Java Doc for CmsHtmlImport.java in  » Content-Management-System » opencms » org » opencms » workplace » tools » database » 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 » Content Management System » opencms » org.opencms.workplace.tools.database 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.opencms.workplace.tools.database.CmsHtmlImport

CmsHtmlImport
public class CmsHtmlImport (Code)
This class implements the HTML->OpenCms Template converter for OpenCms 6.x.

The HTML files can lay in a directory or in a zip file. The entries in the zip file are saved temporary in the tmp-directory of the system. Every file is stored into the correct location in the OpenCms VFS.


author:
   Michael Emmerich
author:
   Armen Markarian
author:
   Peter Bonrad
author:
   Anja Röttgers
version:
   $Revision: 1.20 $
since:
   6.0.0



Field Summary
final public static  StringMETA_PROPERTIES
     filename of the meta.properties file.

Constructor Summary
public  CmsHtmlImport()
    
public  CmsHtmlImport(CmsObject cms)
    

Method Summary
public static  FilecreateTempFolder(String name)
    
public  StringgetAbsoluteUri(String relativeUri, String baseUri)
     Calculates an absolute uri from a relative "uri" and the given absolute "baseUri".

If "uri" is already absolute, it is returned unchanged.

public  StringgetDestinationDir()
    
public  StringgetDownloadGallery()
    
public  StringgetElement()
    
public  StringgetEndPattern()
    
public  StringgetHttpDir()
    
public  StringgetImageGallery()
    
public  StringgetInputDir()
    
public  StringgetInputEncoding()
    
public  StringgetLinkGallery()
    
public  StringgetLocale()
    
public  StringgetStartPattern()
    
public  StringgetTemplate()
    
public  booleanisKeepBrokenLinks()
    
public  booleanisOverwrite()
    
public  voidsetCmsObject(CmsObject cmsObject)
    
public  voidsetDestinationDir(String destinationDir)
    
public  voidsetDownloadGallery(String downloadGallery)
    
public  voidsetElement(String element)
    
public  voidsetEndPattern(String endPattern)
    
public  voidsetHttpDir(String httpDir)
    
public  voidsetImageGallery(String imageGallery)
    
public  voidsetInputDir(String inputDir)
    
public  voidsetInputEncoding(String inputEncoding)
    
public  voidsetKeepBrokenLinks(boolean keepBrokenLinks)
    
public  voidsetLinkGallery(String linkGallery)
    
public  voidsetLocale(String locale)
    
public  voidsetOverwrite(boolean overwrite)
    
public  voidsetStartPattern(String startPattern)
    
public  voidsetTemplate(String template)
    
public  voidstartImport(I_CmsReport report)
     Imports all resources from the real file system, stores them into the correct locations in the OpenCms VFS and modifies all links.
public  StringstoreExternalLink(String externalLink)
    
public  voidstoreImageInfo(String image, String altText)
    
public  StringtranslateLink(String link)
    
public  voidvalidate(FileItem fi, boolean isdefault)
     Tests if all given input parameters for the HTML Import are valid, that is that all the given folders do exist.

Field Detail
META_PROPERTIES
final public static String META_PROPERTIES(Code)
filename of the meta.properties file.




Constructor Detail
CmsHtmlImport
public CmsHtmlImport()(Code)
Default Constructor.




CmsHtmlImport
public CmsHtmlImport(CmsObject cms)(Code)
Creates a new import object for the given cms object.


Parameters:
  cms - the current cms context





Method Detail
createTempFolder
public static File createTempFolder(String name) throws Exception(Code)
This function creates a folder in the temporary-directory.


Parameters:
  name - the name of the folder the folder file
throws:
  Exception - if the folder can not create




getAbsoluteUri
public String getAbsoluteUri(String relativeUri, String baseUri)(Code)
Calculates an absolute uri from a relative "uri" and the given absolute "baseUri".

If "uri" is already absolute, it is returned unchanged. This method also returns "uri" unchanged if it is not well-formed.


Parameters:
  relativeUri - the relative uri to calculate an absolute uri for
Parameters:
  baseUri - the base uri, this must be an absolute uri an absolute uri calculated from "uri" and "baseUri"




getDestinationDir
public String getDestinationDir()(Code)
Returns the destinationDir.

the destinationDir




getDownloadGallery
public String getDownloadGallery()(Code)
Returns the downloadGallery.

the downloadGallery




getElement
public String getElement()(Code)
Returns the element.

the element




getEndPattern
public String getEndPattern()(Code)
Returns the endPattern.

the endPattern




getHttpDir
public String getHttpDir()(Code)
Returns the httpDir.

the httpDir




getImageGallery
public String getImageGallery()(Code)
Returns the imageGallery.

the imageGallery




getInputDir
public String getInputDir()(Code)
Returns the inputDir.

the inputDir




getInputEncoding
public String getInputEncoding()(Code)
Returns the inputEncoding.

the inputEncoding




getLinkGallery
public String getLinkGallery()(Code)
Returns the linkGallery.

the linkGallery




getLocale
public String getLocale()(Code)
Returns the local.

the local




getStartPattern
public String getStartPattern()(Code)
Returns the startPattern.

the startPattern




getTemplate
public String getTemplate()(Code)
Returns the template.

the template




isKeepBrokenLinks
public boolean isKeepBrokenLinks()(Code)
Returns the keepBrokenLinks.

the keepBrokenLinks




isOverwrite
public boolean isOverwrite()(Code)
Returns the overwrite.

the overwrite




setCmsObject
public void setCmsObject(CmsObject cmsObject)(Code)
Sets the cmsObject.


Parameters:
  cmsObject - the cmsObject to set




setDestinationDir
public void setDestinationDir(String destinationDir)(Code)
Sets the destinationDir.


Parameters:
  destinationDir - the destinationDir to set




setDownloadGallery
public void setDownloadGallery(String downloadGallery)(Code)
Sets the downloadGallery.


Parameters:
  downloadGallery - the downloadGallery to set




setElement
public void setElement(String element)(Code)
Sets the element.


Parameters:
  element - the element to set




setEndPattern
public void setEndPattern(String endPattern)(Code)
Sets the endPattern.


Parameters:
  endPattern - the endPattern to set




setHttpDir
public void setHttpDir(String httpDir)(Code)
Sets the httpDir.


Parameters:
  httpDir - the httpDir to set




setImageGallery
public void setImageGallery(String imageGallery)(Code)
Sets the imageGallery.


Parameters:
  imageGallery - the imageGallery to set




setInputDir
public void setInputDir(String inputDir)(Code)
Sets the inputDir.


Parameters:
  inputDir - the inputDir to set




setInputEncoding
public void setInputEncoding(String inputEncoding)(Code)
Sets the inputEncoding.


Parameters:
  inputEncoding - the inputEncoding to set




setKeepBrokenLinks
public void setKeepBrokenLinks(boolean keepBrokenLinks)(Code)
Sets the keepBrokenLinks.


Parameters:
  keepBrokenLinks - the keepBrokenLinks to set




setLinkGallery
public void setLinkGallery(String linkGallery)(Code)
Sets the linkGallery.


Parameters:
  linkGallery - the linkGallery to set




setLocale
public void setLocale(String locale)(Code)
Sets the local.


Parameters:
  locale - the local to set




setOverwrite
public void setOverwrite(boolean overwrite)(Code)
Sets the overwrite.


Parameters:
  overwrite - the overwrite to set




setStartPattern
public void setStartPattern(String startPattern)(Code)
Sets the startPattern.


Parameters:
  startPattern - the startPattern to set




setTemplate
public void setTemplate(String template)(Code)
Sets the template.


Parameters:
  template - the template to set




startImport
public void startImport(I_CmsReport report) throws Exception(Code)
Imports all resources from the real file system, stores them into the correct locations in the OpenCms VFS and modifies all links. This method is called form the JSP to start the import process.


Parameters:
  report - StringBuffer for reporting
throws:
  Exception - if something goes wrong




storeExternalLink
public String storeExternalLink(String externalLink)(Code)
Add a new external link to the storage of external links.

All links in this storage are later used to create entries in the external link gallery.


Parameters:
  externalLink - link to an external resource the complete path to the external link file, if one is created.




storeImageInfo
public void storeImageInfo(String image, String altText)(Code)
Add a new image info to the storage of image info's.

The image info's are later used to set the description properties of the images.


Parameters:
  image - the name of the image
Parameters:
  altText - the alt-text of the image




translateLink
public String translateLink(String link)(Code)
Translated a link into the real file system to its new location in the OpenCms VFS.

This is needed by the HtmlConverter to get the correct links for link translation.


Parameters:
  link - link to the real file system string containing absolute link into the OpenCms VFS




validate
public void validate(FileItem fi, boolean isdefault) throws CmsIllegalArgumentException(Code)
Tests if all given input parameters for the HTML Import are valid, that is that all the given folders do exist.


Parameters:
  fi - a file item if a file is uploaded per HTTP otherwise null
Parameters:
  isdefault - if this sets, then the destination and input directory can be empty
throws:
  CmsIllegalArgumentException - if some parameters are not valid




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.