Class DesignImporterHTMLParser
- java.lang.Object
-
- com.day.cq.wcm.designimporter.parser.DesignImporterHTMLParser
-
public class DesignImporterHTMLParser extends java.lang.Object
Parses the HTML document stream in the design package and extracts the components, styles, scripts etc.
-
-
Constructor Summary
Constructors Constructor Description DesignImporterHTMLParser()
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description HTMLContent
getBodyHtmlContent()
Deprecated.UseParseResult.getBodyHtmlContent()
insteadjava.util.List<PageComponent>
getComponents()
Deprecated.UseParseResult.getComponents()
insteadHTMLContent
getHeadHtmlContent()
Deprecated.UseParseResult.getHeadHtmlContent()
insteadjava.lang.String
getLanguage()
Deprecated.UseParseResult.getLanguage()
insteadvoid
parse(Page page, java.io.InputStream stream, PageBuilder pageBuilder)
Deprecated.ParseResult
parse(java.io.InputStream stream, PageBuilder pageBuilder)
void
setCanvasResourceType(java.lang.String canvasResourceType)
Sets the unique name of the canvas component that would be generated by this page extractorvoid
setDesignImporterContext(DesignImporterContext designImporterContext)
Sets the import contextvoid
setTagHandlerProvider(TagHandlerProvider tagHandlerProvider)
Sets theTagHandlerProvider
-
-
-
Method Detail
-
getBodyHtmlContent
@Deprecated public HTMLContent getBodyHtmlContent()
Deprecated.UseParseResult.getBodyHtmlContent()
insteadGets theHTMLContent
associated with the body of the input HTML document.- Returns:
- The
HTMLContent
-
getComponents
@Deprecated public java.util.List<PageComponent> getComponents()
Deprecated.UseParseResult.getComponents()
insteadGets the list ofPageComponent
objects tranlated from the marked component divs during the import process- Returns:
- The
List
ofPageComponent
objects
-
getHeadHtmlContent
@Deprecated public HTMLContent getHeadHtmlContent()
Deprecated.UseParseResult.getHeadHtmlContent()
insteadGets theHTMLContent
associated with the head of the input HTML document.- Returns:
- The
HTMLContent
-
getLanguage
@Deprecated public java.lang.String getLanguage()
Deprecated.UseParseResult.getLanguage()
insteadGets the language specified in the input HTML document.- Returns:
- The locale represented by the lang attribute in HTML
-
parse
@Deprecated public void parse(Page page, java.io.InputStream stream, PageBuilder pageBuilder) throws DesignImportException
Deprecated.Extracts components from the HTML stream.- Parameters:
page
- The page for which the components are being extractedstream
- The input HTML document streampageBuilder
- ThePageBuilder
object for building thePageComponent
s- Throws:
RepositoryException
UnsupportedTagContentException
- if unsupported content is found within a tagMissingCanvasException
java.io.IOException
org.xml.sax.SAXException
TikaException
DesignImportException
-
parse
public ParseResult parse(java.io.InputStream stream, PageBuilder pageBuilder) throws DesignImportException
- Throws:
DesignImportException
-
setCanvasResourceType
public void setCanvasResourceType(java.lang.String canvasResourceType)
Sets the unique name of the canvas component that would be generated by this page extractor- Parameters:
canvasResourceType
- The resourceType of the canvas component
-
setDesignImporterContext
public void setDesignImporterContext(DesignImporterContext designImporterContext)
Sets the import context- Parameters:
designImporterContext
- TheDesignImporterContext
object representing the current import context
-
setTagHandlerProvider
public void setTagHandlerProvider(TagHandlerProvider tagHandlerProvider)
Sets theTagHandlerProvider
- Parameters:
tagHandlerProvider
- TheTagHandlerProvider
object
-
-