@Test public void getElementName() { final Optional<String> elementName = tested.getElementName(UUID); assertTrue(elementName.isPresent()); assertEquals(NAME, elementName.get()); }
@Override public Optional<String> getElementName(final String uuid) { return getNameProvider(uuid) .map(nameProvider -> nameProvider.getElementName(uuid)) .orElse(Optional.of(defaultElementName(uuid))); }
ClientTranslationService extends AbstractTranslationService { @Override public Optional<String> getElementName(final String uuid) { return getNameProvider(uuid) .map(nameProvider -> nameProvider.getElementName(uuid)) .orElse(Optional.of(defaultElementName(uuid))); } }
ClientTranslationService extends AbstractTranslationService { @Override public Optional<String> getElementName(final String uuid) { return getNameProvider(uuid) .map(nameProvider -> nameProvider.getElementName(uuid)) .orElse(Optional.of(defaultElementName(uuid))); } @Inject  ClientTranslationService(final TranslationService erraiTranslationService,
                                    final ManagedInstance<DiagramElementNameProvider> elementNameProviders,
                                    final SessionManager sessionManager,
                                    final DefinitionUtils definitionUtils); }
ClientTranslationService extends AbstractTranslationService { @Override public Optional<String> getElementName(final String uuid) { return getNameProvider(uuid) .map(nameProvider -> nameProvider.getElementName(uuid)) .orElse(Optional.of(defaultElementName(uuid))); } @Inject  ClientTranslationService(final TranslationService erraiTranslationService,
                                    final ManagedInstance<DiagramElementNameProvider> elementNameProviders,
                                    final SessionManager sessionManager,
                                    final DefinitionUtils definitionUtils); @Override String getValue(final String key); String getNotNullValue(final String key); @Override String getValue(final String key,
                           final Object... args); @Override String getViolationMessage(final RuleViolation ruleViolation); @Override Optional<String> getElementName(final String uuid); }
ClientTranslationService extends AbstractTranslationService { @Override public Optional<String> getElementName(final String uuid) { return getNameProvider(uuid) .map(nameProvider -> nameProvider.getElementName(uuid)) .orElse(Optional.of(defaultElementName(uuid))); } @Inject  ClientTranslationService(final TranslationService erraiTranslationService,
                                    final ManagedInstance<DiagramElementNameProvider> elementNameProviders,
                                    final SessionManager sessionManager,
                                    final DefinitionUtils definitionUtils); @Override String getValue(final String key); String getNotNullValue(final String key); @Override String getValue(final String key,
                           final Object... args); @Override String getViolationMessage(final RuleViolation ruleViolation); @Override Optional<String> getElementName(final String uuid);  }