Package com.opengamma.master.config

Examples of com.opengamma.master.config.ConfigMaster


  }

  //-------------------------------------------------------------------------
  @Override
  protected void doRun() {
    final ConfigMaster configMaster = getToolContext().getConfigMaster();
    final List<HistoricalTimeSeriesRatingRule> rules = new ArrayList<>();
    rules.add(new HistoricalTimeSeriesRatingRule(DATA_SOURCE_NAME, "BLOOMBERG", 2));
    rules.add(new HistoricalTimeSeriesRatingRule(DATA_SOURCE_NAME, BloombergConstants.BLOOMBERG_DATA_SOURCE_NAME, 1));
    rules.add(new HistoricalTimeSeriesRatingRule(DATA_PROVIDER_NAME, "UNKNOWN", 2));
    rules.add(new HistoricalTimeSeriesRatingRule(DATA_PROVIDER_NAME, BloombergConstants.BLOOMBERG_DATA_SOURCE_NAME, 1));
View Full Code Here


    return _futuresExternalIds;
  }

  public void run(final ToolContext tools) {
    final ConfigSource configSource = tools.getConfigSource();
    final ConfigMaster configMaster = tools.getConfigMaster();
    final List<YieldCurveDefinition> curves = getForwardAndDiscountingCurves(configMaster);

    final Set<Currency> currencies = newHashSet();

    for (final YieldCurveDefinition curve : curves) {
View Full Code Here

*/
public class ExampleCurveConfigurationLoader extends AbstractTool<ToolContext> {

  @Override
  protected void doRun() throws Exception {
    final ConfigMaster configMaster = getToolContext().getConfigMaster();
    new MultiCurveCalculationConfigPopulator(configMaster);
  }
View Full Code Here

      removeAllUserMarketDataSnapshot(userName);
    }
  }

  private void removeAllUserViewDefinitions(String userName) {
    ConfigMaster configMaster = getServices().getConfigMaster();
    if (configMaster != null) {
      Iterator<Entry<ExternalId, Set<ObjectId>>> iterator = _viewDefinitionIds.entrySet().iterator();
      while (iterator.hasNext()) {
        Entry<ExternalId, Set<ObjectId>> entry = iterator.next();
        ExternalId identifier = entry.getKey();
        if (identifier.getScheme().getName().equals(userName)) {
          Set<ObjectId> viewDefinitions = entry.getValue();
          for (ObjectId viewDefinitionId : viewDefinitions) {
            configMaster.remove(viewDefinitionId);
            s_logger.debug("View definition {} discarded for {}/{}", new Object[]{viewDefinitionId, userName, identifier.getValue()});
          }
          iterator.remove();
        }
      }
View Full Code Here

      }
    }
  }

  private void removeUserViewDefinitions(final String userName, final String clientName) {
    ConfigMaster configMaster = getServices().getConfigMaster();
    if (configMaster != null) {
      Set<ObjectId> viewDefinitions = _viewDefinitionIds.remove(ExternalId.of(userName, clientName));
      for (ObjectId viewDefinitionId : viewDefinitions) {
        configMaster.remove(viewDefinitionId);
        s_logger.debug("View definition {} discarded for {}/{}", new Object[]{viewDefinitionId, userName, clientName});
      }
    }
  }
View Full Code Here

  private boolean _curveCalculationConfiguration;

  //-------------------------------------------------------------------------
  @Override
  public void afterPropertiesSet() {
    final ConfigMaster cm = getConfigMaster();
    ArgumentChecker.notNull(cm, "ConfigMaster");

    if (isYieldCurve()) {
      new YieldCurveConfigPopulator(cm);
    }
View Full Code Here

@Scriptable
public class ExampleCurveAndSurfaceDefinitionLoader extends AbstractTool<ToolContext> {

  @Override
  protected void doRun() throws Exception {
    final ConfigMaster configMaster = getToolContext().getConfigMaster();
    final Map<UnorderedCurrencyPair, String> fxSurfaces = new HashMap<>();
    for (final UnorderedCurrencyPair pair : ExampleVanillaFxOptionPortfolioLoader.CCYS) {
      fxSurfaces.put(pair, "DEFAULT");
    }
    final Map<Currency, String> swaptionSurfaces = new HashMap<>();
View Full Code Here

  }

  private void loadCurrencyConfiguration() {
    final Log log = new Log("Loading currency reference data");
    try {
      final ConfigMaster configMaster = getToolContext().getConfigMaster();
      CurrencyPairsConfigPopulator.populateCurrencyPairsConfigMaster(configMaster);
      CurrencyMatrixConfigPopulator.populateCurrencyMatrixConfigMaster(configMaster);
      log.done();
    } catch (final RuntimeException t) {
      log.fail(t);
View Full Code Here

  //-------------------------------------------------------------------------
  @Override
  protected void doRun() {
    ToolContext toolContext = getToolContext();
    ConfigMaster configMaster = toolContext.getConfigMaster();

    CommandLine commandLine = getCommandLine();
    final String name = commandLine.getOptionValue("name", WILDCARD_SEARCH);
    final boolean dryRun = commandLine.hasOption("do-not-persist");
    final boolean skipExisting = commandLine.hasOption("skip");
View Full Code Here

   *
   * @param name the pattern to match securities
   * @param dryRun set to true to not write to the database
   */
  private void createSurfaces(String name, boolean dryRun) {
    ConfigMaster configMaster = getToolContext().getConfigMaster();
    SecurityMaster securityMaster = getToolContext().getSecurityMaster();
    ReferenceDataProvider bbgRefData = getToolContext().getBloombergReferenceDataProvider();

    SecuritySearchRequest securityRequest = new SecuritySearchRequest();
    securityRequest.setName(name);
View Full Code Here

TOP

Related Classes of com.opengamma.master.config.ConfigMaster

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.