001 /** 002 * www.jcoverage.com 003 * Copyright (C)2003 jcoverage ltd. 004 * 005 * This file is part of jcoverage. 006 * 007 * jcoverage is free software; you can redistribute it and/or modify 008 * it under the terms of the GNU General Public License as published 009 * by the Free Software Foundation; either version 2 of the License, 010 * or (at your option) any later version. 011 * 012 * jcoverage is distributed in the hope that it will be useful, but 013 * WITHOUT ANY WARRANTY; without even the implied warranty of 014 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 015 * General Public License for more details. 016 * 017 * You should have received a copy of the GNU General Public License 018 * along with jcoverage; if not, write to the Free Software 019 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 020 * USA 021 * 022 */ 023 package com.jcoverage.reporting; 024 025 /** 026 * An object that collects pages and sends them to format object for 027 * formatting. Since a collator knows about all the pages, it can 028 * provide formats with information based on the overall report 029 * structure, such as file organization. Formats get access to a 030 * collator through a {@link FormattingContext}. 031 */ 032 public interface Collator { 033 034 /** 035 * This method is called evertime a page is closed and ready to be 036 * rendered. 037 */ 038 void pageClosed(Page page) throws ReportingException; 039 040 String getPathToPage(FormattingContext ctx,Page page); 041 042 String getPathToPage(FormattingContext ctx,Page page,Page from); 043 044 String getPathToResource(FormattingContext ctx,String resource,Page from); 045 046 /** 047 * Cause the pages to be output using the given format and serializer. 048 */ 049 void addOutputter(Format format,Serializer serializer); 050 051 }