@Test public void testDoneParsing() throws SAXException { Object prop = handler.getObject(); assertThat( prop, is( nullValue() ) ); XMLAttributesImpl attrs = new XMLAttributesImpl(); attrs.addAttribute( new QName( null, "name", null, URI ), ATTR_TYPE, PROP_NAME ); attrs.addAttribute( new QName( null, "value", null, URI ), ATTR_TYPE, PROP_VALUE ); AttributesProxy fAttributesProxy = new AttributesProxy( attrs ); XmlReadHandler childHandler = handler.getHandlerForChild( URI, "property", null ); SessionPropertyReadHandler readHandler = (SessionPropertyReadHandler) childHandler; readHandler.init( rootXmlReadHandler, URI, TAG_NAME ); readHandler.startParsing( fAttributesProxy ); handler.doneParsing(); prop = handler.getObject(); assertThat( prop, is( instanceOf( Properties.class ) ) ); assertThat( ( (Properties) prop ).getProperty( PROP_NAME ), is( equalTo( PROP_VALUE ) ) ); }
protected void doneParsing() throws SAXException { sessionProperties = new Properties(); for ( int i = 0; i < sessionPropertyHandlers.size(); i++ ) { final SessionPropertyReadHandler readHandler = (SessionPropertyReadHandler) sessionPropertyHandlers.get( i ); sessionProperties.setProperty( readHandler.getName(), readHandler.getValue() ); } }
SessionPropertiesReadHandler extends AbstractXmlReadHandler { protected void doneParsing() throws SAXException { sessionProperties = new Properties(); for ( int i = 0; i < sessionPropertyHandlers.size(); i++ ) { final SessionPropertyReadHandler readHandler = (SessionPropertyReadHandler) sessionPropertyHandlers.get( i ); sessionProperties.setProperty( readHandler.getName(), readHandler.getValue() ); } } }
SessionPropertiesReadHandler extends AbstractXmlReadHandler { protected void doneParsing() throws SAXException { sessionProperties = new Properties(); for ( int i = 0; i < sessionPropertyHandlers.size(); i++ ) { final SessionPropertyReadHandler readHandler = (SessionPropertyReadHandler) sessionPropertyHandlers.get( i ); sessionProperties.setProperty( readHandler.getName(), readHandler.getValue() ); } } SessionPropertiesReadHandler(); }
SessionPropertiesReadHandler extends AbstractXmlReadHandler { protected void doneParsing() throws SAXException { sessionProperties = new Properties(); for ( int i = 0; i < sessionPropertyHandlers.size(); i++ ) { final SessionPropertyReadHandler readHandler = (SessionPropertyReadHandler) sessionPropertyHandlers.get( i ); sessionProperties.setProperty( readHandler.getName(), readHandler.getValue() ); } } SessionPropertiesReadHandler(); Object getObject(); }
SessionPropertiesReadHandler extends AbstractXmlReadHandler { protected void doneParsing() throws SAXException { sessionProperties = new Properties(); for ( int i = 0; i < sessionPropertyHandlers.size(); i++ ) { final SessionPropertyReadHandler readHandler = (SessionPropertyReadHandler) sessionPropertyHandlers.get( i ); sessionProperties.setProperty( readHandler.getName(), readHandler.getValue() ); } } SessionPropertiesReadHandler(); Object getObject();  }