private String applyPostProcessors ( final CacheKey cacheKey , final String content ) throws IOException { final Collection < ResourcePostProcessor > processors = processorsFactory . getPostProcessors ( ) ; LOG . debug ( "appying post processors: {}" , processors ) ; if ( processors . isEmpty ( ) ) { return content ; } final Resource resource = Resource . create ( cacheKey . getGroupName ( ) , cacheKey . getType ( ) ) ; Reader reader = new StringReader ( content . toString ( ) ) ; Writer writer = null ; for ( final ResourcePostProcessor processor : processors ) { final ResourcePreProcessor decoratedProcessor = decorateProcessor ( processor , cacheKey . isMinimize ( ) ) ; writer = new StringWriter ( ) ; decoratedProcessor . process ( resource , reader , writer ) ; reader = new StringReader ( writer . toString ( ) ) ; } return writer . toString ( ) ; }
Apply resourcePostProcessors .