Package com.opengamma.provider.security

Examples of com.opengamma.provider.security.SecurityProviderRequest


  //-------------------------------------------------------------------------
  // delegate convenience methods to request/result method
  // code copied from AbstractSecurityProvider due to lack of multiple inheritance
  @Override
  public Security getSecurity(ExternalIdBundle externalIdBundle) {
    SecurityProviderRequest request = SecurityProviderRequest.createGet(externalIdBundle, null);
    SecurityProviderResult result = getSecurities(request);
    return result.getResultMap().get(externalIdBundle);
  }
View Full Code Here


    return result.getResultMap().get(externalIdBundle);
  }

  @Override
  public Map<ExternalIdBundle, Security> getSecurities(Collection<ExternalIdBundle> externalIdBundles) {
    SecurityProviderRequest request = SecurityProviderRequest.createGet(externalIdBundles, null);
    SecurityProviderResult result = getSecurities(request);
    return result.getResultMap();
  }
View Full Code Here

  }

  //-------------------------------------------------------------------------
  @Override
  public Security getSecurity(ExternalIdBundle externalIdBundle) {
    SecurityProviderRequest request = SecurityProviderRequest.createGet(externalIdBundle, null);
    SecurityProviderResult result = getSecurities(request);
    return result.getResultMap().get(externalIdBundle);
  }
View Full Code Here

    return result.getResultMap().get(externalIdBundle);
  }

  @Override
  public Map<ExternalIdBundle, Security> getSecurities(Collection<ExternalIdBundle> externalIdBundles) {
    SecurityProviderRequest request = SecurityProviderRequest.createGet(externalIdBundles, null);
    SecurityProviderResult result = getSecurities(request);
    return result.getResultMap();
  }
View Full Code Here

  }

  @Test
  public void test_get_request() {
    NoneFoundSecurityProvider test = new NoneFoundSecurityProvider();
    SecurityProviderRequest request = SecurityProviderRequest.createGet(BUNDLE, "FOO");
    SecurityProviderResult expected = new SecurityProviderResult();
    expected.getResultMap().put(BUNDLE, null);
    assertEquals(expected, test.getSecurities(request));
  }
View Full Code Here

  }

  //-------------------------------------------------------------------------
  @Test
  public void testGet() {
    final SecurityProviderRequest request = SecurityProviderRequest.createGet(
        ExternalIdBundle.of("A", "B"), "S");
    final SecurityProviderResult result = new SecurityProviderResult();
   
    when(_underlying.getSecurities(same(request))).thenReturn(result);
   
View Full Code Here

TOP

Related Classes of com.opengamma.provider.security.SecurityProviderRequest

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.