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()insteadvoidparse(Page page, InputStream stream, PageBuilder pageBuilder) Deprecated.parse(InputStream stream, PageBuilder pageBuilder) voidsetCanvasResourceType(String canvasResourceType) Sets the unique name of the canvas component that would be generated by this page extractorvoidsetDesignImporterContext(DesignImporterContext designImporterContext) Sets the import contextvoidsetTagHandlerProvider(TagHandlerProvider tagHandlerProvider) Sets theTagHandlerProvider
-
Constructor Details
-
DesignImporterHTMLParser
public DesignImporterHTMLParser()
-
-
Method Details
-
getBodyHtmlContent
Deprecated.UseParseResult.getBodyHtmlContent()insteadGets theHTMLContentassociated with the body of the input HTML document.- Returns:
- The
HTMLContent
-
getComponents
Deprecated.UseParseResult.getComponents()insteadGets the list ofPageComponentobjects tranlated from the marked component divs during the import process- Returns:
- The
ListofPageComponentobjects
-
getHeadHtmlContent
Deprecated.UseParseResult.getHeadHtmlContent()insteadGets theHTMLContentassociated 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- ThePageBuilderobject for building thePageComponents- Throws:
RepositoryExceptionUnsupportedTagContentException- if unsupported content is found within a tagMissingCanvasExceptionIOExceptionSAXExceptionTikaExceptionDesignImportException
-
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- TheDesignImporterContextobject representing the current import context
-
setTagHandlerProvider
Sets theTagHandlerProvider- Parameters:
tagHandlerProvider- TheTagHandlerProviderobject
-
ParseResult.getBodyHtmlContent()instead