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_hasContentHas content tag?protected boolean_hasFailuresTrue if the report has content with failures.protected boolean_inContentsTagIn content tag?
-
Constructor Summary
Constructors Constructor Description ContentExistsHandler()Create a handler.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidendElement(String uri, String localName, String qName)booleanhasContent()Has content.booleanhasFailures()Has failures.voidstartDocument()voidstartElement(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:
startDocumentin interfaceContentHandler- Overrides:
startDocumentin classDefaultHandler- Throws:
SAXException
-
startElement
public void startElement(String uri, String localName, String qName, Attributes attributes) throws SAXException
- Specified by:
startElementin interfaceContentHandler- Overrides:
startElementin classDefaultHandler- Throws:
SAXException
-
endElement
public void endElement(String uri, String localName, String qName) throws SAXException
- Specified by:
endElementin interfaceContentHandler- Overrides:
endElementin 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.
-
-