Package com.cognifide.slice.api.context

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


   */
  public static InjectorWithContext getInjector(String injectorName, ResourceResolver resolver) {
    InjectorWithContext injector = resolver.adaptTo(InjectorsRepository.class).getInjector(injectorName);
    ContextFactory factory = injector.getInstance(ContextFactory.class);
    Context context = factory.getResourceResolverContext(resolver);
    injector.pushContextProvider(new ConstantContextProvider(context));
    return injector;
  }
View Full Code Here


    }
    Context context = contextMap.get(injectorName);
    if (context == null) {
      return null;
    }
    return new ConstantContextProvider(context);
  }
View Full Code Here

    InjectorWithContext injector = repository.getInjector(injectorName);
    ContextProvider contextProvider = requestContextProvider.getContextProvider(injectorName);
    if (contextProvider == null) {
      ContextFactory factory = injector.getInstance(ContextFactory.class);
      Context context = factory.getResourceResolverContext(resource.getResourceResolver());
      contextProvider = new ConstantContextProvider(context);
    }
    injector.pushContextProvider(contextProvider);
    return injector;
  }
View Full Code Here

TOP

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

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.