/*
 * Copyright 2011-2015 B2i Healthcare Pte Ltd, http://b2i.sg
 * 
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package com.b2international.snowowl.snomed.datastore.internal.boot;

import org.eclipse.core.runtime.IProgressMonitor;

import com.b2international.snowowl.core.config.SnowOwlConfiguration;
import com.b2international.snowowl.core.setup.BootstrapFragment;
import com.b2international.snowowl.core.setup.Environment;
import com.b2international.snowowl.snomed.datastore.id.ISnomedIdentifierService;
import com.b2international.snowowl.snomed.datastore.internal.id.SnomedIdentifierServiceImpl;

/**
 * @since 4.0
 */
public class SnomedDatastoreBootstrap implements BootstrapFragment {

	@Override
	public void init(SnowOwlConfiguration configuration, Environment env) throws Exception {
		env.services().registerService(ISnomedIdentifierService.class, new SnomedIdentifierServiceImpl());
	}

	@Override
	public void run(SnowOwlConfiguration configuration, Environment env, IProgressMonitor monitor) throws Exception {
	}

}

@@ -1095,249 +1095,682 @@
 re.i
-nternal.id.SnomedIdentifierServiceImpl;%0D%0A%0D%0A/**%0D%0A * @since 4.0%0D%0A */%0D%0Apublic class SnomedDatastoreBootstrap implements BootstrapFragment %7B%0D%0A%0D%0A%09@Override%0D%0A%09public void init(SnowOwlConfiguration configuration, Environment env) throws Exception %7B
+d.reservations.ISnomedIdentiferReservationService;%0D%0Aimport com.b2international.snowowl.snomed.datastore.internal.id.SnomedIdentifierServiceImpl;%0D%0Aimport com.b2international.snowowl.snomed.datastore.internal.id.reservations.SnomedIdentifierReservationServiceImpl;%0D%0A%0D%0A/**%0D%0A * @since 4.0%0D%0A */%0D%0Apublic class SnomedDatastoreBootstrap implements BootstrapFragment %7B%0D%0A%0D%0A%09@Override%0D%0A%09public void init(SnowOwlConfiguration configuration, Environment env) throws Exception %7B%0D%0A%09%09final ISnomedIdentiferReservationService reservationService = new SnomedIdentifierReservationServiceImpl();%0D%0A%09%09final ISnomedIdentifierService idService = new SnomedIdentifierServiceImpl(reservationService);
 %0D%0A%09%09
@@ -1810,27 +1810,37 @@
 nomedIdentif
-i
 er
+Reservation
 Service.clas
@@ -1842,20 +1842,72 @@
 .class, 
-new 
+reservationService);%0D%0A%09%09env.services().registerService(I
 SnomedId
@@ -1921,22 +1921,33 @@
 rService
-Impl()
+.class, idService
 );%0D%0A%09%7D%0D%0A

update snomed.datastore bootstrap.