@Test( expected = ParseException.class ) public void testParsingWithoutName() throws SAXException { XMLAttributesImpl attrs = new XMLAttributesImpl(); attrs.addAttribute( new QName( null, "name", null, URI ), ATTR_TYPE, null ); attrs.addAttribute( new QName( null, "value", null, URI ), ATTR_TYPE, PROP_VALUE ); AttributesProxy fAttributesProxy = new AttributesProxy( attrs ); handler.startParsing( fAttributesProxy ); }
protected void startParsing( final Attributes attrs ) throws SAXException { name = attrs.getValue( getUri(), "name" ); if ( StringUtils.isEmpty( name ) ) { throw new ParseException( "Required attribute 'name' is missing.", getLocator() ); } value = attrs.getValue( getUri(), "value" ); if ( StringUtils.isEmpty( value ) ) { throw new ParseException( "Required attribute 'value' is missing.", getLocator() ); } }
SessionPropertyReadHandler extends AbstractXmlReadHandler { protected void startParsing( final Attributes attrs ) throws SAXException { name = attrs.getValue( getUri(), "name" ); if ( StringUtils.isEmpty( name ) ) { throw new ParseException( "Required attribute 'name' is missing.", getLocator() ); } value = attrs.getValue( getUri(), "value" ); if ( StringUtils.isEmpty( value ) ) { throw new ParseException( "Required attribute 'value' is missing.", getLocator() ); } } }
SessionPropertyReadHandler extends AbstractXmlReadHandler { protected void startParsing( final Attributes attrs ) throws SAXException { name = attrs.getValue( getUri(), "name" ); if ( StringUtils.isEmpty( name ) ) { throw new ParseException( "Required attribute 'name' is missing.", getLocator() ); } value = attrs.getValue( getUri(), "value" ); if ( StringUtils.isEmpty( value ) ) { throw new ParseException( "Required attribute 'value' is missing.", getLocator() ); } } SessionPropertyReadHandler(); }
SessionPropertyReadHandler extends AbstractXmlReadHandler { protected void startParsing( final Attributes attrs ) throws SAXException { name = attrs.getValue( getUri(), "name" ); if ( StringUtils.isEmpty( name ) ) { throw new ParseException( "Required attribute 'name' is missing.", getLocator() ); } value = attrs.getValue( getUri(), "value" ); if ( StringUtils.isEmpty( value ) ) { throw new ParseException( "Required attribute 'value' is missing.", getLocator() ); } } SessionPropertyReadHandler(); Object getObject(); String getName(); String getValue(); }
SessionPropertyReadHandler extends AbstractXmlReadHandler { protected void startParsing( final Attributes attrs ) throws SAXException { name = attrs.getValue( getUri(), "name" ); if ( StringUtils.isEmpty( name ) ) { throw new ParseException( "Required attribute 'name' is missing.", getLocator() ); } value = attrs.getValue( getUri(), "value" ); if ( StringUtils.isEmpty( value ) ) { throw new ParseException( "Required attribute 'value' is missing.", getLocator() ); } } SessionPropertyReadHandler(); Object getObject(); String getName(); String getValue();  }