public class ScriptTagHandler extends java.lang.Object implements TagHandler, EntryTagHandler, HTMLContentProvider
This tag handler is registered against the markup of type < script src="myscript.js" >. 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.
Note: This tag handler does not handle inline script tags. InlineScriptTagHandler
ScriptTagHandlerFactory
Constructor and Description |
---|
ScriptTagHandler() |
Modifier and Type | Method and 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 type
HTMLContentType |
java.lang.String |
getScriptPath() |
void |
setDesignImporterContext(DesignImporterContext designImporterContext)
Sets the design importer context
|
void |
setTagHandlerProvider(TagHandlerProvider tagHandlerProvider) |
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 passed
HTMLContentType is supported or not |
public void beginHandling(java.lang.String uri, java.lang.String localName, java.lang.String qName, org.xml.sax.Attributes atts)
TagHandler
TagHandler
s 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 TagHandler
public void characters(char[] ch, int start, int length) throws DesignImportException
TagHandler
characters
in interface TagHandler
DesignImportException
public void endElement(java.lang.String uri, java.lang.String localName, java.lang.String qName) throws DesignImportException
TagHandler
endElement
in interface TagHandler
DesignImportException
public void endHandling(java.lang.String uri, java.lang.String localName, java.lang.String qName)
TagHandler
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.
endHandling
in interface TagHandler
public java.lang.Object getContent(HTMLContentType htmlContentType)
HTMLContentProvider
HTMLContentType
getContent
in interface HTMLContentProvider
public java.lang.String getScriptPath()
public void setDesignImporterContext(DesignImporterContext designImporterContext)
TagHandler
setDesignImporterContext
in interface TagHandler
public void setTagHandlerProvider(TagHandlerProvider tagHandlerProvider)
setTagHandlerProvider
in interface TagHandler
public void startElement(java.lang.String uri, java.lang.String localName, java.lang.String qName, org.xml.sax.Attributes atts) throws DesignImportException
TagHandler
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.
startElement
in interface TagHandler
DesignImportException
public boolean supportsContent(HTMLContentType htmlContentType)
HTMLContentProvider
HTMLContentType
is supported or notsupportsContent
in interface HTMLContentProvider
"Copyright © 2010 - 2020 Adobe Systems Incorporated. All Rights Reserved"