@Test public void testLocateExternalResourceNameWhenEnabledAndWithoutSql() { assertInitialState(); registry.set(CollectionSettingNames.CS_QUERY_EXRTERNAL_RESOURCE_NAME, Boolean.TRUE); Operation op = createJdbcOperation("jdbc:foobar: op.type(JdbcOperationExternalResourceAnalyzer.TYPE); Frame frame = createJdbcFrame(op); Trace trace = createJdbcTrace(frame); Collection<ExternalResourceDescriptor> resources = locateExternalResourceName(trace); assertNotNull("external resource descriptors list", resources); assertEquals("total external resource descriptors", 1, resources.size()); ExternalResourceDescriptor firstDescriptor = ListUtil.getFirstMember(resources); ExternalResourceType type = ExternalResourceType.valueOf(firstDescriptor.getType()); assertSame("first descriptor type", ExternalResourceType.DATABASE, type); assertFalse("first descriptor is a parent", firstDescriptor.isParent()); assertTrue(trace.getAppName() + "is known", generator.isApplicationNameKnown(trace.getAppName())); }
public boolean isApplicationNameKnown(ApplicationName appName) { return knownApps.contains(appName); }
JdbcQueryExternalResourceGenerator extends AbstractLoggingClass implements CollectionSettingsUpdateListener { public boolean isApplicationNameKnown(ApplicationName appName) { return knownApps.contains(appName); } }
JdbcQueryExternalResourceGenerator extends AbstractLoggingClass implements CollectionSettingsUpdateListener { public boolean isApplicationNameKnown(ApplicationName appName) { return knownApps.contains(appName); } private  JdbcQueryExternalResourceGenerator();   JdbcQueryExternalResourceGenerator(CollectionSettingsRegistry reg); }
JdbcQueryExternalResourceGenerator extends AbstractLoggingClass implements CollectionSettingsUpdateListener { public boolean isApplicationNameKnown(ApplicationName appName) { return knownApps.contains(appName); } private  JdbcQueryExternalResourceGenerator();   JdbcQueryExternalResourceGenerator(CollectionSettingsRegistry reg); static final JdbcQueryExternalResourceGenerator getInstance(); Collection<ExternalResourceDescriptor> createAndAddQueryExternalResourceDescriptors(Collection<ExternalResourceDescriptor> dbDescriptors, Trace trace); final void incrementalUpdate(CollectionSettingName name, Serializable value); static String extractSqlFromOperation(Operation op); boolean isGeneratingExternalResources(); boolean isGeneratingExternalResourceForApplication(ApplicationName appName); Collection<ApplicationName> getDisabledApplicationNames(); Collection<ApplicationName> getKnownApplicationNames(); boolean isApplicationNameKnown(ApplicationName appName); }
JdbcQueryExternalResourceGenerator extends AbstractLoggingClass implements CollectionSettingsUpdateListener { public boolean isApplicationNameKnown(ApplicationName appName) { return knownApps.contains(appName); } private  JdbcQueryExternalResourceGenerator();   JdbcQueryExternalResourceGenerator(CollectionSettingsRegistry reg); static final JdbcQueryExternalResourceGenerator getInstance(); Collection<ExternalResourceDescriptor> createAndAddQueryExternalResourceDescriptors(Collection<ExternalResourceDescriptor> dbDescriptors, Trace trace); final void incrementalUpdate(CollectionSettingName name, Serializable value); static String extractSqlFromOperation(Operation op); boolean isGeneratingExternalResources(); boolean isGeneratingExternalResourceForApplication(ApplicationName appName); Collection<ApplicationName> getDisabledApplicationNames(); Collection<ApplicationName> getKnownApplicationNames(); boolean isApplicationNameKnown(ApplicationName appName);  }