Class CheckContentConsistencySchedulable.ContentExistsHandler
java.lang.Object
org.xml.sax.helpers.DefaultHandler
org.ametys.cms.content.consistency.CheckContentConsistencySchedulable.ContentExistsHandler
- All Implemented Interfaces:
ContentHandler
,DTDHandler
,EntityResolver
,ErrorHandler
- Enclosing class:
- CheckContentConsistencySchedulable
Handler which tests if exists a "/contents/content" tag.
-
Field Summary
Modifier and TypeFieldDescriptionprotected boolean
Has content tag?protected boolean
True if the report has content with failures.protected boolean
In content tag? -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
endElement
(String uri, String localName, String qName) boolean
Has content.boolean
Has failures.void
void
startElement
(String uri, String localName, String qName, Attributes attributes) Methods inherited from class org.xml.sax.helpers.DefaultHandler
characters, endDocument, endPrefixMapping, error, fatalError, ignorableWhitespace, notationDecl, processingInstruction, resolveEntity, setDocumentLocator, skippedEntity, startPrefixMapping, unparsedEntityDecl, warning
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.xml.sax.ContentHandler
declaration
-
Field Details
-
_inContentsTag
In content tag? -
_hasContent
Has content tag? -
_hasFailures
True if the report has content with failures.
-
-
Constructor Details
-
ContentExistsHandler
public ContentExistsHandler()Create a handler.
-
-
Method Details
-
startDocument
- Specified by:
startDocument
in interfaceContentHandler
- Overrides:
startDocument
in classDefaultHandler
- Throws:
SAXException
-
startElement
public void startElement(String uri, String localName, String qName, Attributes attributes) throws SAXException - Specified by:
startElement
in interfaceContentHandler
- Overrides:
startElement
in classDefaultHandler
- Throws:
SAXException
-
endElement
- Specified by:
endElement
in interfaceContentHandler
- Overrides:
endElement
in classDefaultHandler
- Throws:
SAXException
-
hasContent
Has content.- Returns:
- true if the XML file has a content, false otherwise.
-
hasFailures
Has failures.- Returns:
- true if the XML file has at least a content with failures, false otherwise.
-