public BuilderFactoryLogic(ServiceImplementationFactoryParameters factoryParameters, BuilderParameter parameter) { _factoryParameters = factoryParameters; _parameter = parameter; _log = _factoryParameters.getLog(); _serviceId = factoryParameters.getServiceId(); _contributingModule = factoryParameters.getInvokingModule(); }
public Object getFacetValue(ServiceImplementationFactoryParameters factoryParameters, Class targetType) { return factoryParameters.getErrorLog(); }
public Object createCoreServiceImplementation( ServiceImplementationFactoryParameters params ) { return new AutowireWorker( params.getInvokingModule(), params.getLog() ); } }
public Object createCoreServiceImplementation(ServiceImplementationFactoryParameters parameters) { // The invoking module here is the tapestry module return new InjectedValueProviderImpl(parameters.getInvokingModule(), _objectTranslator); }
public Object createCoreServiceImplementation( ServiceImplementationFactoryParameters factorParameters) { ExtensionLookupParameter p = (ExtensionLookupParameter) factorParameters.getParameters() .get(0); String extensionName = p.getExtensionName(); Class serviceInterface = factorParameters.getServiceInterface(); try { if (_specification.checkExtension(extensionName)) return _specification.getExtension(extensionName, serviceInterface); if (p.getDefault() != null) return p.getDefault(); return _defaultBuilder.buildDefaultImplementation(serviceInterface); } catch (Exception ex) { throw new ApplicationRuntimeException(ex.getMessage(), p.getLocation(), ex); } }
public Object getFacetValue(ServiceImplementationFactoryParameters factoryParameters, Class targetType) { return factoryParameters.getLog(); }
public Object getFacetValue(ServiceImplementationFactoryParameters parameters, Class targetType) { return parameters.getServiceId(); }
public Object createCoreServiceImplementation( ServiceImplementationFactoryParameters factoryParameters) { BuilderParameter parameter = (BuilderParameter) factoryParameters.getFirstParameter(); BuilderFactoryLogic logic = new BuilderFactoryLogic(factoryParameters, parameter); return logic.createService(); } }
public Object createCoreServiceImplementation(ServiceImplementationFactoryParameters parameters) { // The invoking module here is the tapestry module return new InjectedValueProviderImpl(parameters.getInvokingModule(), _objectTranslator); }
public Object createCoreServiceImplementation( ServiceImplementationFactoryParameters params ) { return new AutowireWorker( params.getInvokingModule(), params.getLog() ); } }
public Object createCoreServiceImplementation( ServiceImplementationFactoryParameters factorParameters) { ExtensionLookupParameter p = (ExtensionLookupParameter) factorParameters.getParameters() .get(0); String extensionName = p.getExtensionName(); Class serviceInterface = factorParameters.getServiceInterface(); try { if (_specification.checkExtension(extensionName)) return _specification.getExtension(extensionName, serviceInterface); if (p.getDefault() != null) return p.getDefault(); return _defaultBuilder.buildDefaultImplementation(serviceInterface); } catch (Exception ex) { throw new ApplicationRuntimeException(ex.getMessage(), p.getLocation(), ex); } }
Log log = factoryParameters.getLog();
public Object getFacetValue(ServiceImplementationFactoryParameters factoryParameters, Class targetType) { return factoryParameters.getInvokingModule().getErrorHandler(); }
private void error(String message, Location location, Throwable cause) { _factoryParameters.getErrorLog().error(message, location, cause); }
public Object getFacetValue(ServiceImplementationFactoryParameters factoryParameters, Class targetType) { return factoryParameters.getInvokingModule().getMessages(); }
private void registerForEvents(Object result) { List eventRegistrations = _parameter.getEventRegistrations(); if (eventRegistrations.isEmpty()) return; EventLinker linker = new EventLinkerImpl(_factoryParameters.getErrorLog()); Iterator i = eventRegistrations.iterator(); while (i.hasNext()) { EventRegistration er = (EventRegistration) i.next(); // Will log any errors to the errorHandler linker.addEventListener(er.getProducer(), er.getEventSetName(), result, er .getLocation()); } }
public Object getFacetValue(ServiceImplementationFactoryParameters factoryParameters, Class targetType) { return factoryParameters.getInvokingModule().getClassResolver(); }
public Object createCoreServiceImplementation(ServiceImplementationFactoryParameters parameters) { return new SymbolSourcesPropertySource(parameters.getInvokingModule()); }
public Object createCoreServiceImplementation(ServiceImplementationFactoryParameters parameters) { return new SymbolSourcesPropertySource(parameters.getInvokingModule()); }
public Object getFacetValue(ServiceImplementationFactoryParameters factoryParameters, Class targetType) { Object result = _valuesCache.get(targetType); if (result == null) { Translator translator = factoryParameters.getInvokingModule().getTranslator( _translatorName); result = translator.translate( factoryParameters.getInvokingModule(), targetType, _literalValue, getLocation()); _valuesCache.put(targetType, result); } return result; }