@Test public void testShouldCacheStyle() { ReportElement reportElement = new Element(); reportElement.setAttribute( "http: reportElement.setAttribute( "http: assertTrue( fastHtmlPrinter.shouldCacheStyle( reportElement ) ); reportElement.setAttributeExpression( "http: assertTrue( fastHtmlPrinter.shouldCacheStyle( reportElement ) ); reportElement.setAttributeExpression( "http: assertFalse( fastHtmlPrinter.shouldCacheStyle( reportElement ) ); }
@VisibleForTesting protected boolean shouldCacheStyle( final ReportElement content ) { if ( content != null ) { for ( String attributeNS : content.getAttributeExpressionNamespaces() ) { for ( String attributeName : content.getAttributeExpressionNames( attributeNS ) ) { if ( content.getAttribute( attributeNS, attributeName ) != null ) { return false; } } } } return true; }
FastHtmlPrinter extends AbstractHtmlPrinter implements ContentUrlReWriteService { @VisibleForTesting protected boolean shouldCacheStyle( final ReportElement content ) { if ( content != null ) { for ( String attributeNS : content.getAttributeExpressionNamespaces() ) { for ( String attributeName : content.getAttributeExpressionNames( attributeNS ) ) { if ( content.getAttribute( attributeNS, attributeName ) != null ) { return false; } } } } return true; } }
FastHtmlPrinter extends AbstractHtmlPrinter implements ContentUrlReWriteService { @VisibleForTesting protected boolean shouldCacheStyle( final ReportElement content ) { if ( content != null ) { for ( String attributeNS : content.getAttributeExpressionNamespaces() ) { for ( String attributeName : content.getAttributeExpressionNames( attributeNS ) ) { if ( content.getAttribute( attributeNS, attributeName ) != null ) { return false; } } } } return true; } FastHtmlPrinter( final SheetLayout sharedSheetLayout, final ResourceManager resourceManager,
      final FastHtmlContentItems contentItems ); }
FastHtmlPrinter extends AbstractHtmlPrinter implements ContentUrlReWriteService { @VisibleForTesting protected boolean shouldCacheStyle( final ReportElement content ) { if ( content != null ) { for ( String attributeNS : content.getAttributeExpressionNamespaces() ) { for ( String attributeName : content.getAttributeExpressionNames( attributeNS ) ) { if ( content.getAttribute( attributeNS, attributeName ) != null ) { return false; } } } } return true; } FastHtmlPrinter( final SheetLayout sharedSheetLayout, final ResourceManager resourceManager,
      final FastHtmlContentItems contentItems ); String rewriteContentDataItem( final ContentItem item ); void close(); void init( final OutputProcessorMetaData metaData, final ReportDefinition report ); void print( final ExpressionRuntime runtime, final FastGridLayout gridLayout,
      final HashMap<InstanceID, ReportElement> elements, final HashMap<InstanceID, FastHtmlImageBounds> recordedBounds,
      final FastHtmlStyleCache styleCache ); void startSection( final Band band ); void endSection( final Band band, final FastGridLayout gridLayout ); }
FastHtmlPrinter extends AbstractHtmlPrinter implements ContentUrlReWriteService { @VisibleForTesting protected boolean shouldCacheStyle( final ReportElement content ) { if ( content != null ) { for ( String attributeNS : content.getAttributeExpressionNamespaces() ) { for ( String attributeName : content.getAttributeExpressionNames( attributeNS ) ) { if ( content.getAttribute( attributeNS, attributeName ) != null ) { return false; } } } } return true; } FastHtmlPrinter( final SheetLayout sharedSheetLayout, final ResourceManager resourceManager,
      final FastHtmlContentItems contentItems ); String rewriteContentDataItem( final ContentItem item ); void close(); void init( final OutputProcessorMetaData metaData, final ReportDefinition report ); void print( final ExpressionRuntime runtime, final FastGridLayout gridLayout,
      final HashMap<InstanceID, ReportElement> elements, final HashMap<InstanceID, FastHtmlImageBounds> recordedBounds,
      final FastHtmlStyleCache styleCache ); void startSection( final Band band ); void endSection( final Band band, final FastGridLayout gridLayout );  }