Class CoherenceConfigDataLocationResolver
- java.lang.Object
 - 
- com.oracle.coherence.spring.boot.config.CoherenceConfigDataLocationResolver
 
 
- 
- All Implemented Interfaces:
 org.springframework.boot.context.config.ConfigDataLocationResolver<CoherenceConfigDataResource>
public class CoherenceConfigDataLocationResolver extends java.lang.Object implements org.springframework.boot.context.config.ConfigDataLocationResolver<CoherenceConfigDataResource>
ConfigDataLocationResolverfor Coherence Spring resolvingCoherenceConfigDataResourceusing theCOHERENCE_PREFIXprefix.- Since:
 - 3.0
 - Author:
 - Gunnar Hillert
 
 
- 
- 
Field Summary
Fields Modifier and Type Field Description static java.lang.StringCOHERENCE_PREFIXPrefix used to indicate aCoherenceConfigDataResource.protected static Loglogger 
- 
Constructor Summary
Constructors Constructor Description CoherenceConfigDataLocationResolver() 
- 
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected java.lang.StringgetPrefix()Will returnCOHERENCE_PREFIX.booleanisResolvable(org.springframework.boot.context.config.ConfigDataLocationResolverContext context, org.springframework.boot.context.config.ConfigDataLocation location)Will return true only if the providedConfigDataLocationhas the prefix as defined bygetPrefix()and if the configuration for the Coherence backend is enabled.protected CoherenceConfigClientPropertiesloadProperties(org.springframework.boot.context.config.ConfigDataLocationResolverContext context)Load theCoherenceConfigClientProperties.java.util.List<CoherenceConfigDataResource>resolve(org.springframework.boot.context.config.ConfigDataLocationResolverContext context, org.springframework.boot.context.config.ConfigDataLocation location)Not used.java.util.List<CoherenceConfigDataResource>resolveProfileSpecific(org.springframework.boot.context.config.ConfigDataLocationResolverContext resolverContext, org.springframework.boot.context.config.ConfigDataLocation location, org.springframework.boot.context.config.Profiles profiles)Return a list of CoherenceConfigDataResources. 
 - 
 
- 
- 
Field Detail
- 
logger
protected static final Log logger
 
- 
COHERENCE_PREFIX
public static final java.lang.String COHERENCE_PREFIX
Prefix used to indicate aCoherenceConfigDataResource.- See Also:
 - Constant Field Values
 
 
 - 
 
- 
Method Detail
- 
isResolvable
public boolean isResolvable(org.springframework.boot.context.config.ConfigDataLocationResolverContext context, org.springframework.boot.context.config.ConfigDataLocation location)Will return true only if the providedConfigDataLocationhas the prefix as defined bygetPrefix()and if the configuration for the Coherence backend is enabled.- Specified by:
 isResolvablein interfaceorg.springframework.boot.context.config.ConfigDataLocationResolver<CoherenceConfigDataResource>- Parameters:
 context- the ConfigDataLocationResolverContextlocation- the ConfigDataLocation- Returns:
 - true if this ConfigDataLocationResolver is applicable to the provided location
 - See Also:
 CoherenceConfigClientProperties
 
- 
getPrefix
protected java.lang.String getPrefix()
Will returnCOHERENCE_PREFIX.- Returns:
 - the prefix constant COHERENCE_PREFIX
 
 
- 
resolve
public java.util.List<CoherenceConfigDataResource> resolve(org.springframework.boot.context.config.ConfigDataLocationResolverContext context, org.springframework.boot.context.config.ConfigDataLocation location)
Not used. Returns an empty list.- Specified by:
 resolvein interfaceorg.springframework.boot.context.config.ConfigDataLocationResolver<CoherenceConfigDataResource>- Parameters:
 context- not usedlocation- not used- Returns:
 - an empty List
 
 
- 
resolveProfileSpecific
public java.util.List<CoherenceConfigDataResource> resolveProfileSpecific(org.springframework.boot.context.config.ConfigDataLocationResolverContext resolverContext, org.springframework.boot.context.config.ConfigDataLocation location, org.springframework.boot.context.config.Profiles profiles) throws org.springframework.boot.context.config.ConfigDataLocationNotFoundException
Return a list of CoherenceConfigDataResources.- Specified by:
 resolveProfileSpecificin interfaceorg.springframework.boot.context.config.ConfigDataLocationResolver<CoherenceConfigDataResource>- Parameters:
 resolverContext- the location resolver contextlocation- the location that should be resolvedprofiles- profile information- Returns:
 - a list of resolved CoherenceConfigDataResources (contains 1 element only).
 - Throws:
 org.springframework.boot.context.config.ConfigDataLocationNotFoundException- on a non-optional location that cannot be found
 
- 
loadProperties
protected CoherenceConfigClientProperties loadProperties(org.springframework.boot.context.config.ConfigDataLocationResolverContext context)
Load theCoherenceConfigClientProperties. Also, ifCoherenceConfigClientProperties.getApplicationName()is not set, then default to the valuespring.application.nameif available, of if that value is not available, either, default to the nameapplication.- Parameters:
 context- the ConfigDataLocationResolverContext- Returns:
 - returns either the CoherenceConfigClientProperties from the ConfigDataLocationResolverContext or a new instance of CoherenceConfigClientProperties
 
 
 - 
 
 -