Class ClasspathAwareMessageSource
- java.lang.Object
-
- org.springframework.context.support.MessageSourceSupport
-
- org.springframework.context.support.AbstractMessageSource
-
- org.springframework.context.support.AbstractResourceBasedMessageSource
-
- org.springframework.context.support.ReloadableResourceBundleMessageSource
-
- de.hybris.platform.ycommercewebservices.util.ws.impl.ClasspathAwareMessageSource
-
- All Implemented Interfaces:
org.springframework.beans.factory.Aware,org.springframework.context.HierarchicalMessageSource,org.springframework.context.MessageSource,org.springframework.context.ResourceLoaderAware
public class ClasspathAwareMessageSource extends org.springframework.context.support.ReloadableResourceBundleMessageSourceMessageSource which can be aware of OCC extensions and extract messages bundles from them.
-
-
Field Summary
Fields Modifier and Type Field Description protected org.springframework.core.io.ContextResourcebaseOccExtensionDirprotected static java.util.function.Function<org.springframework.core.io.ContextResource,java.lang.String>classpathResourceMapperprotected static java.util.function.Predicate<java.lang.String>FILE_FILTERprotected org.springframework.core.io.support.PathMatchingResourcePatternResolverresolver
-
Constructor Summary
Constructors Constructor Description ClasspathAwareMessageSource(org.springframework.core.io.ContextResource baseOccExtensionDir)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected org.springframework.core.io.ContextResourcegetBaseOccExtensionDir()protected java.util.Set<java.lang.String>getMessagesSet()protected java.lang.StringmapToMessageBundleFilePath(org.springframework.core.io.Resource resource)protected java.lang.StringmapToMessageBundlePath(java.lang.String filePath)voidsetupMessages()protected booleanvalidateFilename(java.lang.String path)-
Methods inherited from class org.springframework.context.support.ReloadableResourceBundleMessageSource
calculateAllFilenames, calculateFilenamesForLocale, clearCache, clearCacheIncludingAncestors, getMergedProperties, getProperties, loadProperties, newProperties, refreshProperties, resolveCode, resolveCodeWithoutArguments, setConcurrentRefresh, setFileEncodings, setPropertiesPersister, setResourceLoader, toString
-
Methods inherited from class org.springframework.context.support.AbstractResourceBasedMessageSource
addBasenames, getBasenameSet, getCacheMillis, getDefaultEncoding, getDefaultLocale, isFallbackToSystemLocale, setBasename, setBasenames, setCacheMillis, setCacheSeconds, setDefaultEncoding, setDefaultLocale, setFallbackToSystemLocale
-
Methods inherited from class org.springframework.context.support.AbstractMessageSource
getCommonMessages, getDefaultMessage, getDefaultMessage, getMessage, getMessage, getMessage, getMessageFromParent, getMessageInternal, getParentMessageSource, isUseCodeAsDefaultMessage, resolveArguments, setCommonMessages, setParentMessageSource, setUseCodeAsDefaultMessage
-
-
-
-
Field Detail
-
FILE_FILTER
protected static final java.util.function.Predicate<java.lang.String> FILE_FILTER
-
classpathResourceMapper
protected static final java.util.function.Function<org.springframework.core.io.ContextResource,java.lang.String> classpathResourceMapper
-
baseOccExtensionDir
protected final org.springframework.core.io.ContextResource baseOccExtensionDir
-
resolver
protected final org.springframework.core.io.support.PathMatchingResourcePatternResolver resolver
-
-
Method Detail
-
setupMessages
@PostConstruct public void setupMessages()
-
getMessagesSet
protected java.util.Set<java.lang.String> getMessagesSet()
-
mapToMessageBundleFilePath
protected java.lang.String mapToMessageBundleFilePath(org.springframework.core.io.Resource resource)
-
validateFilename
protected boolean validateFilename(java.lang.String path)
-
mapToMessageBundlePath
protected java.lang.String mapToMessageBundlePath(java.lang.String filePath)
-
getBaseOccExtensionDir
protected org.springframework.core.io.ContextResource getBaseOccExtensionDir()
-
-