001 package net.sf.tacos.binding; 002 003 import org.apache.hivemind.Location; 004 import org.apache.tapestry.IBinding; 005 import org.apache.tapestry.IComponent; 006 import org.apache.tapestry.binding.AbstractBindingFactory; 007 import org.apache.tapestry.services.AbsoluteURLBuilder; 008 009 /** 010 * Implementation of {@link org.apache.tapestry.binding.BindingFactory} that constructs 011 * {@link net.sf.tacos.binding.AbsoluteAssetBinding} instances. 012 * 013 * @author Andreas Andreou 014 * @since 4.1 015 */ 016 public class AbsoluteAssetBindingFactory extends AbstractBindingFactory { 017 018 private AbsoluteURLBuilder absoluteURLBuilder; 019 020 public AbsoluteURLBuilder getAbsoluteURLBuilder() { 021 return absoluteURLBuilder; 022 } 023 024 public void setAbsoluteURLBuilder(AbsoluteURLBuilder absoluteURLBuilder) { 025 this.absoluteURLBuilder = absoluteURLBuilder; 026 } 027 028 public IBinding createBinding(IComponent root, String description, 029 String expression, Location location) { 030 return new AbsoluteAssetBinding(description, getValueConverter(), absoluteURLBuilder, 031 location, root, expression); 032 } 033 034 }