Class ParsysComponentTagHandler
- java.lang.Object
-
- com.day.cq.wcm.designimporter.parser.taghandlers.AbstractTagHandler
-
- com.day.cq.wcm.designimporter.parser.taghandlers.ParsysComponentTagHandler
-
- All Implemented Interfaces:
ContainerComponentProvider,HTMLContentProvider,PageComponentProvider,TagHandler
public class ParsysComponentTagHandler extends AbstractTagHandler implements ContainerComponentProvider
The parsys component tag handler is used to translate a parsys component div into the parsys component. Since parsys is a container component, its div is only allowed to contain nested component divs.This tag handler is registered against the markup of type < div data-cq-component="parsys" >. 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:
ParsysComponentTagHandlerFactory
-
-
Field Summary
-
Fields inherited from class com.day.cq.wcm.designimporter.parser.taghandlers.AbstractTagHandler
NAME_HINT_PROPERTY_KEY
-
-
Constructor Summary
Constructors Constructor Description ParsysComponentTagHandler()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcharacters(char[] ch, int start, int length)Callback to signal the encounter of character content within tags.voidendHandling(String uri, String localName, String qName)Callback to signal the end of handling giving the tag handler a chance for finalizing things.ObjectgetContent(HTMLContentType htmlContentType)Gets the content of the typeHTMLContentTypevoidsetResourceType(String resourceType)voidstartElement(String uri, String localName, String qName, Attributes atts)Callback to signal the encounter of a tag start.booleansupportsContent(HTMLContentType htmlContentType)Indicates whether the passedHTMLContentTypeis supported or not-
Methods inherited from class com.day.cq.wcm.designimporter.parser.taghandlers.AbstractTagHandler
beginHandling, endElement, getPageComponents, setDesignImporterContext, setPageBuilder, setTagHandlerProvider
-
-
-
-
Method Detail
-
startElement
public void startElement(String uri, String localName, String qName, Attributes atts) throws DesignImportException, UnsupportedTagContentException
Description copied from interface:TagHandlerCallback 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:
startElementin interfaceTagHandler- Overrides:
startElementin classAbstractTagHandler- Throws:
DesignImportExceptionUnsupportedTagContentException
-
characters
public void characters(char[] ch, int start, int length) throws DesignImportExceptionDescription copied from interface:TagHandlerCallback to signal the encounter of character content within tags.- Specified by:
charactersin interfaceTagHandler- Overrides:
charactersin classAbstractTagHandler- Throws:
DesignImportException
-
endHandling
public void endHandling(String uri, String localName, String qName) throws DesignImportException
Description copied from interface:TagHandlerCallback 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:
endHandlingin interfaceTagHandler- Overrides:
endHandlingin classAbstractTagHandler- Throws:
DesignImportException
-
supportsContent
public boolean supportsContent(HTMLContentType htmlContentType)
Description copied from interface:HTMLContentProviderIndicates whether the passedHTMLContentTypeis supported or not- Specified by:
supportsContentin interfaceHTMLContentProvider- Overrides:
supportsContentin classAbstractTagHandler- Returns:
-
getContent
public Object getContent(HTMLContentType htmlContentType)
Description copied from interface:HTMLContentProviderGets the content of the typeHTMLContentType- Specified by:
getContentin interfaceHTMLContentProvider- Overrides:
getContentin classAbstractTagHandler- Returns:
-
setResourceType
public void setResourceType(String resourceType)
-
-