Package com.opengamma.master.region

Examples of com.opengamma.master.region.RegionHistoryRequest


 
  @GET
  @Path("versions")
  public Response history(@Context UriInfo uriInfo) {
    RegionHistoryRequest request = RestUtils.decodeQueryParams(uriInfo, RegionHistoryRequest.class);
    if (getUrlId().equals(request.getObjectId()) == false) {
      throw new IllegalArgumentException("Document objectId does not match URI");
    }
    RegionHistoryResult result = getMaster().history(request);
    return responseOkFudge(result);
  }
View Full Code Here


    UniqueId oid = UniqueId.parse(idStr);
    try {
      RegionDocument doc = data().getRegionMaster().get(oid);
      data().setRegion(doc);
    } catch (DataNotFoundException ex) {
      RegionHistoryRequest historyRequest = new RegionHistoryRequest(oid);
      historyRequest.setPagingRequest(PagingRequest.ONE);
      RegionHistoryResult historyResult = data().getRegionMaster().history(historyRequest);
      if (historyResult.getDocuments().size() == 0) {
        return null;
      }
      data().setRegion(historyResult.getFirstDocument());
View Full Code Here

  }

  //-------------------------------------------------------------------------
  @GET
  public String getHTML() {
    RegionHistoryRequest request = new RegionHistoryRequest(data().getRegion().getUniqueId());
    RegionHistoryResult result = data().getRegionMaster().history(request);
   
    FlexiBean out = createRootData();
    out.put("versionsResult", result);
    out.put("versions", result.getRegions());
View Full Code Here

  public Response getJSON(
      @QueryParam("pgIdx") Integer pgIdx,
      @QueryParam("pgNum") Integer pgNum,
      @QueryParam("pgSze") Integer pgSze) {
    PagingRequest pr = buildPagingRequest(pgIdx, pgNum, pgSze);
    RegionHistoryRequest request = new RegionHistoryRequest(data().getRegion().getUniqueId());
    request.setPagingRequest(pr);
    RegionHistoryResult result = data().getRegionMaster().history(request);
   
    FlexiBean out = createRootData();
    out.put("versionsResult", result);
    out.put("versions", result.getRegions());
View Full Code Here

TOP

Related Classes of com.opengamma.master.region.RegionHistoryRequest

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.