@Test public void testGetReferenceTranslator_caches() throws Throwable { doTestGetReferenceTranslator(true); handler.checkpoint(); Translator translator = translateService.getReferenceTranslator("defect"); String value = translator.translate("86", new ValueCallback() { @Override public void value(String value) { Assert.fail("Not expected"); } }); Assert.assertEquals("somewhat", value); }
public Translator getReferenceTranslator(String targetType) { return new EntityReferenceTranslator(project, targetType, cache); }
TranslateService implements ServerTypeListener { public Translator getReferenceTranslator(String targetType) { return new EntityReferenceTranslator(project, targetType, cache); } }
TranslateService implements ServerTypeListener { public Translator getReferenceTranslator(String targetType) { return new EntityReferenceTranslator(project, targetType, cache); } TranslateService(Project project, RestService restService); }
TranslateService implements ServerTypeListener { public Translator getReferenceTranslator(String targetType) { return new EntityReferenceTranslator(project, targetType, cache); } TranslateService(Project project, RestService restService); boolean isTranslated(Field field); String convertQueryModelToREST(Field field, String value); String convertQueryModelToView(Field field, String value, ValueCallback callback); FilterResolver getFilterResolver(Field field); Translator getTranslator(Field field); Translator getReferenceTranslator(String targetType); String translateAsync(Field field, final String value, boolean syncCall, final ValueCallback onValue); String translateAsync(Translator translator, final String value, boolean syncCall, final ValueCallback onValue); @Override void connectedTo(ServerType serverType); }
TranslateService implements ServerTypeListener { public Translator getReferenceTranslator(String targetType) { return new EntityReferenceTranslator(project, targetType, cache); } TranslateService(Project project, RestService restService); boolean isTranslated(Field field); String convertQueryModelToREST(Field field, String value); String convertQueryModelToView(Field field, String value, ValueCallback callback); FilterResolver getFilterResolver(Field field); Translator getTranslator(Field field); Translator getReferenceTranslator(String targetType); String translateAsync(Field field, final String value, boolean syncCall, final ValueCallback onValue); String translateAsync(Translator translator, final String value, boolean syncCall, final ValueCallback onValue); @Override void connectedTo(ServerType serverType); static final String LOADING_MESSAGE; static final String NA_TOKEN; }