public IEngine getEngineInstance() { Locale locale = _localeManager.extractLocaleForCurrentRequest(); IEngine result = (IEngine) _enginePool.get(locale); // This happens when either the pool is empty, or when a session exists // but the engine has not been stored into it (which should never happen, and // probably indicates an error in the framework or the application). if (result == null) result = _engineFactory.constructNewEngineInstance(locale); return result; }
/** * Delegates to * {@link org.apache.tapestry.services.ResponseRenderer#renderResponse(IRequestCycle)}. */ public void renderResponse(IRequestCycle cycle) throws IOException { _infrastructure.getResponseRenderer().renderResponse(cycle); }
/** * Returns a service with the given name. * * @see Infrastructure#getServiceMap() * @see org.apache.tapestry.services.ServiceMap */ public IEngineService getService(String name) { return _infrastructure.getServiceMap().getService(name); }
protected void initialize(String mode) { _globals.storeFactoryServices(_factoryServices); _infrastructure.initialize(mode); }
public void service(IRequestCycle cycle) throws IOException { String pageName = cycle.getParameter(ServiceConstants.PAGE); if (_enabled) _resetEventHub.fireResetEvent(); cycle.activate(pageName); // Render the same page (that contained the reset link). _responseRenderer.renderResponse(cycle); }
public String squeeze(Object data, DataSqueezer dataSqueezer) { if (data == null) return NULL_STRING; return dataSqueezer.squeeze(data); }
/** @see Infrastructure#getSpecificationSource() */ public ISpecificationSource getSpecificationSource() { return _infrastructure.getSpecificationSource(); }
/** * @see Infrastructure#getClassResolver() */ public ClassResolver getClassResolver() { return _infrastructure.getClassResolver(); }
/** @since 2.3 */ public IPropertySource getPropertySource() { return _infrastructure.getApplicationPropertySource(); }
public Object provideObject(Module contributingModule, Class propertyType, String locator, Location location) { return _serviceMap.getService(locator); } }
/** * {@inheritDoc} */ public boolean isBodyScriptAllowed(IComponent target) { return _builder.isBodyScriptAllowed(target); }
private String getTemplateEncoding(IComponent component, Locale locale) { return _componentPropertySource.getLocalizedComponentProperty( component, locale, TEMPLATE_ENCODING_PROPERTY_NAME); }
/** @since 4.0 */ public void loadTemplateForComponent(IRequestCycle cycle, ITemplateComponent component) { _componentTemplateLoader.loadTemplate(cycle, component); }
private String getNamespaceMessagesEncoding(INamespace namespace, Locale locale) { return _componentPropertySource. getLocalizedNamespaceProperty(namespace, locale, MESSAGES_ENCODING_PROPERTY_NAME); }
public IEngine getEngineInstance() { Locale locale = _localeManager.extractLocaleForCurrentRequest(); IEngine result = (IEngine) _enginePool.get(locale); // This happens when either the pool is empty, or when a session exists // but the engine has not been stored into it (which should never happen, and // probably indicates an error in the framework or the application). if (result == null) result = _engineFactory.constructNewEngineInstance(locale); return result; }
/** * Returns a service with the given name. * * @see Infrastructure#getServiceMap() * @see org.apache.tapestry.services.ServiceMap */ public IEngineService getService(String name) { return _infrastructure.getServiceMap().getService(name); }
/** * Delegates to * {@link org.apache.tapestry.services.ResponseRenderer#renderResponse(IRequestCycle)}. */ public void renderResponse(IRequestCycle cycle) throws IOException { _infrastructure.getResponseRenderer().renderResponse(cycle); }
protected void initialize(String mode) { _globals.storeFactoryServices(_factoryServices); _infrastructure.initialize(mode); }
public IEngineService getService() { return _infrastructure.getServiceMap().getService(_serviceName); }
public IEngineService getService() { return _infrastructure.getServiceMap().getService(_serviceName); }