Class ContentConsistencyEngine.ContentExistsHandler
- java.lang.Object
-
- org.xml.sax.helpers.DefaultHandler
-
- org.ametys.cms.content.consistency.ContentConsistencyEngine.ContentExistsHandler
-
- All Implemented Interfaces:
ContentHandler
,DTDHandler
,EntityResolver
,ErrorHandler
- Enclosing class:
- ContentConsistencyEngine
protected class ContentConsistencyEngine.ContentExistsHandler extends DefaultHandler
Handler which tests if exists a "/contents/content" tag.
-
-
Field Summary
Fields Modifier and Type Field Description protected boolean
_hasContent
Has content tag?protected boolean
_hasFailures
True if the report has content with failures.protected boolean
_inContentsTag
In content tag?
-
Constructor Summary
Constructors Constructor Description ContentExistsHandler()
Create a handler.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
endElement(String uri, String localName, String qName)
boolean
hasContent()
Has content.boolean
hasFailures()
Has failures.void
startDocument()
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
-
-
-
-
Field Detail
-
_inContentsTag
protected boolean _inContentsTag
In content tag?
-
_hasContent
protected boolean _hasContent
Has content tag?
-
_hasFailures
protected boolean _hasFailures
True if the report has content with failures.
-
-
Constructor Detail
-
ContentExistsHandler
public ContentExistsHandler()
Create a handler.
-
-
Method Detail
-
startDocument
public void startDocument() throws SAXException
- 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
public void endElement(String uri, String localName, String qName) throws SAXException
- Specified by:
endElement
in interfaceContentHandler
- Overrides:
endElement
in classDefaultHandler
- Throws:
SAXException
-
hasContent
public boolean hasContent()
Has content.- Returns:
- true if the XML file has a content, false otherwise.
-
hasFailures
public boolean hasFailures()
Has failures.- Returns:
- true if the XML file has at least a content with failures, false otherwise.
-
-