Class DesignImporterHTMLParser
java.lang.Object
com.day.cq.wcm.designimporter.parser.DesignImporterHTMLParser
Parses the HTML document stream in the design package and extracts the components, styles, scripts etc.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionDeprecated.Deprecated.UseParseResult.getComponents()
insteadDeprecated.UseParseResult.getHeadHtmlContent()
insteadDeprecated.UseParseResult.getLanguage()
insteadvoid
parse
(Page page, InputStream stream, PageBuilder pageBuilder) Deprecated.parse
(InputStream stream, PageBuilder pageBuilder) void
setCanvasResourceType
(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
-
Constructor Details
-
DesignImporterHTMLParser
public DesignImporterHTMLParser()
-
-
Method Details
-
getBodyHtmlContent
Deprecated.UseParseResult.getBodyHtmlContent()
insteadGets theHTMLContent
associated with the body of the input HTML document.- Returns:
- The
HTMLContent
-
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.UseParseResult.getHeadHtmlContent()
insteadGets theHTMLContent
associated with the head of the input HTML document.- Returns:
- The
HTMLContent
-
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, 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
IOException
SAXException
TikaException
DesignImportException
-
parse
- Throws:
DesignImportException
-
setCanvasResourceType
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
Sets the import context- Parameters:
designImporterContext
- TheDesignImporterContext
object representing the current import context
-
setTagHandlerProvider
Sets theTagHandlerProvider
- Parameters:
tagHandlerProvider
- TheTagHandlerProvider
object
-
ParseResult.getBodyHtmlContent()
instead