private Priority parsePriority ( final String warningTypeString ) { if ( StringUtils . equalsIgnoreCase ( warningTypeString , "notice" ) ) { return Priority . LOW ; } else if ( StringUtils . equalsIgnoreCase ( warningTypeString , "warning" ) ) { return Priority . NORMAL ; } else if ( StringUtils . equalsIgnoreCase ( warningTypeString , "error" ) ) { return Priority . HIGH ; } else { // empty label or other unexpected input return Priority . HIGH ; } }
Returns the priority ordinal matching the specified warning type string .