Examples of InMemorySecurityMaster


Examples of com.opengamma.master.security.impl.InMemorySecurityMaster

    return BlotterTestUtils.beanData(tradeData);
  }

  @BeforeMethod
  public void setUp() throws Exception {
    _securityMaster = new InMemorySecurityMaster();
    _positionMaster = new InMemoryPositionMaster();
    _portfolioMaster = new InMemoryPortfolioMaster();
    _builder = new OtcTradeBuilder(_positionMaster,
                                   _portfolioMaster,
                                   _securityMaster,
View Full Code Here

Examples of com.opengamma.master.security.impl.InMemorySecurityMaster

  @BeforeMethod(groups = TestGroup.UNIT)
  public void setUp() throws Exception {
    _uriInfo = new MockUriInfo();
    _trades = getTrades();
    _secMaster = new InMemorySecurityMaster(new ObjectIdSupplier("Mock"));
    _positionMaster = new InMemoryPositionMaster();
    final MasterConfigSource configSource = new MasterConfigSource(new InMemoryConfigMaster());
    final InMemoryHistoricalTimeSeriesMaster htsMaster = new InMemoryHistoricalTimeSeriesMaster();
    final HistoricalTimeSeriesResolver htsResolver = new DefaultHistoricalTimeSeriesResolver(new DefaultHistoricalTimeSeriesSelector(configSource), htsMaster);
    _htsSource = new MasterHistoricalTimeSeriesSource(htsMaster, htsResolver);
View Full Code Here

Examples of com.opengamma.master.security.impl.InMemorySecurityMaster

  @BeforeMethod
  public void setUp() throws Exception {
    _portfolioMaster = new InMemoryPortfolioMaster();
    _positionMaster = new InMemoryPositionMaster();
    InMemorySecurityMaster securityMaster = new InMemorySecurityMaster();
    securityMaster.add(new SecurityDocument(APPLE_SECURITY));
    securityMaster.add(new SecurityDocument(INTEL_SECURITY));
    BigDecimal quantity = BigDecimal.valueOf(20);
    ManageablePosition position = new ManageablePosition(quantity, APPLE_SECURITY.getExternalIdBundle());
    position.addTrade(new ManageableTrade(quantity,
                                          APPLE_BUNDLE,
                                          LocalDate.of(2012, 12, 1),
View Full Code Here

Examples of com.opengamma.master.security.impl.InMemorySecurityMaster

  private InMemoryOrganizationMaster _organizationMaster;

  @BeforeMethod
  public void setup() {

    _securityMaster = new InMemorySecurityMaster();
    _organizationMaster = new InMemoryOrganizationMaster();

    _aggregator = new ObligorMarkitSectorAggregationFunction(
        new MasterSecuritySource(_securityMaster), new MasterOrganizationSource(_organizationMaster));
  }
View Full Code Here

Examples of com.opengamma.master.security.impl.InMemorySecurityMaster

  private SecurityMaster _securityMaster;
  private AggregationFunction<String> _aggregator;

  @BeforeMethod
  public void setup() {
    _securityMaster = new InMemorySecurityMaster();
    _aggregator = new CdsSeniorityAggregationFunction(new MasterSecuritySource(_securityMaster));
  }
View Full Code Here

Examples of com.opengamma.master.security.impl.InMemorySecurityMaster

      initYieldCurves(repo);
    }
  }

  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));
View Full Code Here

Examples of com.opengamma.master.security.impl.InMemorySecurityMaster

  private SecurityMaster _securityMaster;
  private AggregationFunction<String> _aggregator;

  @BeforeMethod
  public void setup() {
    _securityMaster = new InMemorySecurityMaster();
    _aggregator = new CdsRedCodeAggregationFunction(new MasterSecuritySource(_securityMaster));
  }
View Full Code Here

Examples of com.opengamma.master.security.impl.InMemorySecurityMaster

  private boolean _publishRest = true;


  @Override
  public void init(final ComponentRepository repo, final LinkedHashMap<String, String> configuration) {
    final SecurityMaster master = new InMemorySecurityMaster();
    final ComponentInfo info = new ComponentInfo(SecurityMaster.class, getClassifier());
    info.addAttribute(ComponentInfoAttributes.LEVEL, 1);
    info.addAttribute(ComponentInfoAttributes.REMOTE_CLIENT_JAVA, RemoteSecurityMaster.class);
    info.addAttribute(ComponentInfoAttributes.UNIQUE_ID_SCHEME, InMemorySecurityMaster.DEFAULT_OID_SCHEME);
    repo.registerComponent(info, master);
View Full Code Here

Examples of com.opengamma.master.security.impl.InMemorySecurityMaster

  protected OrganizationMaster _orgMaster;

  @BeforeMethod(groups = TestGroup.UNIT)
  public void setUp() throws Exception {
    _uriInfo = new MockUriInfo();
    _secMaster = new InMemorySecurityMaster();
    _secLoader = new AbstractSecurityLoader() {
      @Override
      protected SecurityLoaderResult doBulkLoad(SecurityLoaderRequest request) {
        throw new UnsupportedOperationException("load security not supported");
      }
View Full Code Here

Examples of com.opengamma.master.security.impl.InMemorySecurityMaster

    _toolContext = new ToolContext();
    _portfolioMaster = new InMemoryPortfolioMaster();
    _toolContext.setPortfolioMaster(_portfolioMaster);
    _positionMaster = new InMemoryPositionMaster();
    _toolContext.setPositionMaster(_positionMaster);
    _securityMaster = new InMemorySecurityMaster();
    _toolContext.setSecurityMaster(_securityMaster);
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.