1 package com.google.code.jetm.reporting; 2 3 import java.io.Reader; 4 import java.io.Writer; 5 import java.util.Collection; 6 7 import etm.core.aggregation.Aggregate; 8 9 /** 10 * Definition of an object used to bind and un-bind aggregate data. 11 * 12 * @author jrh3k5 13 * 14 */ 15 16 public interface AggregateBinder { 17 /** 18 * Bind aggregate data. 19 * 20 * @param aggregates 21 * A {@link Collection} of {@link Aggregate} objects representing 22 * the data to be bound. 23 * @param writer 24 * The {@link Writer} to which the bound data will be written. 25 */ 26 void bind(Collection<? extends Aggregate> aggregates, Writer writer); 27 28 /** 29 * Unbind aggregate data. 30 * 31 * @param reader 32 * A {@link Reader} representing a source of 33 * {@link #bind(Collection, Writer) bound} aggregate data to be 34 * un-bound. 35 * @return A {@link Collection} of {@link Aggregate} objects representing 36 * the data to be unbound. 37 */ 38 Collection<Aggregate> unbind(Reader reader); 39 }