ExampleWizardModule.java 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. /**
  2. * Copyright (c) 2016 committers of YAKINDU and others.
  3. * All rights reserved. This program and the accompanying materials
  4. * are made available under the terms of the Eclipse Public License v1.0
  5. * which accompanies this distribution, and is available at
  6. * http://www.eclipse.org/legal/epl-v10.html
  7. * Contributors:
  8. * committers of YAKINDU - initial API and implementation
  9. *
  10. */
  11. package org.yakindu.sct.examples.wizard.service;
  12. import org.yakindu.sct.examples.wizard.service.git.GitRepositoryExampleService;
  13. import org.yakindu.sct.examples.wizard.service.git.IExampleDataReader;
  14. import org.yakindu.sct.examples.wizard.service.git.JsonMetaDataReader;
  15. import com.google.inject.Binder;
  16. import com.google.inject.Module;
  17. import com.google.inject.name.Names;
  18. /**
  19. *
  20. * @author andreas muelder - Initial contribution and API
  21. *
  22. */
  23. public class ExampleWizardModule implements Module {
  24. public static final String REPOSITORY_URL = "repository_url";
  25. @Override
  26. public void configure(Binder binder) {
  27. binder.bind(IExampleService.class).to(GitRepositoryExampleService.class);
  28. binder.bindConstant().annotatedWith(Names.named(REPOSITORY_URL)).to("https://github.com/Yakindu/examples");
  29. binder.bind(IExampleDataReader.class).to(JsonMetaDataReader.class);
  30. }
  31. }