Java Code Examples for io.pivotal.cfenv.core.CfService#existsByTagIgnoreCase()

The following examples show how to use io.pivotal.cfenv.core.CfService#existsByTagIgnoreCase() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: DB2JdbcUrlCreator.java    From java-cfenv with Apache License 2.0 5 votes vote down vote up
@Override
public boolean isDatabaseService(CfService cfService) {
	if (jdbcUrlMatchesScheme(cfService, DB2_SCHEME)
			|| cfService.existsByTagIgnoreCase(DB2_TAGS)
			|| cfService.existsByLabelStartsWith(DB2_LABEL)
			|| cfService.existsByUriSchemeStartsWith(DB2_SCHEME)
			|| cfService.existsByCredentialsContainsUriField(DB2_SCHEME)) {
		return true;
	}
	return false;
}
 
Example 2
Source File: PostgresqlJdbcUrlCreator.java    From java-cfenv with Apache License 2.0 5 votes vote down vote up
@Override
public boolean isDatabaseService(CfService cfService) {
	if (jdbcUrlMatchesScheme(cfService, POSTGRESQL_SCHEME, POSTGRES_JDBC_SCHEME)
			|| cfService.existsByTagIgnoreCase(POSTGRESQL_TAG)
			|| cfService.existsByLabelStartsWith(POSTGRESQL_LABEL)
			|| cfService.existsByUriSchemeStartsWith(POSTGRESQL_SCHEME)
			|| cfService.existsByCredentialsContainsUriField(POSTGRESQL_SCHEME)) {
		return true;
	}
	return false;
}
 
Example 3
Source File: MySqlJdbcUrlCreator.java    From java-cfenv with Apache License 2.0 5 votes vote down vote up
@Override
public boolean isDatabaseService(CfService cfService) {
	if (jdbcUrlMatchesScheme(cfService, MYSQL_SCHEME)
			|| cfService.existsByTagIgnoreCase(MYSQL_TAG)
			|| cfService.existsByLabelStartsWith(MYSQL_LABEL)
			|| cfService.existsByUriSchemeStartsWith(MYSQL_SCHEME)
			|| cfService.existsByCredentialsContainsUriField(MYSQL_SCHEME)) {
		return true;
	}
	return false;
}
 
Example 4
Source File: RedisCfEnvProcessor.java    From java-cfenv with Apache License 2.0 5 votes vote down vote up
@Override
public boolean accept(CfService service) {
	boolean serviceIsBound = service.existsByTagIgnoreCase("redis") ||
			service.existsByLabelStartsWith("rediscloud") ||
			service.existsByUriSchemeStartsWith(redisSchemes) ||
			service.existsByCredentialsContainsUriField(redisSchemes);
	if (serviceIsBound) {
		ConnectorLibraryDetector.assertNoConnectorLibrary();
	}
	return serviceIsBound;
}
 
Example 5
Source File: MongoCfEnvProcessor.java    From java-cfenv with Apache License 2.0 5 votes vote down vote up
@Override
public boolean accept(CfService service) {
	boolean serviceIsBound = service.existsByTagIgnoreCase("mongodb") ||
			service.existsByLabelStartsWith("mongolab") ||
			service.existsByUriSchemeStartsWith(mongoScheme) ||
			service.existsByCredentialsContainsUriField(mongoScheme);
	if (serviceIsBound) {
		ConnectorLibraryDetector.assertNoConnectorLibrary();
	}
	return serviceIsBound;
}
 
Example 6
Source File: CassandraCfEnvProcessor.java    From java-cfenv with Apache License 2.0 5 votes vote down vote up
@Override
public boolean accept(CfService service) {
	boolean serviceIsBound = service.existsByTagIgnoreCase("cassandra") &&
			cassandraCredentialsPresent(service.getCredentials().getMap());
	if (serviceIsBound) {
		ConnectorLibraryDetector.assertNoConnectorLibrary();
	}
	return serviceIsBound;
}
 
Example 7
Source File: AmqpCfEnvProcessor.java    From java-cfenv with Apache License 2.0 5 votes vote down vote up
@Override
public boolean accept(CfService service) {
	boolean serviceIsBound = service.existsByTagIgnoreCase("rabbitmq", "amqp") ||
			service.existsByLabelStartsWith("rabbitmq") ||
			service.existsByLabelStartsWith("cloudamqp") ||
			service.existsByUriSchemeStartsWith(amqpSchemes) ||
			service.existsByCredentialsContainsUriField(amqpSchemes);
	if (serviceIsBound) {
		ConnectorLibraryDetector.assertNoConnectorLibrary();
	}
	return serviceIsBound;
}
 
Example 8
Source File: CfSpringCloudConfigClientProcessor.java    From java-cfenv with Apache License 2.0 4 votes vote down vote up
@Override
public boolean accept(CfService service) {
	return service.existsByTagIgnoreCase("configuration");
}
 
Example 9
Source File: CfEurekaClientProcessor.java    From java-cfenv with Apache License 2.0 4 votes vote down vote up
@Override
public boolean accept(CfService service) {
    return service.existsByTagIgnoreCase("eureka");
}
 
Example 10
Source File: CredHubCfEnvProcessor.java    From java-cfenv with Apache License 2.0 4 votes vote down vote up
@Override
public boolean accept(CfService service) {
	return service.existsByTagIgnoreCase("credhub") ||
			service.existsByLabelStartsWith("credhub");
}