Class ExportTranslationStatisticsApi

java.lang.Object
com.e1c.langtool.v8.dt.cli.api.impl.ExportTranslationStatisticsApi
All Implemented Interfaces:
IExportTranslationStatisticsApi

public class ExportTranslationStatisticsApi extends Object implements IExportTranslationStatisticsApi
Provides an API to export translation statistics for a given project to a specified location. This class extends AbstractImportProjectOperation and implements IExportTranslationStatisticsApi, indicating its role in handling project-specific operations related to the export of translation statistics. The operation leverages the StatisticsService to gather and processes statistical data, which is then exported to a designated file or directory.
  • Constructor Details

    • ExportTranslationStatisticsApi

      public ExportTranslationStatisticsApi()
  • Method Details

    • exportTranslationStatistics

      public void exportTranslationStatistics(org.eclipse.core.resources.IProject project, Path statisticsLocation, String statisticType) throws TranslationCliApiException
      Exports the translation statistics for the specified project to a given location. This method utilizes the StatisticsService to obtain statistical data about translations within the project and then writes this data to the specified path. The format and the specific data included in the export can vary based on the implementation details of StatisticsService.
      Specified by:
      exportTranslationStatistics in interface IExportTranslationStatisticsApi
      Parameters:
      project - The IProject for which translation statistics are to be exported. Must not be null.
      statisticsLocation - The Path where the exported statistics should be saved. This could be a path to a file or a directory, depending on the implementation. Must not be null.
      statisticType - the statistic type, cannot be null
      Throws:
      TranslationCliApiException - if there are issues accessing the project's data, writing to the specified location, or if any other unexpected problems occur during the export process. This custom exception should encapsulate errors specific to the export operation and provide meaningful information to the caller.