public Context buildContext(ApplicationGlobals globals) { return shadowBuilder.build(globals, "context", Context.class); }
/** * Builds a shadow of the RequestGlobals.request property. Note again that * the shadow can be an ordinary singleton, * even though RequestGlobals is perthread. */ public Request buildRequest() { return shadowBuilder.build(requestGlobals, "request", Request.class); }
/** * Builds a shadow of the RequestGlobals.HTTPServletRequest property. * Generally, you should inject the {@link Request} service instead, as * future version of Tapestry may operate beyond just the servlet API. */ public HttpServletRequest buildHttpServletRequest() { return shadowBuilder.build(requestGlobals, "HTTPServletRequest", HttpServletRequest.class); }
/** * Builds a shadow of the RequestGlobals.response property. Note again that * the shadow can be an ordinary singleton, * even though RequestGlobals is perthread. */ public Response buildResponse() { return shadowBuilder.build(requestGlobals, "response", Response.class); }
/** * @since 5.1.0.0 */ public HttpServletResponse buildHttpServletResponse() { return shadowBuilder.build(requestGlobals, "HTTPServletResponse", HttpServletResponse.class); }
public static Validator buildBeanValidator(ValidatorFactory validatorFactory, PropertyShadowBuilder propertyShadowBuilder) { return propertyShadowBuilder.build(validatorFactory, "validator", Validator.class); }
public static ValidatorFactory buildValidatorFactory(BeanValidatorSource beanValidatorSource, PropertyShadowBuilder propertyShadowBuilder) { return propertyShadowBuilder.build(beanValidatorSource, "validatorFactory", ValidatorFactory.class); }
public static Validator buildBeanValidator(ValidatorFactory validatorFactory, PropertyShadowBuilder propertyShadowBuilder) { return propertyShadowBuilder.build(validatorFactory, "validator", Validator.class); }
public static ValidatorFactory buildValidatorFactory(BeanValidatorSource beanValidatorSource, PropertyShadowBuilder propertyShadowBuilder) { return propertyShadowBuilder.build(beanValidatorSource, "validatorFactory", ValidatorFactory.class); }
public static Session buildSession(HibernateSessionManager sessionManager, PropertyShadowBuilder propertyShadowBuilder) { // Here's the thing: the tapestry.hibernate.Session class doesn't have to be per-thread, // since // it will invoke getSession() on the HibernateSessionManager service (which is per-thread). // On // first invocation per request, // this forces the HSM into existence (which creates the session and begins the // transaction). // Thus we don't actually create // a session until we first try to access it, then the session continues to exist for the // rest // of the request. return propertyShadowBuilder.build(sessionManager, "session", Session.class); }
public static Session buildSession(HibernateSessionManager sessionManager, PropertyShadowBuilder propertyShadowBuilder) { // Here's the thing: the tapestry.hibernate.Session class doesn't have to be per-thread, // since // it will invoke getSession() on the HibernateSessionManager service (which is per-thread). // On // first invocation per request, // this forces the HSM into existence (which creates the session and begins the // transaction). // Thus we don't actually create // a session until we first try to access it, then the session continues to exist for the // rest // of the request. return propertyShadowBuilder.build(sessionManager, "session", Session.class); }
/** * Returns a {@link PlasticProxyFactory} that can be used to create extra classes around component classes. This * factory will be cleared whenever an underlying component class is discovered to have changed. Use of this * factory implies that your code will become aware of this (if necessary) to discard any cached object (alas, * this currently involves dipping into the internals side to register for the correct notifications). Failure to * properly clean up can result in really nasty PermGen space memory leaks. */ @Marker(ComponentLayer.class) public PlasticProxyFactory buildComponentProxyFactory(ComponentInstantiatorSource source) { return shadowBuilder.build(source, "proxyFactory", PlasticProxyFactory.class); }