Examples of CurrencyPairsSource


Examples of com.opengamma.financial.currency.CurrencyPairsSource

   * @deprecated [PLAT-2782] interim measure to move away from direct use of a config source
   */
  @Deprecated
  public static CurrencyPairsSource getCurrencyPairsSource(final FunctionExecutionContext context) {
    final ComputationTargetResolverWrapper resolver = new ComputationTargetResolverWrapper(context.getComputationTargetResolver());
    return new CurrencyPairsSource() {

      @Override
      public CurrencyPairs getCurrencyPairs(String name) {
        if (name == null) {
          name = CurrencyPairs.DEFAULT_CURRENCY_PAIRS;
View Full Code Here

Examples of com.opengamma.financial.currency.CurrencyPairsSource

   * @deprecated [PLAT-2782] interim measure to request data via function inputs, or targets
   */
  @Deprecated
  public static CurrencyPairsSource getCurrencyPairsSource(final FunctionCompilationContext compilationContext) {
    final ComputationTargetResolverWrapper resolver = new ComputationTargetResolverWrapper(compilationContext.getComputationTargetResolver());
    return new CurrencyPairsSource() {

      @Override
      public CurrencyPairs getCurrencyPairs(String name) {
        if (name == null) {
          name = CurrencyPairs.DEFAULT_CURRENCY_PAIRS;
View Full Code Here

Examples of com.opengamma.financial.currency.CurrencyPairsSource

                                            getCombinedConfigSource(),
                                            getUserConfigMaster(),
                                            getUserPortfolioMaster(),
                                            getUserPositionMaster(),
                                            getPortfolioAggregationFunctions().getMappedFunctions());
    CurrencyPairsSource currencyPairsSource = new ConfigDBCurrencyPairsSource(configSource);
    // TODO should be able to configure the currency pairs
    CurrencyPairs currencyPairs = currencyPairsSource.getCurrencyPairs(CurrencyPairs.DEFAULT_CURRENCY_PAIRS);
    SecurityAttributeMapper blotterColumnMapper = DefaultSecurityAttributeMappings.create(currencyPairs);
    AnalyticsViewManager analyticsViewManager = new AnalyticsViewManager(getViewProcessor(),
                                                                         getParallelViewRecompilation(),
                                                                         aggregatedViewDefManager,
                                                                         getComputationTargetResolver(),
View Full Code Here

Examples of com.opengamma.financial.currency.CurrencyPairsSource

  public BlackDiscountingFXOptionFunction(final String... valueRequirements) {
    super(valueRequirements);
  }

  protected CurrencyPairs getCurrencyPairs(final FunctionCompilationContext context) {
    final CurrencyPairsSource currencyPairsSource = OpenGammaCompilationContext.getCurrencyPairsSource(context);
    return currencyPairsSource.getCurrencyPairs(CurrencyPairs.DEFAULT_CURRENCY_PAIRS);
  }
View Full Code Here

Examples of com.opengamma.financial.currency.CurrencyPairsSource

   * @param repo  the component repository, not null
   * @param configuration  the remaining configuration, not null
   */
  @Override
  public void init(ComponentRepository repo, LinkedHashMap<String, String> configuration) {
    CurrencyPairsSource source = createCurrencyPairsSource(repo);
    ComponentInfo info = new ComponentInfo(CurrencyPairsSource.class, getClassifier());
    info.addAttribute(ComponentInfoAttributes.LEVEL, 1);
    info.addAttribute(ComponentInfoAttributes.REMOTE_CLIENT_JAVA, RemoteCurrencyPairsSource.class);

    // This is here so that the dependency graph resolver can pick up a versioned currency pairs source
View Full Code Here

Examples of com.opengamma.financial.currency.CurrencyPairsSource

  @Override
  public Set<ComputedValue> execute(final FunctionExecutionContext executionContext, final FunctionInputs inputs, final ComputationTarget target,
      final Set<ValueRequirement> desiredValues) throws AsynchronousExecution {
    final ValueRequirement desiredValue = Iterables.getOnlyElement(desiredValues);
    final String name = desiredValue.getConstraint(CURRENCY_PAIRS_NAME);
    @SuppressWarnings("deprecation")
    final CurrencyPairsSource ccyPairsSource = OpenGammaExecutionContext.getCurrencyPairsSource(executionContext);
    final CurrencyPairs currencyPairs = ccyPairsSource.getCurrencyPairs(name);
    if (currencyPairs == null) {
      throw new OpenGammaRuntimeException("Could not get CurrencyPairs called " + CurrencyPairs.DEFAULT_CURRENCY_PAIRS);
    }
    return Collections.singleton(new ComputedValue(new ValueSpecification(ValueRequirementNames.CURRENCY_PAIRS, ComputationTargetSpecification.NULL,
        createValueProperties().with(CURRENCY_PAIRS_NAME, name).get()), currencyPairs));
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.