com.jcoverage.coverage.reporting.collation
Class StaticFileCollator

java.lang.Object
  extended bycom.jcoverage.reporting.AbstractCollator
      extended bycom.jcoverage.coverage.reporting.collation.StaticFileCollator
All Implemented Interfaces:
Collator, MultiViewCollator

public class StaticFileCollator
extends AbstractCollator
implements MultiViewCollator

This class provides an implementation of a collator which constructs filename paths suitable for a statically generated set of files.

As it deals with static files, views must be of type StaticView, since the view's filename modifier is used to construct a unique filename.


Field Summary
(package private) static org.apache.log4j.Logger logger
           
(package private)  java.lang.String suffix
           
 
Fields inherited from class com.jcoverage.reporting.AbstractCollator
 
Constructor Summary
StaticFileCollator(java.lang.String suffix)
           
 
Method Summary
(package private)  java.lang.String getFilenameModifier(View view, Page page)
           
 java.lang.String getPathToPage(FormattingContext ctx, Page page)
           
 java.lang.String getPathToPage(FormattingContext ctx, Page page, Page from)
           
 java.lang.String getPathToPage(ViewFormattingContext ctx, Page page, Page from, View toView)
          Use this method to get a path for a page which will implicitly change the view.
(package private)  java.lang.String getPathToPageView(View view, Page page)
           
 java.lang.String getPathToResource(FormattingContext ctx, java.lang.String resource, Page from)
           
(package private)  java.lang.String getUniquePathFromComponents(View view, Page page, java.lang.String name, java.lang.String suffix)
           
 
Methods inherited from class com.jcoverage.reporting.AbstractCollator
addOutputter, getRelativePath, pageClosed
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.jcoverage.reporting.Collator
addOutputter, pageClosed
 

Field Detail

logger

static org.apache.log4j.Logger logger

suffix

java.lang.String suffix
Constructor Detail

StaticFileCollator

public StaticFileCollator(java.lang.String suffix)
Method Detail

getFilenameModifier

java.lang.String getFilenameModifier(View view,
                                     Page page)

getUniquePathFromComponents

java.lang.String getUniquePathFromComponents(View view,
                                             Page page,
                                             java.lang.String name,
                                             java.lang.String suffix)

getPathToPageView

java.lang.String getPathToPageView(View view,
                                   Page page)

getPathToPage

public java.lang.String getPathToPage(FormattingContext ctx,
                                      Page page)
Specified by:
getPathToPage in interface Collator
Specified by:
getPathToPage in class AbstractCollator

getPathToPage

public java.lang.String getPathToPage(FormattingContext ctx,
                                      Page page,
                                      Page from)
Specified by:
getPathToPage in interface Collator

getPathToResource

public java.lang.String getPathToResource(FormattingContext ctx,
                                          java.lang.String resource,
                                          Page from)
Specified by:
getPathToResource in interface Collator
Overrides:
getPathToResource in class AbstractCollator

getPathToPage

public java.lang.String getPathToPage(ViewFormattingContext ctx,
                                      Page page,
                                      Page from,
                                      View toView)
Description copied from interface: MultiViewCollator
Use this method to get a path for a page which will implicitly change the view.

Specified by:
getPathToPage in interface MultiViewCollator
Parameters:
ctx - the formatting context.
page - the page that is being referenced.
from - the current page, which will contain the reference.
toView - the new view to set.
Returns:
the path of the page that is being referenced.