Package com.opengamma.component

Examples of com.opengamma.component.ComponentInfo


  //-------------------------------------------------------------------------
  @Override
  public void init(ComponentRepository repo, LinkedHashMap<String, String> configuration) throws Exception {
    final HistoricalTimeSeriesProvider provider = initHistoricalTimeSeriesProvider(repo);
    final ComponentInfo info = new ComponentInfo(HistoricalTimeSeriesProvider.class, getClassifier());
    info.addAttribute(ComponentInfoAttributes.LEVEL, 1);
    info.addAttribute(ComponentInfoAttributes.REMOTE_CLIENT_JAVA, RemoteHistoricalTimeSeriesProvider.class);
    info.addAttribute(ComponentInfoAttributes.ACCEPTED_TYPES, getAcceptedTypes());
    repo.registerComponent(info, provider);
    if (isPublishRest()) {
      repo.getRestComponents().publish(info, new DataHistoricalTimeSeriesProviderResource(provider));
    }
  }
View Full Code Here


  private Integer _maxRetries;

  //-------------------------------------------------------------------------
  @Override
  public void init(ComponentRepository repo, LinkedHashMap<String, String> configuration) {
    ComponentInfo info = new ComponentInfo(OrganizationMaster.class, getClassifier());

    // create
    DbOrganizationMaster master = new DbOrganizationMaster(getDbConnector());
    if (getUniqueIdScheme() != null) {
      master.setUniqueIdScheme(getUniqueIdScheme());
    }
    if (getMaxRetries() != null) {
      master.setMaxRetries(getMaxRetries());
    }
    if (getJmsChangeManagerTopic() != null) {
      JmsChangeManager cm = new JmsChangeManager(getJmsConnector(), getJmsChangeManagerTopic());
      master.setChangeManager(cm);
      repo.registerLifecycle(cm);
      if (getJmsConnector().getClientBrokerUri() != null) {
        info.addAttribute(ComponentInfoAttributes.JMS_BROKER_URI, getJmsConnector().getClientBrokerUri().toString());
      }
      info.addAttribute(ComponentInfoAttributes.JMS_CHANGE_MANAGER_TOPIC, getJmsChangeManagerTopic());
    }
    checkSchema(master.getSchemaVersion(), "org");

    // register
    info.addAttribute(ComponentInfoAttributes.LEVEL, 1);
    info.addAttribute(ComponentInfoAttributes.REMOTE_CLIENT_JAVA, RemoteOrganizationMaster.class);
    info.addAttribute(ComponentInfoAttributes.UNIQUE_ID_SCHEME, master.getUniqueIdScheme());
    repo.registerComponent(info, master);

    // publish
    if (isPublishRest()) {
      repo.getRestComponents().publish(info, new DataOrganizationMasterResource(master));
View Full Code Here

    builderContext.setFunctionExclusionGroups(getFunctionExclusionGroups());
    builderContext.setMarketDataProviderResolver(getMarketDataProviderResolver());

    DependencyGraphTraceBuilder traceBuilder = new DependencyGraphTraceBuilder(builderContext);
    LocalDependencyGraphTraceProvider provider = new LocalDependencyGraphTraceProvider(traceBuilder);
    ComponentInfo info = new ComponentInfo(DependencyGraphTraceProvider.class, getClassifier());
    info.addAttribute(ComponentInfoAttributes.LEVEL, 1);
    info.addAttribute(ComponentInfoAttributes.REMOTE_CLIENT_JAVA, RemoteDependencyGraphTraceProvider.class);

    repo.registerComponent(info, provider);

    if (isPublishRest()) {
      //final ComponentInfo infoDGB = new ComponentInfo(DependencyGraphTraceProviderResource.class, getClassifier());
View Full Code Here

 
  //-------------------------------------------------------------------------
  @Override
  public void init(ComponentRepository repo, LinkedHashMap<String, String> configuration) throws Exception {
    UserPrincipal sharedUser = UserPrincipal.getLocalUser(getUserName());
    ComponentInfo info = new ComponentInfo(UserPrincipal.class, "shared");
    repo.registerComponent(info, sharedUser);
  }
View Full Code Here


  @Override
  public void init(final ComponentRepository repo, final LinkedHashMap<String, String> configuration) {
    final MarketDataSnapshotMaster master = new InMemorySnapshotMaster();
    final ComponentInfo info = new ComponentInfo(MarketDataSnapshotMaster.class, getClassifier());
    info.addAttribute(ComponentInfoAttributes.LEVEL, 1);
    info.addAttribute(ComponentInfoAttributes.REMOTE_CLIENT_JAVA, RemoteMarketDataSnapshotMaster.class);
    info.addAttribute(ComponentInfoAttributes.UNIQUE_ID_SCHEME, InMemorySnapshotMaster.DEFAULT_OID_SCHEME);
    repo.registerComponent(info, master);

    // publish
    if (isPublishRest()) {
      repo.getRestComponents().publish(info, new DataMarketDataSnapshotMasterResource(master));
View Full Code Here

  protected void initSecurities(final ComponentRepository repo) {
    final SecurityMaster master = new InMemorySecurityMaster();
    final MasterFinancialSecuritySource source = new MasterFinancialSecuritySource(master);

    final ComponentInfo infoMaster = new ComponentInfo(SecurityMaster.class, "test");
    repo.registerComponent(infoMaster, master);
    repo.getRestComponents().publish(infoMaster, new DataSecurityMasterResource(master));

    final ComponentInfo infoSource = new ComponentInfo(SecuritySource.class, "test");
    repo.registerComponent(infoSource, source);
    repo.getRestComponents().publish(infoSource, new DataSecuritySourceResource(source));
  }
View Full Code Here

  protected void initSnapshots(final ComponentRepository repo) {
    final MarketDataSnapshotMaster master = new InMemorySnapshotMaster();
    final MarketDataSnapshotSource source = new MasterSnapshotSource(master);

    final ComponentInfo infoMaster = new ComponentInfo(MarketDataSnapshotMaster.class, "test");
    repo.registerComponent(infoMaster, master);
    repo.getRestComponents().publish(infoMaster, new DataMarketDataSnapshotMasterResource(master));

    final ComponentInfo infoSource = new ComponentInfo(MarketDataSnapshotSource.class, "test");
    repo.registerComponent(infoSource, source);
    repo.getRestComponents().publish(infoSource, new DataMarketDataSnapshotSourceResource(source));
  }
View Full Code Here

  protected void initYieldCurves(final ComponentRepository repo) {
    final InMemoryInterpolatedYieldCurveDefinitionMaster masterAndSource = new InMemoryInterpolatedYieldCurveDefinitionMaster();
    masterAndSource.setUniqueIdScheme("TestCurves");

    final ComponentInfo infoMaster = new ComponentInfo(InterpolatedYieldCurveDefinitionMaster.class, "test");
    repo.registerComponent(infoMaster, masterAndSource);
    repo.getRestComponents().publish(infoMaster, new DataInterpolatedYieldCurveDefinitionMasterResource(masterAndSource));

    final ComponentInfo infoSource = new ComponentInfo(InterpolatedYieldCurveDefinitionSource.class, "test");
    repo.registerComponent(infoSource, masterAndSource);
    repo.getRestComponents().publish(infoSource, new DataInterpolatedYieldCurveDefinitionSourceResource(masterAndSource));
  }
View Full Code Here

  private ConnectionFactory _connectionFactory;

  @Override
  public void init(ComponentRepository repo, LinkedHashMap<String, String> configuration) throws Exception {

    final ComponentInfo info = new ComponentInfo(JmsConnector.class, getClassifier());
    final JmsConnector component = initJmsConnector();
    repo.registerComponent(info, component);

  }
View Full Code Here

  private String _uniqueIdScheme;

  //-------------------------------------------------------------------------
  @Override
  public void init(ComponentRepository repo, LinkedHashMap<String, String> configuration) {
    ComponentInfo info = new ComponentInfo(RegionMaster.class, getClassifier());
   
    // create
    String scheme = (getUniqueIdScheme() != null ? getUniqueIdScheme() : InMemoryRegionMaster.DEFAULT_OID_SCHEME);
    ChangeManager cm = new BasicChangeManager();
    if (getJmsChangeManagerTopic() != null) {
      cm = new JmsChangeManager(getJmsConnector(), getJmsChangeManagerTopic());
      repo.registerLifecycle((Lifecycle) cm);
      if (getJmsConnector().getClientBrokerUri() != null) {
        info.addAttribute(ComponentInfoAttributes.JMS_BROKER_URI, getJmsConnector().getClientBrokerUri().toString());
      }
      info.addAttribute(ComponentInfoAttributes.JMS_CHANGE_MANAGER_TOPIC, getJmsChangeManagerTopic());
    }
    InMemoryRegionMaster master = new InMemoryRegionMaster(new ObjectIdSupplier(scheme), cm);
    RegionFileReader.createPopulated(master);
   
    // register
    info.addAttribute(ComponentInfoAttributes.LEVEL, 1);
    info.addAttribute(ComponentInfoAttributes.REMOTE_CLIENT_JAVA, RemoteRegionMaster.class);
    info.addAttribute(ComponentInfoAttributes.UNIQUE_ID_SCHEME, scheme);
    repo.registerComponent(info, master);
   
    // publish
    if (isPublishRest()) {
      repo.getRestComponents().publish(info, new DataRegionMasterResource(master));
View Full Code Here

TOP

Related Classes of com.opengamma.component.ComponentInfo

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.