@Test public void testParsingIncorrectParameters() throws SAXException { XmlReadHandler childHandler = handler.getHandlerForChild( BundleNamespaces.DATADEFINITION, "incorrect-tag", null ); assertThat( childHandler, is( nullValue() ) ); childHandler = handler.getHandlerForChild( "incorrectUri", "incorrect-tag", null ); assertThat( childHandler, is( nullValue() ) ); childHandler = handler.getHandlerForChild( URI, "incorrect-tag", null ); assertThat( childHandler, is( nullValue() ) ); }
protected XmlReadHandler getHandlerForChild( final String uri, final String tagName, final Attributes atts ) throws SAXException { if ( BundleNamespaces.DATADEFINITION.equals( uri ) ) { if ( "parameter-definition".equals( tagName ) ) { parameterDefinitionReadHandler = new MasterParameterDefinitionReadHandler(); return parameterDefinitionReadHandler; } if ( "data-source".equals( tagName ) ) { dataSourceElementHandler = new DataSourceElementHandler(); return dataSourceElementHandler; } return null; } if ( isSameNamespace( uri ) == false ) { return null; } if ( "header".equals( tagName ) ) { headersReadHandler = new HeadersReadHandler(); return headersReadHandler; } if ( "session".equals( tagName ) ) { sessionPropertiesReadHandler = new SessionPropertiesReadHandler(); return sessionPropertiesReadHandler; } if ( "burst-query".equals( tagName ) ) { burstQueryReadHandler = new StringReadHandler(); return burstQueryReadHandler; } if ( "recipients-query".equals( tagName ) ) { recipientsQueryReadHandler = new StringReadHandler(); return recipientsQueryReadHandler; } if ( "body-report".equals( tagName ) ) { bodyReportReadHandler = new ReportReadHandler(); return bodyReportReadHandler; } if ( "attachment-report".equals( tagName ) ) { final ReportReadHandler reportReadHandler = new ReportReadHandler(); attachmentReportReadHandlers.add( reportReadHandler ); return reportReadHandler; } return null; }
MailDefinitionReadHandler extends AbstractXmlReadHandler { protected XmlReadHandler getHandlerForChild( final String uri, final String tagName, final Attributes atts ) throws SAXException { if ( BundleNamespaces.DATADEFINITION.equals( uri ) ) { if ( "parameter-definition".equals( tagName ) ) { parameterDefinitionReadHandler = new MasterParameterDefinitionReadHandler(); return parameterDefinitionReadHandler; } if ( "data-source".equals( tagName ) ) { dataSourceElementHandler = new DataSourceElementHandler(); return dataSourceElementHandler; } return null; } if ( isSameNamespace( uri ) == false ) { return null; } if ( "header".equals( tagName ) ) { headersReadHandler = new HeadersReadHandler(); return headersReadHandler; } if ( "session".equals( tagName ) ) { sessionPropertiesReadHandler = new SessionPropertiesReadHandler(); return sessionPropertiesReadHandler; } if ( "burst-query".equals( tagName ) ) { burstQueryReadHandler = new StringReadHandler(); return burstQueryReadHandler; } if ( "recipients-query".equals( tagName ) ) { recipientsQueryReadHandler = new StringReadHandler(); return recipientsQueryReadHandler; } if ( "body-report".equals( tagName ) ) { bodyReportReadHandler = new ReportReadHandler(); return bodyReportReadHandler; } if ( "attachment-report".equals( tagName ) ) { final ReportReadHandler reportReadHandler = new ReportReadHandler(); attachmentReportReadHandlers.add( reportReadHandler ); return reportReadHandler; } return null; } }
MailDefinitionReadHandler extends AbstractXmlReadHandler { protected XmlReadHandler getHandlerForChild( final String uri, final String tagName, final Attributes atts ) throws SAXException { if ( BundleNamespaces.DATADEFINITION.equals( uri ) ) { if ( "parameter-definition".equals( tagName ) ) { parameterDefinitionReadHandler = new MasterParameterDefinitionReadHandler(); return parameterDefinitionReadHandler; } if ( "data-source".equals( tagName ) ) { dataSourceElementHandler = new DataSourceElementHandler(); return dataSourceElementHandler; } return null; } if ( isSameNamespace( uri ) == false ) { return null; } if ( "header".equals( tagName ) ) { headersReadHandler = new HeadersReadHandler(); return headersReadHandler; } if ( "session".equals( tagName ) ) { sessionPropertiesReadHandler = new SessionPropertiesReadHandler(); return sessionPropertiesReadHandler; } if ( "burst-query".equals( tagName ) ) { burstQueryReadHandler = new StringReadHandler(); return burstQueryReadHandler; } if ( "recipients-query".equals( tagName ) ) { recipientsQueryReadHandler = new StringReadHandler(); return recipientsQueryReadHandler; } if ( "body-report".equals( tagName ) ) { bodyReportReadHandler = new ReportReadHandler(); return bodyReportReadHandler; } if ( "attachment-report".equals( tagName ) ) { final ReportReadHandler reportReadHandler = new ReportReadHandler(); attachmentReportReadHandlers.add( reportReadHandler ); return reportReadHandler; } return null; } MailDefinitionReadHandler(); }
MailDefinitionReadHandler extends AbstractXmlReadHandler { protected XmlReadHandler getHandlerForChild( final String uri, final String tagName, final Attributes atts ) throws SAXException { if ( BundleNamespaces.DATADEFINITION.equals( uri ) ) { if ( "parameter-definition".equals( tagName ) ) { parameterDefinitionReadHandler = new MasterParameterDefinitionReadHandler(); return parameterDefinitionReadHandler; } if ( "data-source".equals( tagName ) ) { dataSourceElementHandler = new DataSourceElementHandler(); return dataSourceElementHandler; } return null; } if ( isSameNamespace( uri ) == false ) { return null; } if ( "header".equals( tagName ) ) { headersReadHandler = new HeadersReadHandler(); return headersReadHandler; } if ( "session".equals( tagName ) ) { sessionPropertiesReadHandler = new SessionPropertiesReadHandler(); return sessionPropertiesReadHandler; } if ( "burst-query".equals( tagName ) ) { burstQueryReadHandler = new StringReadHandler(); return burstQueryReadHandler; } if ( "recipients-query".equals( tagName ) ) { recipientsQueryReadHandler = new StringReadHandler(); return recipientsQueryReadHandler; } if ( "body-report".equals( tagName ) ) { bodyReportReadHandler = new ReportReadHandler(); return bodyReportReadHandler; } if ( "attachment-report".equals( tagName ) ) { final ReportReadHandler reportReadHandler = new ReportReadHandler(); attachmentReportReadHandlers.add( reportReadHandler ); return reportReadHandler; } return null; } MailDefinitionReadHandler(); Object getObject(); }
MailDefinitionReadHandler extends AbstractXmlReadHandler { protected XmlReadHandler getHandlerForChild( final String uri, final String tagName, final Attributes atts ) throws SAXException { if ( BundleNamespaces.DATADEFINITION.equals( uri ) ) { if ( "parameter-definition".equals( tagName ) ) { parameterDefinitionReadHandler = new MasterParameterDefinitionReadHandler(); return parameterDefinitionReadHandler; } if ( "data-source".equals( tagName ) ) { dataSourceElementHandler = new DataSourceElementHandler(); return dataSourceElementHandler; } return null; } if ( isSameNamespace( uri ) == false ) { return null; } if ( "header".equals( tagName ) ) { headersReadHandler = new HeadersReadHandler(); return headersReadHandler; } if ( "session".equals( tagName ) ) { sessionPropertiesReadHandler = new SessionPropertiesReadHandler(); return sessionPropertiesReadHandler; } if ( "burst-query".equals( tagName ) ) { burstQueryReadHandler = new StringReadHandler(); return burstQueryReadHandler; } if ( "recipients-query".equals( tagName ) ) { recipientsQueryReadHandler = new StringReadHandler(); return recipientsQueryReadHandler; } if ( "body-report".equals( tagName ) ) { bodyReportReadHandler = new ReportReadHandler(); return bodyReportReadHandler; } if ( "attachment-report".equals( tagName ) ) { final ReportReadHandler reportReadHandler = new ReportReadHandler(); attachmentReportReadHandlers.add( reportReadHandler ); return reportReadHandler; } return null; } MailDefinitionReadHandler(); Object getObject();  }