@Test public void testLoadEntityMetadataAsync_failure() throws InterruptedException, IOException { handler.addRequest(false, "GET", "/qcbin/rest/domains/domain/projects/project/customization/entities/non-existing-type/fields", 404); handler.async(); metadataService.loadEntityMetadataAsync("non-existing-type", new MetadataService.MetadataCallback() { @Override public void metadataLoaded(final Metadata metadata) { handler.fail("Should have failed for wrong entity type"); } @Override public void metadataFailed() { handler.done(); } }); }
public void loadEntityMetadataAsync(String entityName, MetadataCallback callback) { getValueAsync(entityName, Proxy.create(callback)); }
MetadataService extends AbstractCachingService<String, Metadata, AbstractCachingService.Callback<Metadata>> { public void loadEntityMetadataAsync(String entityName, MetadataCallback callback) { getValueAsync(entityName, Proxy.create(callback)); } }
MetadataService extends AbstractCachingService<String, Metadata, AbstractCachingService.Callback<Metadata>> { public void loadEntityMetadataAsync(String entityName, MetadataCallback callback) { getValueAsync(entityName, Proxy.create(callback)); } MetadataService(Project project, MetadataSimpleService metadataService, RestService restService); }
MetadataService extends AbstractCachingService<String, Metadata, AbstractCachingService.Callback<Metadata>> { public void loadEntityMetadataAsync(String entityName, MetadataCallback callback) { getValueAsync(entityName, Proxy.create(callback)); } MetadataService(Project project, MetadataSimpleService metadataService, RestService restService); Metadata getEntityMetadata(String entityName); void loadEntityMetadataAsync(String entityName, MetadataCallback callback); Metadata getCachedEntityMetadata(String entityType); Exception getCachedFailure(String entityType); }
MetadataService extends AbstractCachingService<String, Metadata, AbstractCachingService.Callback<Metadata>> { public void loadEntityMetadataAsync(String entityName, MetadataCallback callback) { getValueAsync(entityName, Proxy.create(callback)); } MetadataService(Project project, MetadataSimpleService metadataService, RestService restService); Metadata getEntityMetadata(String entityName); void loadEntityMetadataAsync(String entityName, MetadataCallback callback); Metadata getCachedEntityMetadata(String entityType); Exception getCachedFailure(String entityType);  }