1 31 32 package org.opencms.xml.content; 33 34 import org.opencms.file.CmsObject; 35 import org.opencms.main.CmsLog; 36 import org.opencms.xml.types.I_CmsXmlContentValue; 37 38 import org.apache.commons.logging.Log; 39 40 52 class CmsXmlContentValidationVisitor implements I_CmsXmlContentValueVisitor { 53 54 55 private static final Log LOG = CmsLog.getLog(CmsXmlContentValidationVisitor.class); 56 57 58 CmsObject m_cms; 59 60 61 CmsXmlContentErrorHandler m_errorHandler; 62 63 68 public CmsXmlContentValidationVisitor(CmsObject cms) { 69 70 m_errorHandler = new CmsXmlContentErrorHandler(); 72 m_cms = cms; 74 } 75 76 81 public CmsXmlContentErrorHandler getErrorHandler() { 82 83 return m_errorHandler; 84 } 85 86 89 public void visit(I_CmsXmlContentValue value) { 90 91 if (LOG.isDebugEnabled()) { 92 LOG.debug(Messages.get().getBundle().key(Messages.LOG_XMLCONTENT_VISIT_1, value.getPath())); 93 } 94 95 m_errorHandler = value.getContentDefinition().getContentHandler().resolveValidation( 96 m_cms, 97 value, 98 m_errorHandler); 99 } 100 } | Popular Tags |