private List < String > parseNoticiesAttr ( String noticesAttr , String outcome ) { List < String > notifiers = new ArrayList < String > ( ) ; int columnCount = 4 ; int colon = noticesAttr . indexOf ( ";" ) ; if ( colon != - 1 ) { columnCount = StringHelper . delimiterColumnCount ( noticesAttr . substring ( 0 , colon ) , "," , "\\," ) + 1 ; } int notifierClassColIndex = columnCount > 3 ? 3 : 2 ; List < String [ ] > rows = StringHelper . parseTable ( noticesAttr , ' ' , ' ' , columnCount ) ; for ( String [ ] row : rows ) { if ( ! StringHelper . isEmpty ( row [ 1 ] ) && row [ 0 ] . equals ( outcome ) ) { StringTokenizer st = new StringTokenizer ( row [ notifierClassColIndex ] , "," ) ; boolean hasCustomClass = false ; String templateVerSpec = columnCount > 3 ? ":" + row [ 2 ] : "" ; while ( st . hasMoreTokens ( ) ) { String className = st . nextToken ( ) ; className = getNotifierClassName ( className ) ; notifiers . add ( className + ":" + row [ 1 ] + templateVerSpec ) ; hasCustomClass = true ; } if ( ! hasCustomClass ) { notifiers . add ( NOTIFIER_PACKAGE + ".TaskEmailNotifier:" + ":" + row [ 1 ] + templateVerSpec ) ; } } } return notifiers ; }
To parse notices attribute