Package com.opengamma.id

Examples of com.opengamma.id.VersionCorrection


      @QueryParam("currency") String currencyStr,
      @QueryParam("versionAsOf") String versionAsOfStr,
      @QueryParam("name") String name) {
    final Currency currency = Currency.parse(currencyStr);
    if (versionAsOfStr != null) {
      final VersionCorrection versionCorrection = VersionCorrection.parse(versionAsOfStr, null);
      VolatilityCubeDefinition result = getVolatilityCubeDefinitionSource().getDefinition(currency, name, versionCorrection);
      return responseOkFudge(result);
    } else {
      VolatilityCubeDefinition result = getVolatilityCubeDefinitionSource().getDefinition(currency, name);
      return responseOkFudge(result);
View Full Code Here


    final ObjectId objectId = ObjectId.parse(idStr);
    if (version != null) {
      final Holiday result = getHolidaySource().get(objectId.atVersion(version));
      return responseOkFudge(result);
    } else {
      final VersionCorrection vc = VersionCorrection.parse(versionAsOf, correctedTo);
      Holiday result = getHolidaySource().get(objectId, vc);
      return responseOkFudge(result);
    }
  }
View Full Code Here

  @Path("regions")
  public Response search(
      @QueryParam("versionAsOf") String versionAsOf,
      @QueryParam("correctedTo") String correctedTo,
      @QueryParam("id") List<String> externalIdStrs) {
    final VersionCorrection vc = VersionCorrection.parse(versionAsOf, correctedTo);
    final ExternalIdBundle bundle = ExternalIdBundle.parse(externalIdStrs);
    Collection<? extends Region> result = getRegionSource().get(bundle, vc);
    return responseOkFudge(FudgeListWrapper.of(result));
  }
View Full Code Here

    final ObjectId objectId = ObjectId.parse(idStr);
    if (version != null) {
      final Region result = getRegionSource().get(objectId.atVersion(version));
      return responseOkFudge(result);
    } else {
      final VersionCorrection vc = VersionCorrection.parse(versionAsOf, correctedTo);
      Region result = getRegionSource().get(objectId, vc);
      return responseOkFudge(result);
    }
  }
View Full Code Here

      @PathParam("portfolioId") String idStr,
      @QueryParam("version") String version,
      @QueryParam("versionAsOf") String versionAsOf,
      @QueryParam("correctedTo") String correctedTo) {
    final ObjectId objectId = ObjectId.parse(idStr);
    final VersionCorrection vc = VersionCorrection.parse(versionAsOf, correctedTo);
    if (version != null) {
      final Portfolio result = getPositionSource().getPortfolio(objectId.atVersion(version), vc);
      return responseOkFudge(result);
    } else {
      final Portfolio result = getPositionSource().getPortfolio(objectId, vc);
View Full Code Here

      @PathParam("nodeId") String idStr,
      @QueryParam("version") String version,
      @QueryParam("versionAsOf") String versionAsOf,
      @QueryParam("correctedTo") String correctedTo) {
    final ObjectId objectId = ObjectId.parse(idStr);
    final VersionCorrection vc = VersionCorrection.parse(versionAsOf, correctedTo);
    final PortfolioNode result = getPositionSource().getPortfolioNode(objectId.atVersion(version), vc);
    return responseOkFudge(result);
  }
View Full Code Here

  @Path("exchanges")
  public Response search(
      @QueryParam("versionAsOf") String versionAsOf,
      @QueryParam("correctedTo") String correctedTo,
      @QueryParam("id") List<String> externalIdStrs) {
    final VersionCorrection vc = VersionCorrection.parse(versionAsOf, correctedTo);
    final ExternalIdBundle bundle = ExternalIdBundle.parse(externalIdStrs);
    Collection<? extends Exchange> result = getExchangeSource().get(bundle, vc);
    return responseOkFudge(FudgeListWrapper.of(result));
  }
View Full Code Here

    final ObjectId objectId = ObjectId.parse(idStr);
    if (version != null) {
      final Exchange result = getExchangeSource().get(objectId.atVersion(version));
      return responseOkFudge(result);
    } else {
      final VersionCorrection vc = VersionCorrection.parse(versionAsOf, correctedTo);
      Exchange result = getExchangeSource().get(objectId, vc);
      return responseOkFudge(result);
    }
  }
View Full Code Here

  public Response search(
    @QueryParam("type") final String typeStr,
    @QueryParam("versionCorrection") final String versionCorrectionStr,
    @QueryParam("name") final String name) {
    final Class<?> type = ReflectionUtils.loadClass(typeStr);
    final VersionCorrection versionCorrection = (versionCorrectionStr != null) ? VersionCorrection.parse(versionCorrectionStr) : VersionCorrection.LATEST;
    if (name == null) {
      return responseOkFudge(configItemCollectionResult(getConfigSource().getAll(type, versionCorrection)));
    } else {
      return responseOkFudge(configItemCollectionResult(getConfigSource().get(type, name, versionCorrection)));
    }
View Full Code Here

  @Path("configs/{oid}/{versionCorrection}")
  public Response getByOidVersionCorrection(
    @PathParam("oid") final String idStr,
    @PathParam("versionCorrection") final String versionCorrectionStr) {
    final ObjectId objectId = ObjectId.parse(idStr);
    final VersionCorrection versionCorrection = VersionCorrection.parse(versionCorrectionStr);
    final ConfigItem<?> result = getConfigSource().get(objectId, versionCorrection);
    return responseOkFudge(configItemResult(result));
  }
View Full Code Here

TOP

Related Classes of com.opengamma.id.VersionCorrection

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.