1 15 package org.apache.tapestry.workbench.chart; 16 17 import java.io.InputStream ; 18 import java.util.Locale ; 19 20 import org.apache.tapestry.IComponent; 21 import org.apache.tapestry.IEngine; 22 import org.apache.tapestry.IRequestCycle; 23 import org.apache.tapestry.asset.AbstractAsset; 24 import org.apache.tapestry.engine.IEngineService; 25 import org.apache.tapestry.engine.ILink; 26 27 33 34 public class ChartAsset extends AbstractAsset 35 { 36 private IEngineService _chartService; 37 38 private IComponent _chartProvider; 39 40 public ChartAsset(IRequestCycle cycle, IComponent chartProvider) 41 { 42 super(null, null); 43 44 IEngine engine = cycle.getEngine(); 45 46 _chartService = engine.getService(ChartService.SERVICE_NAME); 47 _chartProvider = chartProvider; 48 } 49 50 public String buildURL(IRequestCycle cycle) 51 { 52 ILink l = _chartService.getLink(cycle, _chartProvider); 53 54 return l.getURL(); 55 } 56 57 public InputStream getResourceAsStream(IRequestCycle cycle) 58 { 59 return null; 60 } 61 62 public InputStream getResourceAsStream(IRequestCycle cycle, Locale locale) 63 { 64 return null; 65 } 66 67 } | Popular Tags |