All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.opentcs.customizations.plantoverview.PlantOverviewInjectionModule Maven / Gradle / Ivy

// SPDX-FileCopyrightText: The openTCS Authors
// SPDX-License-Identifier: MIT
package org.opentcs.customizations.plantoverview;

import com.google.inject.multibindings.Multibinder;
import org.opentcs.components.plantoverview.ObjectHistoryEntryFormatter;
import org.opentcs.components.plantoverview.OrderTypeSuggestions;
import org.opentcs.components.plantoverview.PlantModelExporter;
import org.opentcs.components.plantoverview.PlantModelImporter;
import org.opentcs.components.plantoverview.PluggablePanelFactory;
import org.opentcs.components.plantoverview.PropertySuggestions;
import org.opentcs.customizations.ConfigurableInjectionModule;

/**
 * A base class for Guice modules adding or customizing bindings for the plant overview application.
 */
public abstract class PlantOverviewInjectionModule
    extends
      ConfigurableInjectionModule {

  /**
   * Returns a multibinder that can be used to register plant model importers.
   *
   * @return The multibinder.
   */
  protected Multibinder plantModelImporterBinder() {
    return Multibinder.newSetBinder(binder(), PlantModelImporter.class);
  }

  /**
   * Returns a multibinder that can be used to register plant model exporters.
   *
   * @return The multibinder.
   */
  protected Multibinder plantModelExporterBinder() {
    return Multibinder.newSetBinder(binder(), PlantModelExporter.class);
  }

  /**
   * Returns a multibinder that can be used to register factories for pluggable panels.
   *
   * @return The multibinder.
   */
  protected Multibinder pluggablePanelFactoryBinder() {
    return Multibinder.newSetBinder(binder(), PluggablePanelFactory.class);
  }

  /**
   * Returns a multibinder that can be used to register classes that provide suggested properties.
   *
   * @return The multibinder.
   */
  protected Multibinder propertySuggestionsBinder() {
    return Multibinder.newSetBinder(binder(), PropertySuggestions.class);
  }

  /**
   * Returns a multibinder that can be used to register classes that provide suggested order types.
   *
   * @return The multibinder.
   */
  protected Multibinder orderTypeSuggestionsBinder() {
    return Multibinder.newSetBinder(binder(), OrderTypeSuggestions.class);
  }

  /**
   * Returns a multibinder that can be used to register {@link ObjectHistoryEntryFormatter}s.
   *
   * @return The multibinder.
   */
  protected Multibinder objectHistoryEntryFormatterBinder() {
    return Multibinder.newSetBinder(binder(), ObjectHistoryEntryFormatter.class);
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy