Package com.opengamma.component

Examples of com.opengamma.component.ComponentRepository


   * Creates the JaxRs application from the repository.
   *
   * @return the application, not null
   */
  protected Application createApplication() {
    ComponentRepository repo = ComponentRepository.getFromServletContext(getServletContext());
    final Set<Object> singletons = repo.getRestComponents().buildJaxRsSingletons();
    final Set<Class<?>> classes = repo.getRestComponents().buildJaxRsClasses();
    Application app = new Application() {
      @Override
      public Set<Class<?>> getClasses() {
        return classes;
      }
View Full Code Here


   * Creates the JaxRs application from the repository.
   *
   * @return the application, not null
   */
  protected Application createApplication() {
    ComponentRepository repo = ComponentRepository.getFromServletContext(getServletContext());
    final Set<Object> singletons = repo.getRestComponents().buildJaxRsSingletons();
    final Set<Class<?>> classes = repo.getRestComponents().buildJaxRsClasses();
    Application app = new Application() {
      @Override
      public Set<Class<?>> getClasses() {
        return classes;
      }
View Full Code Here

public class ComponentRepositoryBeanPostProcessor implements BeanFactoryPostProcessor {

  //-------------------------------------------------------------------------
  @Override
  public void postProcessBeanFactory(ConfigurableListableBeanFactory beanFactory) throws BeansException {
    ComponentRepository repo = ComponentRepository.getThreadLocal();
    SpringComponentUtils.publishComponentRepository(repo, beanFactory);
  }
View Full Code Here

  }
 
  protected static <T extends DbToolContext> T initDbToolContext(String configResource, Class<T> dbToolContextClass) {
    ComponentManager manager = new ComponentManager("dbtoolcontext");
    manager.start(configResource);
    ComponentRepository repo = manager.getRepository();
    T dbToolContext = repo.getInstance(dbToolContextClass, "tool");
    if (dbToolContext == null) {
      throw new OpenGammaRuntimeException("Unable to find tool context in config resource");
    }
    return dbToolContext;
  }
View Full Code Here

      return createToolContextByHttp(configResourceLocation, toolContextClazz, classifierChain);
     
    } else // use local file
      ComponentManager manager = new ComponentManager("toolcontext");
      manager.start(configResourceLocation);
      ComponentRepository repo = manager.getRepository();
      return repo.getInstance(ToolContext.class, "tool");
    }
  }
View Full Code Here

TOP

Related Classes of com.opengamma.component.ComponentRepository

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.