1 15 package org.apache.tapestry.services.impl; 16 17 import org.apache.hivemind.ApplicationRuntimeException; 18 import org.apache.hivemind.Location; 19 import org.apache.hivemind.internal.Module; 20 import org.apache.hivemind.service.ObjectProvider; 21 import org.apache.tapestry.engine.IPropertySource; 22 23 31 public class PropertyObjectProvider implements ObjectProvider 32 { 33 private IPropertySource _source; 34 35 39 public Object provideObject( 40 Module contributingModule, 41 Class propertyType, 42 String locator, 43 Location location) 44 { 45 try 46 { 47 return _source.getPropertyValue(locator); 48 } 49 catch (Exception ex) 50 { 51 throw new ApplicationRuntimeException(ex.getMessage(), location, ex); 52 } 53 } 54 55 public void setSource(IPropertySource source) 56 { 57 _source = source; 58 } 59 60 } 61 | Popular Tags |