* @return Notifier
*/
private Notifier parseNotifier( String tagName, XmlPullParser parser, boolean strict )
throws IOException, XmlPullParserException
{
Notifier notifier = new Notifier();
java.util.Set parsed = new java.util.HashSet();
while ( parser.nextTag() == XmlPullParser.START_TAG )
{
if ( checkFieldWithDuplicate( parser, "type", null, parsed ) )
{
notifier.setType( getTrimmedValue( parser.nextText() ) );
}
else if ( checkFieldWithDuplicate( parser, "sendOnError", null, parsed ) )
{
notifier.setSendOnError( getBooleanValue( getTrimmedValue( parser.nextText() ), "sendOnError", parser, "true" ) );
}
else if ( checkFieldWithDuplicate( parser, "sendOnFailure", null, parsed ) )
{
notifier.setSendOnFailure( getBooleanValue( getTrimmedValue( parser.nextText() ), "sendOnFailure", parser, "true" ) );
}
else if ( checkFieldWithDuplicate( parser, "sendOnSuccess", null, parsed ) )
{
notifier.setSendOnSuccess( getBooleanValue( getTrimmedValue( parser.nextText() ), "sendOnSuccess", parser, "true" ) );
}
else if ( checkFieldWithDuplicate( parser, "sendOnWarning", null, parsed ) )
{
notifier.setSendOnWarning( getBooleanValue( getTrimmedValue( parser.nextText() ), "sendOnWarning", parser, "true" ) );
}
else if ( checkFieldWithDuplicate( parser, "address", null, parsed ) )
{
notifier.setAddress( getTrimmedValue( parser.nextText() ) );
}
else if ( checkFieldWithDuplicate( parser, "configuration", null, parsed ) )
{
while ( parser.nextTag() == XmlPullParser.START_TAG )
{
String key = parser.getName();
String value = parser.nextText().trim();
notifier.addConfiguration( key, value );
}
}
else
{
if ( strict )