LayoutProcessorOutput applyLayout ( FileResource resource , Locale locale , Map < String , Object > model ) { Optional < Path > layout = findLayout ( resource ) ; return layout . map ( Path :: toString ) // . map ( Files :: getFileExtension ) // . map ( layoutEngines :: get ) // . orElse ( lParam -> new LayoutProcessorOutput ( lParam . model . get ( "content" ) . toString ( ) , "none" , lParam . layoutTemplate , lParam . locale ) ) . apply ( new LayoutParameters ( layout , resource . getPath ( ) , locale , model ) ) ; }
has been found the file will be copied as it is