public void transform ( DataPipe cr ) { for ( Map . Entry < String , String > entry : cr . getDataMap ( ) . entrySet ( ) ) { String value = entry . getValue ( ) ; if ( value . equals ( "#{customplaceholder}" ) ) { // Generate a random number int ran = rand . nextInt ( ) ; entry . setValue ( String . valueOf ( ran ) ) ; } } }
The transform method for this DataTransformer