Package com.e1c.langtool.internal.stat
Class StatisticsServiceImpl
java.lang.Object
com.e1c.langtool.internal.stat.StatisticsServiceImpl
- All Implemented Interfaces:
IManagedService,StatisticsService
-
Field Summary
Fields inherited from interface com.e1c.langtool.stat.StatisticsService
FAMILY_JOB_NAME -
Constructor Summary
ConstructorsConstructorDescriptionStatisticsServiceImpl(ITranslatingProjectManager translatingProjectManager, ICollectingCacheManager collectingCacheManager, ITranslationStorageManager storageManager, ComputerEngine engine, GroupProviderRegistry groupProviderRegistryImpl, StatisticsComputerRegistry computerRegistry, IExporterRegistry exporterRegistry) Constructs a newStatisticsServiceImplinstance, initializing it with the necessary managers, registries, and engine components required for its operation. -
Method Summary
Modifier and TypeMethodDescriptionvoidactivate()voidAdds the statistics change listener.void@NonNull Collection<GroupProvider>Provider of group statistics.getManager(org.eclipse.core.resources.IProject project) The manager manages the service.Returns all registered metrics.getProvider(org.eclipse.core.resources.IProject project) Provider of project statistics.voidRemoves the statistics change listener.
-
Constructor Details
-
StatisticsServiceImpl
@Inject public StatisticsServiceImpl(ITranslatingProjectManager translatingProjectManager, ICollectingCacheManager collectingCacheManager, ITranslationStorageManager storageManager, ComputerEngine engine, GroupProviderRegistry groupProviderRegistryImpl, StatisticsComputerRegistry computerRegistry, IExporterRegistry exporterRegistry) Constructs a newStatisticsServiceImplinstance, initializing it with the necessary managers, registries, and engine components required for its operation. This service is responsible for managing statistics related to translating projects, including data collection, storage, and export.- Parameters:
translatingProjectManager- the manager responsible for handling translating projects. It provides functionalities to manage and access project-specific translations, cannot benull.collectingCacheManager- the manager responsible for handling the caching of data collected during the translation process. This can include caching translations, user actions, or other relevant data for quick access and efficiency, cannot benull.storageManager- the manager responsible for handling the storage of translations and related data. It ensures that translations and other critical data are persistently stored and retrievable, cannot benull.engine- the computer engine used for performing complex computations or processing tasks related to the statistics of translating projects, cannot benull.groupProviderRegistryImpl- the registry containing group providers. Group providers are responsible for categorizing data into meaningful groups for analysis or reporting.computerRegistry- the registry of computers (or calculators) responsible for computing statistics based on collected and stored data, cannot benull.exporterRegistry- the registry responsible for managing exporters. Exporters are used to export the computed statistics into various formats for reporting or analysis purposes, cannot benull.
-
-
Method Details
-
activate
public void activate()- Specified by:
activatein interfaceIManagedService
-
deactivate
public void deactivate()- Specified by:
deactivatein interfaceIManagedService
-
getProvider
Description copied from interface:StatisticsServiceProvider of project statistics.- Specified by:
getProviderin interfaceStatisticsService- Parameters:
project- the project, cannot returnnull.- Returns:
- the provider
-
addStatisticChangeListener
Description copied from interface:StatisticsServiceAdds the statistics change listener.- Specified by:
addStatisticChangeListenerin interfaceStatisticsService- Parameters:
l- the listener
-
removeStatisticChangeListener
Description copied from interface:StatisticsServiceRemoves the statistics change listener.- Specified by:
removeStatisticChangeListenerin interfaceStatisticsService- Parameters:
l- the listener
-
getManager
Description copied from interface:StatisticsServiceThe manager manages the service.- Specified by:
getManagerin interfaceStatisticsService- Parameters:
project- the project, cannot returnnull.- Returns:
- the manager
-
getMetrics
Description copied from interface:StatisticsServiceReturns all registered metrics.- Specified by:
getMetricsin interfaceStatisticsService- Returns:
- collection of metrics, cannot return
null.
-
getGroupProviders
Description copied from interface:StatisticsServiceProvider of group statistics.- Specified by:
getGroupProvidersin interfaceStatisticsService- Returns:
- the group provider
-