Class TitleComponentTagHandler
- java.lang.Object
-
- com.day.cq.wcm.designimporter.parser.taghandlers.AbstractTagHandler
-
- com.day.cq.wcm.designimporter.parser.taghandlers.TitleComponentTagHandler
-
- All Implemented Interfaces:
HTMLContentProvider
,PageComponentProvider
,TagHandler
public class TitleComponentTagHandler extends AbstractTagHandler
The title component tag handler is used to translate the title component div(or an equivalent markup) into a CQ title component.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.
- See Also:
TitleComponentTagHandlerFactory
-
-
Field Summary
-
Fields inherited from class com.day.cq.wcm.designimporter.parser.taghandlers.AbstractTagHandler
NAME_HINT_PROPERTY_KEY
-
-
Constructor Summary
Constructors Constructor Description TitleComponentTagHandler()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
beginHandling(java.lang.String uri, java.lang.String localName, java.lang.String qName, org.xml.sax.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(java.lang.String uri, java.lang.String localName, java.lang.String qName)
Callback to signal the encounter of a tag end.void
endHandling(java.lang.String uri, java.lang.String localName, java.lang.String qName)
Callback to signal the end of handling giving the tag handler a chance for finalizing things.java.lang.Object
getContent(HTMLContentType htmlContentType)
Gets the content of the typeHTMLContentType
void
setResourceType(java.lang.String resourceType)
void
startElement(java.lang.String uri, java.lang.String localName, java.lang.String qName, org.xml.sax.Attributes atts)
Callback to signal the encounter of a tag start.boolean
supportsContent(HTMLContentType htmlContentType)
Indicates whether the passedHTMLContentType
is supported or not-
Methods inherited from class com.day.cq.wcm.designimporter.parser.taghandlers.AbstractTagHandler
getPageComponents, setDesignImporterContext, setPageBuilder, setTagHandlerProvider
-
-
-
-
Method Detail
-
beginHandling
public void beginHandling(java.lang.String uri, java.lang.String localName, java.lang.String qName, org.xml.sax.Attributes atts) throws DesignImportException
Description copied from interface:TagHandler
Callback to signal the start of handling giving the tag handler a chance for running intialization routines.TagHandler
s are registered against tag+attribute combination and are invoked by theHTMLContentHandler
as and when it encounters a tag matching the tag attribute combination the tag handler is registered with.- Specified by:
beginHandling
in interfaceTagHandler
- Overrides:
beginHandling
in classAbstractTagHandler
- Throws:
DesignImportException
-
startElement
public void startElement(java.lang.String uri, java.lang.String localName, java.lang.String qName, org.xml.sax.Attributes atts) throws DesignImportException
Description copied from interface:TagHandler
Callback to signal the encounter of a tag start.Once 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.
- Specified by:
startElement
in interfaceTagHandler
- Overrides:
startElement
in classAbstractTagHandler
- Throws:
DesignImportException
-
characters
public void characters(char[] ch, int start, int length) throws DesignImportException
Description copied from interface:TagHandler
Callback to signal the encounter of character content within tags.- Specified by:
characters
in interfaceTagHandler
- Overrides:
characters
in classAbstractTagHandler
- Throws:
DesignImportException
-
endElement
public void endElement(java.lang.String uri, java.lang.String localName, java.lang.String qName) throws DesignImportException
Description copied from interface:TagHandler
Callback to signal the encounter of a tag end.- Specified by:
endElement
in interfaceTagHandler
- Overrides:
endElement
in classAbstractTagHandler
- Throws:
DesignImportException
-
endHandling
public void endHandling(java.lang.String uri, java.lang.String localName, java.lang.String qName) throws DesignImportException
Description copied from interface:TagHandler
Callback to signal the end of handling giving the tag handler a chance for finalizing things.This 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.
- Specified by:
endHandling
in interfaceTagHandler
- Overrides:
endHandling
in classAbstractTagHandler
- Throws:
DesignImportException
-
supportsContent
public boolean supportsContent(HTMLContentType htmlContentType)
Description copied from interface:HTMLContentProvider
Indicates whether the passedHTMLContentType
is supported or not- Specified by:
supportsContent
in interfaceHTMLContentProvider
- Overrides:
supportsContent
in classAbstractTagHandler
- Returns:
-
getContent
public java.lang.Object getContent(HTMLContentType htmlContentType)
Description copied from interface:HTMLContentProvider
Gets the content of the typeHTMLContentType
- Specified by:
getContent
in interfaceHTMLContentProvider
- Overrides:
getContent
in classAbstractTagHandler
- Returns:
-
setResourceType
public void setResourceType(java.lang.String resourceType)
-
-