Package org.hibernate.ogm.util.configurationreader.impl

Examples of org.hibernate.ogm.util.configurationreader.impl.ConfigurationPropertyReader


  @Override
  public void configure(Map configurationValues) {
    OptionsService optionsService = serviceRegistry.getService( OptionsService.class );
    ClassLoaderService classLoaderService = serviceRegistry.getService( ClassLoaderService.class );
    ConfigurationPropertyReader propertyReader = new ConfigurationPropertyReader( configurationValues, classLoaderService );

    this.config = new MongoDBConfiguration( propertyReader, optionsService.context().getGlobalOptions() );
  }
View Full Code Here


   *
   * @param configurationMap
   *            The values to use as configuration
   */
  public void initConfiguration(Map configurationMap) {
    ConfigurationPropertyReader propertyReader = new ConfigurationPropertyReader( configurationMap );

    this.configUrl = propertyReader
        .property( InfinispanProperties.CONFIGURATION_RESOURCE_NAME, URL.class )
        .withDefault( InfinispanConfiguration.class.getClassLoader().getResource( INFINISPAN_DEFAULT_CONFIG ) )
        .getValue();

    this.jndi = propertyReader
        .property( InfinispanProperties.CACHE_MANAGER_JNDI_NAME, String.class )
        .getValue();

    log.tracef( "Initializing Infinispan from configuration file at %1$s", configUrl );
  }
View Full Code Here

   *
   * @see Environment
   * @param configurationMap The values to use as configuration
   */
  public void initialize(Map configurationMap) {
    this.url = new ConfigurationPropertyReader( configurationMap )
      .property( EhcacheProperties.CONFIGURATION_RESOURCE_NAME, URL.class )
      .withDefault( EhcacheConfiguration.class.getClassLoader().getResource( DEFAULT_CONFIG ) )
      .getValue();
  }
View Full Code Here

   *
   * @param configurationMap
   *            The values to use as configuration
   */
  public void initConfiguration(Map configurationMap) {
    ConfigurationPropertyReader propertyReader = new ConfigurationPropertyReader( configurationMap );

    this.configUrl = propertyReader
        .property( InfinispanProperties.CONFIGURATION_RESOURCE_NAME, URL.class )
        .withDefault( InfinispanConfiguration.class.getClassLoader().getResource( INFINISPAN_DEFAULT_CONFIG ) )
        .getValue();

    this.jndi = propertyReader
        .property( InfinispanProperties.CACHE_MANAGER_JNDI_NAME, String.class )
        .getValue();

    log.tracef( "Initializing Infinispan from configuration file at %1$s", configUrl );
  }
View Full Code Here

  }

  @Override
  public GridDialect initiateService(SessionFactoryImplementor sessionFactory, Configuration configuration, ServiceRegistryImplementor registry) {
    DatastoreProvider datastore = registry.getService( DatastoreProvider.class );
    ConfigurationPropertyReader propertyReader = new ConfigurationPropertyReader( configuration, registry.getService( ClassLoaderService.class ) );

    return propertyReader.property( OgmProperties.GRID_DIALECT, GridDialect.class )
        .instantiate()
        .withDefaultImplementation( registry.getService( DatastoreProvider.class ).getDefaultDialect() )
        .withInstantiator( new GridDialectInstantiator( datastore, registry.getService( EventListenerRegistry.class ) ) )
        .getValue();
  }
View Full Code Here

    return new JBossStandAloneJtaPlatform();
  }

  //TODO OGM-370 get rid of this!!!
  private boolean isNeo4j(Map configuration, ClassLoaderService classLoaderService) {
    DatastoreProvider configuredProvider = new ConfigurationPropertyReader( configuration, classLoaderService )
      .property( OgmProperties.DATASTORE_PROVIDER, DatastoreProvider.class )
      .instantiate()
      .withShortNameResolver( new DatastoreProviderInitiator.DatastoreProviderShortNameResolver() )
      .getValue();
View Full Code Here

  }

  @Override
  public void configure(Map configurationValues) {
    ClassLoaderService classLoaderService = registry.getService( ClassLoaderService.class );
    ConfigurationPropertyReader propertyReader = new ConfigurationPropertyReader( configurationValues, classLoaderService );

    sessionFactoryOptions = new OptionsServiceContextImpl( OptionValueSources.getDefaultSources( propertyReader ) );
  }
View Full Code Here

    return QueryParserService.class;
  }

  @Override
  public QueryParserService initiateService(SessionFactoryImplementor sessionFactory, Configuration configuration, ServiceRegistryImplementor registry) {
    ConfigurationPropertyReader propertyReader = new ConfigurationPropertyReader( configuration, registry.getService( ClassLoaderService.class ) );

    return propertyReader.property( InternalProperties.QUERY_PARSER_SERVICE, QueryParserService.class )
        .instantiate()
        .withDefaultImplementation( registry.getService( DatastoreProvider.class ).getDefaultQueryParserServiceType() )
        .getValue();
  }
View Full Code Here

    return DatastoreProvider.class;
  }

  @Override
  public DatastoreProvider initiateService(SessionFactoryImplementor sessionFactory, Configuration configuration, ServiceRegistryImplementor registry) {
    ConfigurationPropertyReader propertyReader = new ConfigurationPropertyReader( configuration, registry.getService( ClassLoaderService.class ) );

    DatastoreProvider datastoreProvider = propertyReader.property( OgmProperties.DATASTORE_PROVIDER, DatastoreProvider.class )
        .instantiate()
        .withDefaultImplementation( DEFAULT_DATASTORE_PROVIDER )
        .withShortNameResolver( DatastoreProviderShortNameResolver.INSTANCE )
        .getValue();
View Full Code Here

  @Override
  public void configure(Map configurationValues) {
    OptionsService optionsService = serviceRegistry.getService( OptionsService.class );
    ClassLoaderService classLoaderService = serviceRegistry.getService( ClassLoaderService.class );
    ConfigurationPropertyReader propertyReader = new ConfigurationPropertyReader( configurationValues, classLoaderService );

    this.config = new MongoDBConfiguration( propertyReader, optionsService.context().getGlobalOptions() );
  }
View Full Code Here

TOP

Related Classes of org.hibernate.ogm.util.configurationreader.impl.ConfigurationPropertyReader

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.