19 package org.sleuthkit.autopsy.texttranslation;
21 import java.util.Collection;
22 import java.util.Collections;
23 import java.util.Optional;
24 import org.openide.util.Lookup;
26 import javax.annotation.concurrent.GuardedBy;
36 private final Collection<? extends TextTranslator>
translators;
44 updateSelectedTranslator();
55 synchronized void updateSelectedTranslator() {
58 if (translator.getName().equals(translatorName)) {
84 throw new NoServiceProviderException(
85 "Could not find a TextTranslator service provider");
97 TextTranslator getTranslatorByName(String translatorName)
throws NoServiceProviderException {
99 if (translator.getName().equals(translatorName)) {
103 throw new NoServiceProviderException(
104 "Could not find the specified TextTranslator service provider: " + translatorName);
112 Collection<? extends TextTranslator> getTranslators() {
113 return Collections.unmodifiableCollection(translators);
final Collection<?extends TextTranslator > translators
synchronized int getMaxTextChars()
static final TextTranslationService tts
static String getTextTranslatorName()
synchronized String translate(String input)
Optional< TextTranslator > selectedTranslator
static TextTranslationService getInstance()
synchronized boolean hasProvider()