Package com.opengamma.integration.tool

Examples of com.opengamma.integration.tool.IntegrationToolContext$Meta


    for (int i = 0; i < 2; i++) {
      DBTestUtils.createHsqlDB(CONFIG_RESOURCE_LOCATION);
     
      new ExampleDatabasePopulator().run(CONFIG_RESOURCE_LOCATION, IntegrationToolContext.class);
     
      IntegrationToolContext toolContext = getToolContext();
      try {
        assertEquityPortfolio(toolContext);
        assertMultiCurrencySwapPortfolio(toolContext);
       
      } finally {
        if (toolContext != null) {
          toolContext.close();
        }
      }
      DBTestUtils.cleanUp(CONFIG_RESOURCE_LOCATION);
    }
  }
View Full Code Here


  /**
   * Loads the portfolio into the position master.
   */
  @Override
  protected void doRun() {     
    IntegrationToolContext context = getToolContext();

    // Create portfolio writer
    PortfolioWriter portfolioWriter = constructPortfolioWriter(
        getCommandLine().getOptionValue(PORTFOLIO_NAME_OPT),
        context.getPortfolioMaster(),
        context.getPositionMaster(),
        context.getSecurityMaster(),
        getCommandLine().hasOption(WRITE_OPT),
        getCommandLine().hasOption(OVERWRITE_OPT)
    );

    // Construct portfolio reader
    PortfolioReader portfolioReader = constructPortfolioReader(
        getCommandLine().getOptionValue(FILE_NAME_OPT),
        context.getSecurityProvider()
    );
   
    // Create portfolio copier
    ResolvingPortfolioCopier portfolioCopier = new ResolvingPortfolioCopier(
        context.getHistoricalTimeSeriesMaster(),
        context.getHistoricalTimeSeriesProvider(),
        context.getBloombergReferenceDataProvider(),
        getOptionValue(TIME_SERIES_DATAPROVIDER_OPT, "CMPL"),
        getCommandLine().getOptionValues(TIME_SERIES_DATAFIELD_OPT) == null ?
            new String[]{"PX_LAST"} : getCommandLine().getOptionValues(TIME_SERIES_DATAFIELD_OPT)
    );
   
View Full Code Here

  /**
   * Loads the portfolio into the position master.
   */
  @Override
  protected void doRun() {
    IntegrationToolContext context = getToolContext();

    // Create portfolio writer
    PortfolioWriter portfolioWriter = new PrettyPrintingPortfolioWriter(getCommandLine().hasOption(VERBOSE_OPT));

    // Construct portfolio reader
    PortfolioReader portfolioReader = new MasterPortfolioReader(
        getCommandLine().getOptionValue(PORTFOLIO_NAME_OPT),
        context.getPortfolioMaster(),
        context.getPositionMaster(),
        context.getSecuritySource());
   
    // Create portfolio copier
    ResolvingPortfolioCopier portfolioCopier = new ResolvingPortfolioCopier(
        context.getHistoricalTimeSeriesMaster(),
        context.getHistoricalTimeSeriesProvider(),
        context.getBloombergReferenceDataProvider(),
        getOptionValue(TIME_SERIES_DATAPROVIDER_OPT, "CMPL"),
        getCommandLine().getOptionValues(TIME_SERIES_DATAFIELD_OPT) == null ?
            new String[]{"PX_LAST"} : getCommandLine().getOptionValues(TIME_SERIES_DATAFIELD_OPT)
    );
   
View Full Code Here

   * Creates an empty instance of the tool context.
   *
   * @return the empty tool context, not null
   */
  protected IntegrationToolContext createToolContext() {
    return new IntegrationToolContext();
  }
View Full Code Here

TOP

Related Classes of com.opengamma.integration.tool.IntegrationToolContext$Meta

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.