public class VcapPropertySource
extends org.springframework.core.env.PropertySource<org.springframework.core.env.EnumerablePropertySource<?>>
implements java.lang.Iterable<java.lang.String>
VcapPropertySource class is a Spring PropertySource to process
VCAP environment properties in Pivotal CloudFoundry.Iterable,
URL,
Properties,
Predicate,
ConfigurableEnvironment,
EnumerablePropertySource,
Environment,
PropertiesPropertySource,
PropertySource,
CloudCacheService,
Service,
User| Modifier and Type | Method and Description |
|---|---|
protected java.util.Set<java.lang.String> |
findAllPropertiesByNameMatching(java.lang.Iterable<java.lang.String> properties,
java.util.function.Predicate<java.lang.String> predicate) |
protected java.util.Set<java.lang.String> |
findAllPropertiesByNameMatching(java.util.function.Predicate<java.lang.String> predicate) |
protected java.util.Set<java.lang.String> |
findAllPropertiesByValueMatching(java.lang.Iterable<java.lang.String> properties,
java.util.function.Predicate<java.lang.Object> predicate) |
protected java.util.Set<java.lang.String> |
findAllPropertiesByValueMatching(java.util.function.Predicate<java.lang.Object> predicate) |
java.util.Set<java.lang.String> |
findAllVcapApplicationProperties() |
java.util.Set<java.lang.String> |
findAllVcapServicesProperties() |
java.util.Optional<CloudCacheService> |
findFirstCloudCacheService() |
java.util.Optional<java.lang.String> |
findFirstCloudCacheServiceName() |
java.util.Optional<User> |
findFirstUserByRoleClusterOperator(Service service) |
java.util.Set<java.lang.String> |
findTargetVcapServiceProperties(java.util.function.Predicate<java.lang.String> vcapServicePropertiesPredicate) |
java.util.Optional<User> |
findUserByName(Service service,
java.lang.String targetUsername) |
static VcapPropertySource |
from(org.springframework.core.env.Environment environment) |
static VcapPropertySource |
from(java.util.Properties properties) |
static VcapPropertySource |
from(org.springframework.core.env.PropertySource<?> propertySource) |
java.lang.Object |
getProperty(java.lang.String name) |
protected java.util.function.Predicate<java.lang.String> |
getVcapServicePredicate() |
java.util.Iterator<java.lang.String> |
iterator() |
CloudCacheService |
requireFirstCloudCacheService() |
java.lang.String |
requireFirstCloudCacheServiceName() |
VcapPropertySource |
withVcapServiceName(java.lang.String serviceName) |
VcapPropertySource |
withVcapServicePredicate(java.util.function.Predicate<java.lang.String> vcapServicePredicate) |
containsProperty, equals, getName, getSource, hashCode, named, toStringpublic static VcapPropertySource from(org.springframework.core.env.Environment environment)
public static VcapPropertySource from(java.util.Properties properties)
public static VcapPropertySource from(org.springframework.core.env.PropertySource<?> propertySource)
protected java.util.Set<java.lang.String> findAllPropertiesByNameMatching(java.util.function.Predicate<java.lang.String> predicate)
protected java.util.Set<java.lang.String> findAllPropertiesByNameMatching(java.lang.Iterable<java.lang.String> properties,
java.util.function.Predicate<java.lang.String> predicate)
protected java.util.Set<java.lang.String> findAllPropertiesByValueMatching(java.util.function.Predicate<java.lang.Object> predicate)
protected java.util.Set<java.lang.String> findAllPropertiesByValueMatching(java.lang.Iterable<java.lang.String> properties,
java.util.function.Predicate<java.lang.Object> predicate)
public java.util.Set<java.lang.String> findAllVcapApplicationProperties()
public java.util.Set<java.lang.String> findAllVcapServicesProperties()
public java.util.Set<java.lang.String> findTargetVcapServiceProperties(java.util.function.Predicate<java.lang.String> vcapServicePropertiesPredicate)
public java.util.Optional<CloudCacheService> findFirstCloudCacheService()
public CloudCacheService requireFirstCloudCacheService()
public java.util.Optional<java.lang.String> findFirstCloudCacheServiceName()
public java.lang.String requireFirstCloudCacheServiceName()
public java.util.Optional<User> findUserByName(Service service, java.lang.String targetUsername)
public java.util.Optional<User> findFirstUserByRoleClusterOperator(Service service)
@Nullable public java.lang.Object getProperty(java.lang.String name)
getProperty in class org.springframework.core.env.PropertySource<org.springframework.core.env.EnumerablePropertySource<?>>@NonNull protected java.util.function.Predicate<java.lang.String> getVcapServicePredicate()
public java.util.Iterator<java.lang.String> iterator()
iterator in interface java.lang.Iterable<java.lang.String>@NonNull public VcapPropertySource withVcapServiceName(@NonNull java.lang.String serviceName)
@NonNull public VcapPropertySource withVcapServicePredicate(@Nullable java.util.function.Predicate<java.lang.String> vcapServicePredicate)