Package com.cognifide.slice.api.context

Examples of com.cognifide.slice.api.context.RequestContextProvider


   * @param request Request used to provide context
   * @return Created injector
   */
  public static InjectorWithContext getInjector(String injectorName, SlingHttpServletRequest request) {
    InjectorWithContext injector = request.adaptTo(InjectorsRepository.class).getInjector(injectorName);
    RequestContextProvider requestContextProvider = request.adaptTo(RequestContextProvider.class);
    injector.pushContextProvider(requestContextProvider.getContextProvider(injectorName));
    return injector;
  }
View Full Code Here


  public static <T> T getFromCurrentPath(final PageContext pageContext, final Class<T> type,
      final String appName) {
    final SlingHttpServletRequest request = SliceTagUtils.slingRequestFrom(pageContext);
    final InjectorsRepository injectorsRepository = SliceTagUtils.injectorsRepositoryFrom(pageContext);
    final RequestContextProvider requestContextProvider = SliceTagUtils
        .requestContextProviderFrom(pageContext);

    return getFromCurrentPath(request, injectorsRepository, requestContextProvider, type, appName);
  }
View Full Code Here

   * @return Created injector
   */
  public static InjectorWithContext getInjector(String injectorName, SlingHttpServletRequest request,
      SlingHttpServletResponse response) {
    InjectorWithContext injector = request.adaptTo(InjectorsRepository.class).getInjector(injectorName);
    RequestContextProvider requestContextProvider = request.adaptTo(RequestContextProvider.class);
    injector.pushContextProvider(requestContextProvider.getContextProvider(injectorName));
    return injector;
  }
View Full Code Here

TOP

Related Classes of com.cognifide.slice.api.context.RequestContextProvider

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.