public static String getInputValueName ( @ Nullable final String inputPrefix , @ Nonnull final BiMap < String , String > inputMapper , @ Nonnull final String field ) { String name = inputMapper == null ? null : inputMapper . inverse ( ) . get ( field ) ; if ( name == null ) { if ( inputMapper != null && inputMapper . containsKey ( field ) ) { throw new RuntimeException ( "field in keys" ) ; } final String [ ] defaultValues = { Values . TASK_DIRECTORY_KEY , Values . CLIENT_HTTP_REQUEST_FACTORY_KEY , Values . TEMPLATE_KEY , Values . PDF_CONFIG_KEY , Values . SUBREPORT_DIR_KEY , Values . OUTPUT_FORMAT_KEY , Values . JOB_ID_KEY } ; if ( inputPrefix == null || Arrays . asList ( defaultValues ) . contains ( field ) ) { name = field ; } else { name = inputPrefix . trim ( ) + Character . toUpperCase ( field . charAt ( 0 ) ) + field . substring ( 1 ) ; } } return name ; }
Calculate the name of the input value .