Package com.opengamma.financial.tool

Examples of com.opengamma.financial.tool.ToolContext


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


  }
 
  private void loadDefaultVolatilityCubeDefinition() {
    final Log log = new Log("Creating volatility cube definitions");
    try {
      final ToolContext toolContext = getToolContext();
      final ConfigMaster configMaster = toolContext.getConfigMaster();
      final ConfigItem<VolatilityCubeDefinition> item = ConfigItem.of(createDefaultVolatilityCubeDefinition(), "SECONDARY_USD", VolatilityCubeDefinition.class);
      ConfigMasterUtils.storeByName(configMaster, item);
      log.done();
    } catch (final RuntimeException t) {
      log.fail(t);
View Full Code Here

   
    if (!(new ExampleDatabasePopulator().run(CONFIG_RESOURCE_LOCATION, ToolContext.class))) {
      fail();
    }
   
    ToolContext toolContext = getToolContext();
    try {
      assertMultiAssetPortfolio(toolContext);
      assertEquityPortfolio(toolContext);
      assertMultiCurrencySwapPortfolio(toolContext);
     
    } finally {
      if (toolContext != null) {
        toolContext.close();
      }
    }
    DBTestUtils.cleanUp(CONFIG_RESOURCE_LOCATION);
  }
View Full Code Here

    System.exit(0);
  }

  @Override
  protected void doRun() throws Exception {
    ToolContext toolContext = getToolContext();
    ConfigMaster configMaster = toolContext.getConfigMaster();
    CommandLine commandLine = getCommandLine();
   
    BloombergSecurityTypeDefinitionLoader loader;
    if (commandLine.hasOption(CONFIG_NAME_OPT)) {
      loader = new BloombergSecurityTypeDefinitionLoader(configMaster, commandLine.getOptionValue(CONFIG_NAME_OPT));
View Full Code Here

    _portfolioMaster = new DbPortfolioMaster(getDbConnector());
    _positionMaster = new DbPositionMaster(getDbConnector());
    _securityMaster = new DbSecurityMaster(getDbConnector());

    _toolContext = new ToolContext();
    _toolContext.setPortfolioMaster(_portfolioMaster);
    _toolContext.setPositionMaster(_positionMaster);
    _toolContext.setSecurityMaster(_securityMaster);
  }
View Full Code Here

  private SecurityMaster _securityMaster;

  @BeforeMethod
  public void setUp() throws Exception {

    _toolContext = new ToolContext();
    _portfolioMaster = new InMemoryPortfolioMaster();
    _toolContext.setPortfolioMaster(_portfolioMaster);
    _positionMaster = new InMemoryPositionMaster();
    _toolContext.setPositionMaster(_positionMaster);
    _securityMaster = new InMemorySecurityMaster();
View Full Code Here

TOP

Related Classes of com.opengamma.financial.tool.ToolContext

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.