public class TitleComponentTagHandler extends AbstractTagHandler
This tag handler is registered against the markup of type < div|h1-6 data-cq-component="title" > (Read as a div, h1, h2,.., h6 tag with the attribute data-cq-component equal to "title"). That implies this tag handler will come into action whenever the design importer framework encounters an HTML tag matching the rule this handler is defined against.
TitleComponentTagHandlerFactoryNAME_HINT_PROPERTY_KEY| Constructor and Description |
|---|
TitleComponentTagHandler() |
| Modifier and Type | Method and Description |
|---|---|
void |
beginHandling(String uri,
String localName,
String qName,
Attributes atts)
Callback to signal the start of handling giving the tag handler a chance for running intialization routines.
|
void |
characters(char[] ch,
int start,
int length)
Callback to signal the encounter of character content within tags.
|
void |
endElement(String uri,
String localName,
String qName)
Callback to signal the encounter of a tag end.
|
void |
endHandling(String uri,
String localName,
String qName)
Callback to signal the end of handling giving the tag handler a chance for finalizing things.
|
Object |
getContent(HTMLContentType htmlContentType)
Gets the content of the type
HTMLContentType |
void |
setResourceType(String resourceType) |
void |
startElement(String uri,
String localName,
String qName,
Attributes atts)
Callback to signal the encounter of a tag start.
|
boolean |
supportsContent(HTMLContentType htmlContentType)
Indicates whether the passed
HTMLContentType is supported or not |
getPageComponents, setDesignImporterContext, setPageBuilder, setTagHandlerProviderpublic void beginHandling(String uri, String localName, String qName, Attributes atts) throws DesignImportException
TagHandler
TagHandlers are registered against tag+attribute combination and are invoked by the HTMLContentHandler as and when it
encounters a tag matching the tag attribute combination the tag handler is registered with.
beginHandling in interface TagHandlerbeginHandling in class AbstractTagHandlerDesignImportExceptionpublic void startElement(String uri, String localName, String qName, Attributes atts) throws DesignImportException
TagHandlerOnce a tag handler begins handling, it receives the start tag events for all the nested tags within the purview of the tag this tag handler is registered against.
startElement in interface TagHandlerstartElement in class AbstractTagHandlerDesignImportExceptionpublic void characters(char[] ch,
int start,
int length)
throws DesignImportException
TagHandlercharacters in interface TagHandlercharacters in class AbstractTagHandlerDesignImportExceptionpublic void endElement(String uri, String localName, String qName) throws DesignImportException
TagHandlerendElement in interface TagHandlerendElement in class AbstractTagHandlerDesignImportExceptionpublic void endHandling(String uri, String localName, String qName) throws DesignImportException
TagHandlerThis is arguably the last callback a tag handler receives. After this, the current tag handler is popped out from the chain and the subsequent Tika events are directed to preceding tag handlers.
endHandling in interface TagHandlerendHandling in class AbstractTagHandlerDesignImportExceptionpublic boolean supportsContent(HTMLContentType htmlContentType)
HTMLContentProviderHTMLContentType is supported or notsupportsContent in interface HTMLContentProvidersupportsContent in class AbstractTagHandlerpublic Object getContent(HTMLContentType htmlContentType)
HTMLContentProviderHTMLContentTypegetContent in interface HTMLContentProvidergetContent in class AbstractTagHandlerpublic void setResourceType(String resourceType)
Copyright © 2010 - 2020 Adobe. All Rights Reserved