@@ -0,0 +1,3857 @@
+/**%0A * Copyright (C) 2011 - present by OpenGamma Inc. and the OpenGamma group of companies%0A *%0A * Please see distribution for license.%0A */%0Apackage com.opengamma.core.security;%0A%0Aimport com.opengamma.DataNotFoundException;%0Aimport com.opengamma.core.Link;%0Aimport com.opengamma.core.LinkResolver;%0Aimport com.opengamma.id.ExternalIdBundle;%0Aimport com.opengamma.id.ObjectId;%0Aimport com.opengamma.id.UniqueId;%0Aimport com.opengamma.util.PublicAPI;%0A%0A/**%0A * Resolver capable of providing securities.%0A * %3Cp%3E%0A * This resolver provides lookup of a %7B@link Security security%7D to the engine functions.%0A * The lookup may require selecting a single %22best match%22 from a set of potential options.%0A * The best match behavior is the key part that distinguishes one implementation from another.%0A * Best match selection may use a version-correction, configuration or code as appropriate.%0A * Implementations of this interface must specify the rules they use to best match.%0A * %3Cp%3E%0A * This interface must be implemented to be thread-safe.%0A */%0A@PublicAPI%0Apublic interface SecurityResolver extends LinkResolver%3CSecurity%3E %7B%0A%0A  /**%0A   * Resolves the link to the provide the target security.%0A   * %3Cp%3E%0A   * A link contains both an object and an external identifier bundle, although%0A   * typically only one of these is populated. Since neither input exactly specifies%0A   * a single version of a single security a best match is required.%0A   * The resolver implementation is responsible for selecting the best match.%0A   * %0A   * @param link  the link to be resolver, not null%0A   * @return the resolved target, not null%0A   * @throws DataNotFoundException if the target could not be resolved%0A   * @throws RuntimeException if an error occurs%0A   */%0A  Security resolve(Link%3CSecurity%3E link);%0A%0A  /**%0A   * Gets a security by unique identifier.%0A   * %3Cp%3E%0A   * A unique identifier exactly specifies a single security at a single version-correction.%0A   * As such, there should be no complex matching issues in this lookup.%0A   * However, if the underlying data store does not handle versioning correctly,%0A   * then a best match selection may be required.%0A   * %0A   * @param uniqueId  the unique identifier to find, not null%0A   * @return the security, null if not found%0A   * @throws IllegalArgumentException if the identifier is invalid%0A   * @throws RuntimeException if an error occurs%0A   */%0A  Security getSecurity(UniqueId uniqueId);%0A%0A  /**%0A   * Gets a security by object identifier.%0A   * %3Cp%3E%0A   * An object identifier exactly specifies a single security, but it provide no information%0A   * about the version-correction required.%0A   * As such, it is likely that multiple versions/corrections will match the object identifier.%0A   * The resolver implementation is responsible for selecting the best match.%0A   * %0A   * @param objectId  the object identifier to find, not null%0A   * @return the security, null if not found%0A   * @throws IllegalArgumentException if the identifier or version-correction is invalid%0A   * @throws RuntimeException if an error occurs%0A   */%0A  Security getSecurity(ObjectId objectId);%0A%0A  /**%0A   * Gets a security by external identifier bundle.%0A   * %3Cp%3E%0A   * A bundle represents the set of external identifiers which in theory map to a single security.%0A   * Unfortunately, not all external identifiers uniquely identify a single version of a single security.%0A   * As such, it is likely that multiple versions/corrections of multiple different securities will match the bundle.%0A   * The resolver implementation is responsible for selecting the best match.%0A   * %0A   * @param bundle  the external identifier bundle to find, not null%0A   * @return the single security matching the bundle of keys, null if not found%0A   * @throws IllegalArgumentException if the identifier bundle is invalid%0A   * @throws RuntimeException if an error occurs%0A   */%0A  Security getSecurity(ExternalIdBundle bundle);%0A%0A%7D%0A

Add security resolver