/**
 * Copyright (C) 2009 - present by OpenGamma Inc. and the OpenGamma group of companies
 *
 * Please see distribution for license.
 */
package com.opengamma.master.position;

import com.opengamma.DataNotFoundException;
import com.opengamma.core.change.ChangeProvider;
import com.opengamma.id.UniqueId;
import com.opengamma.master.AbstractMaster;
import com.opengamma.util.PublicSPI;

/**
 * A general-purpose position master.
 * <p>
 * The position master provides a uniform view over a set of position definitions.
 * This interface provides methods that allow the master to be searched and updated.
 */
@PublicSPI
public interface PositionMaster extends AbstractMaster<PositionDocument>, ChangeProvider {

  /**
   * Searches for positions matching the specified search criteria.
   * 
   * @param request  the search request, not null
   * @return the search result, not null
   * @throws IllegalArgumentException if the request is invalid
   */
  PositionSearchResult search(PositionSearchRequest request);

  /**
   * Queries the history of a single position.
   * <p>
   * The request must contain an object identifier to identify the position.
   * 
   * @param request  the history request, not null
   * @return the position history, not null
   * @throws IllegalArgumentException if the request is invalid
   */
  PositionHistoryResult history(PositionHistoryRequest request);

  /**
   * Gets a trade by unique identifier.
   * <p>
   * If the master supports history then the version in the identifier will be used
   * to return the requested historic version.
   * 
   * @param tradeId  the trade unique identifier, not null
   * @return the trade, not null
   * @throws IllegalArgumentException if the request is invalid
   * @throws DataNotFoundException if there is no trade with that unique identifier
   */
  ManageableTrade getTrade(UniqueId tradeId);

}

@@ -219,57 +219,8 @@
 on;%0A
-import com.opengamma.core.change.ChangeProvider;%0A
 impo
@@ -281,24 +281,39 @@
 ter.Abstract
+ChangeProviding
 Master;%0Aimpo
@@ -626,16 +626,31 @@
 Abstract
+ChangeProviding
 Master%3CP
@@ -669,24 +669,8 @@
 ent%3E
-, ChangeProvider
  %7B%0A%0A

Make PositionMaster extend AbstractChangeProvidingMaster<PositionDocument> rather than AbstractMaster<PositionDocument> and ChangeProvider