@Test void testGetAllMessageIds() { when(dataService.findAll(L10N_STRING, L10nString.class)) .thenReturn(Stream.of(enPlusNl, nlOnly)); when(enPlusNl.getMessageID()).thenReturn("A"); when(nlOnly.getMessageID()).thenReturn("B"); assertEquals(asList("A", "B"), localizationService.getAllMessageIds()); }
public List<String> getAllMessageIds() { return dataService .findAll(L10N_STRING, L10nString.class) .map(L10nString::getMessageID) .collect(toList()); }
LocalizationService implements MessageResolution { public List<String> getAllMessageIds() { return dataService .findAll(L10N_STRING, L10nString.class) .map(L10nString::getMessageID) .collect(toList()); } }
LocalizationService implements MessageResolution { public List<String> getAllMessageIds() { return dataService .findAll(L10N_STRING, L10nString.class) .map(L10nString::getMessageID) .collect(toList()); } LocalizationService(DataService dataService, L10nStringFactory l10nStringFactory); }
LocalizationService implements MessageResolution { public List<String> getAllMessageIds() { return dataService .findAll(L10N_STRING, L10nString.class) .map(L10nString::getMessageID) .collect(toList()); } LocalizationService(DataService dataService, L10nStringFactory l10nStringFactory); @Override @RunAsSystem String resolveCodeWithoutArguments(String code, Locale locale); @RunAsSystem Map<String, String> getMessages(String namespace, Locale locale); List<String> getAllMessageIds(); Stream<L10nString> getExistingMessages(String namespace, Set<String> messageIds); @Transactional void addMissingMessageIds(String namespace, Set<String> messageIDs); @Transactional void deleteNamespace(String namespace); void store(Collection<L10nString> toUpdate, Collection<L10nString> toAdd); }
LocalizationService implements MessageResolution { public List<String> getAllMessageIds() { return dataService .findAll(L10N_STRING, L10nString.class) .map(L10nString::getMessageID) .collect(toList()); } LocalizationService(DataService dataService, L10nStringFactory l10nStringFactory); @Override @RunAsSystem String resolveCodeWithoutArguments(String code, Locale locale); @RunAsSystem Map<String, String> getMessages(String namespace, Locale locale); List<String> getAllMessageIds(); Stream<L10nString> getExistingMessages(String namespace, Set<String> messageIds); @Transactional void addMissingMessageIds(String namespace, Set<String> messageIDs); @Transactional void deleteNamespace(String namespace); void store(Collection<L10nString> toUpdate, Collection<L10nString> toAdd);  }