public static Function < String , String > createStringTemplateSource ( I_CmsFormatterBean formatter , Supplier < CmsXmlContent > contentSupplier ) { return key -> { String result = null ; if ( formatter != null ) { result = formatter . getAttributes ( ) . get ( key ) ; } if ( result == null ) { CmsXmlContent content = contentSupplier . get ( ) ; if ( content != null ) { result = content . getHandler ( ) . getParameter ( key ) ; } } return result ; } ; }
Helper method to create a string template source for a given formatter and content .