Package com.opengamma

Examples of com.opengamma.DataNotFoundException


    ObjectId positionId = ObjectId.parse(data().getUriPositionId());
    PortfolioDocument doc = data().getPortfolio();
    if (doc.isLatest()) {
      ManageablePortfolioNode node = data().getNode();
      if (node.getPositionIds().remove(positionId) == false) {
        throw new DataNotFoundException("Position id not found: " + positionId);
      }
      doc = data().getPortfolioMaster().update(doc);
    }
    return Response.seeOther(WebPortfolioNodeResource.uri(data())).build();
  }
View Full Code Here


    ObjectId positionId = ObjectId.parse(data().getUriPositionId());
    PortfolioDocument doc = data().getPortfolio();
    if (doc.isLatest()) {
      ManageablePortfolioNode node = data().getNode();
      if (node.getPositionIds().remove(positionId) == false) {
        throw new DataNotFoundException("Position id not found: " + positionId);
      }
      doc = data().getPortfolioMaster().update(doc);
    }
    return Response.ok().build();
  }
View Full Code Here

   * @throws DataNotFoundException If the ID is unknown
   */
  /* package */ void delete(long id) {
    ErrorInfo error = _errors.remove(id);
    if (error == null) {
      throw new DataNotFoundException("No error found with ID " + id);
    }
  }
View Full Code Here

  /* package */ static ManageablePortfolioNode findNode(ManageablePortfolio portfolio, UniqueId nodeId) {
    ManageablePortfolioNode node = findNode(portfolio.getRootNode(), nodeId);
    if (node != null) {
      return node;
    } else {
      throw new DataNotFoundException("Node " + nodeId + " not found");
    }
  }
View Full Code Here

   */
  /* package */ V getViewport(int viewportId) {
    V viewport = _viewports.get(viewportId);
    if (viewport == null) {
      s_logger.debug("Received request for non-existent viewport ID {}", viewportId);
      throw new DataNotFoundException("No viewport found with ID " + viewportId);
    }
    return viewport;
  }
View Full Code Here

   */
  /* package */ void deleteViewport(int viewportId) {
    Viewport viewport = _viewports.remove(viewportId);
    if (viewport == null) {
      s_logger.debug("Received request to delete non-existent viewport ID {}", viewportId);
      throw new DataNotFoundException("No viewport found with ID " + viewportId);
    }
    _viewportListener.viewportDeleted(viewport.getDefinition(), getGridStructure());
  }
View Full Code Here

    if (_depGraphs.containsKey(graphId)) {
      throw new IllegalArgumentException("Dependency graph ID " + graphId + " is already in use");
    }
    Pair<String, ValueSpecification> targetForCell = getGridStructure().getTargetForCell(row, col);
    if (targetForCell == null) {
      throw new DataNotFoundException("No dependency graph is available for row " + row + ", col " + col);
    }
    String calcConfigName = targetForCell.getFirst();
    ValueSpecification valueSpec = targetForCell.getSecond();
    ValueRequirement valueReq = getGridStructure().getRequirementForCell(row, col).getSecond();
    DependencyGraphGrid grid = DependencyGraphGrid.create(compiledViewDef, valueReq, valueSpec, calcConfigName, _cycle,
View Full Code Here

   * @throws DataNotFoundException If no dependency graph exists with the specified ID
   */
  private DependencyGraphGrid getDependencyGraph(int graphId) {
    DependencyGraphGrid grid = _depGraphs.get(graphId);
    if (grid == null) {
      throw new DataNotFoundException("No dependency graph found with ID " + graphId + " for " + _gridType + " grid");
    }
    return grid;
  }
View Full Code Here

   * @throws DataNotFoundException If no dependency graph exists with the specified ID
   */
  /* package */void closeDependencyGraph(int graphId) {
    AnalyticsGrid<?> grid = _depGraphs.remove(graphId);
    if (grid == null) {
      throw new DataNotFoundException("No dependency graph found with ID " + graphId + " for " + _gridType + " grid");
    }
  }
View Full Code Here

    } else if (typeName.equals(FungibleTradeBuilder.TRADE_TYPE_NAME)) {
      beanData = FungibleTradeBuilder.tradeStructure();
    } else {
      MetaBean metaBean = s_metaBeansByTypeName.get(typeName);
      if (metaBean == null) {
        throw new DataNotFoundException("Unknown type name " + typeName);
      }
      BeanStructureBuilder structureBuilder = new BeanStructureBuilder(BlotterUtils.getMetaBeans(),
                                                                       s_underlyingSecurityTypes,
                                                                       s_endpoints,
                                                                       BlotterUtils.getStringConvert());
View Full Code Here

TOP

Related Classes of com.opengamma.DataNotFoundException

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.