Interface StatisticsManager

All Known Implementing Classes:
CompositeStatisticsManager, EmptyStatisticsManager

public interface StatisticsManager
The manager allows to edit statistics by the project.
  • Method Details

    • getProject

      @NonNull org.eclipse.core.resources.IProject getProject()
      Gets the project to edit statistics.
      Returns:
      the project, cannot return null.
    • updateProjectStatistic

      void updateProjectStatistic(@NonNull Statistics statistics)
      Update project statistics.
      Parameters:
      statistics - the statistics, cannot be null.
    • updateProjectLanguageStatistic

      void updateProjectLanguageStatistic(@NonNull TranslateLanguage language, @NonNull Statistics statistics)
      Update project language statistics.
      Parameters:
      language - the language, cannot be null.
      statistics - the statistics, cannot be null.
    • updateFullStatistic

      default void updateFullStatistic(@NonNull TranslationSource source, @NonNull Statistics statistics)
      Update full statistics.
      Parameters:
      source - the translation source object, cannot be null.
      statistics - the statistics, cannot be null.
    • updateFullStatistic

      void updateFullStatistic(@NonNull org.eclipse.core.runtime.IPath path, @NonNull Statistics statistics)
      Update full statistics.
      Parameters:
      path - the translation source path, cannot be null.
      statistics - the statistics that may contain all data for each languages, or absent data for all languages will be cleaned. Cannot be null.
    • updateLanguageStatistic

      default void updateLanguageStatistic(@NonNull TranslationSource source, @NonNull TranslateLanguage language, @NonNull Statistics statistics)
      Update statistics.
      Parameters:
      source - the translation source object, cannot be null.
      language - the language, cannot be null.
      statistics - the statistics, cannot be null.
    • updateLanguageStatistic

      void updateLanguageStatistic(@NonNull org.eclipse.core.runtime.IPath path, @NonNull TranslateLanguage language, @NonNull Statistics statistics)
      Update statistics.
      Parameters:
      source - the translation source path, cannot be null.
      language - the language, cannot be null.
    • removeStatistic

      void removeStatistic()
      Remove all statistics in this manager for all sources and all languages
    • removeStatistic

      void removeStatistic(@NonNull TranslateLanguage language)
      Remove statistics for given language.
      Parameters:
      language - the language, cannot be null.
    • removeStatistic

      default void removeStatistic(@NonNull TranslationSource source)
      Remove statistics for given TranslationSource for all TranslationLanguages.
      Parameters:
      source - the source, cannot be null.
    • removeStatistic

      void removeStatistic(org.eclipse.core.runtime.IPath path)
      Remove statistics for given path of TranslationSource for all TranslationLanguages.
      Parameters:
      path - the path, cannot be null.
    • removeStatistic

      default void removeStatistic(@NonNull TranslationSource source, @NonNull TranslateLanguage language)
      Remove statistics for given TranslationSource and TranslationLanguage.
      Parameters:
      source - the source, cannot be null.
      language - the language, cannot be null.
    • removeStatistic

      void removeStatistic(@NonNull org.eclipse.core.runtime.IPath path, @NonNull TranslateLanguage language)
      Remove statistics for given path of TranslationSource and TranslationLanguage.
      Parameters:
      path - the path, cannot be null.
      language - the language, cannot be null.
    • startRecomputeFullStatistic

      void startRecomputeFullStatistic()
      Recompute full statistics.
    • exportStatistics

      void exportStatistics(Path path, String type) throws IOException
      Exports statistics to an external file in the specified format.
      Parameters:
      path - the path to the file where the statistics will be exported, cannot be null.
      type - the statistics type, cannot be null
      Throws:
      IOException - Signals that an I/O exception has occurred.