Class StudioBlobStoreResolverImpl
java.lang.Object
org.craftercms.commons.file.blob.impl.BlobStoreResolverImpl
org.craftercms.studio.impl.v2.repository.blob.StudioBlobStoreResolverImpl
- All Implemented Interfaces:
org.craftercms.commons.file.blob.BlobStoreResolver,StudioBlobStoreResolver,org.springframework.beans.factory.Aware,org.springframework.context.ApplicationContextAware
public class StudioBlobStoreResolverImpl
extends org.craftercms.commons.file.blob.impl.BlobStoreResolverImpl
implements StudioBlobStoreResolver
Implementation of
StudioBlobStoreResolver- Since:
- 3.1.6
- Author:
- joseross
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringprotected ConfigurationServiceprotected ContentRepositoryprotected String[]The patterns of urls that should be handled by blob storesprotected StudioConfigurationFields inherited from class org.craftercms.commons.file.blob.impl.BlobStoreResolverImpl
applicationContext, configModule, configPath, configurationResolver, logger -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns allStudioBlobStoreconfigured for the given siteprotected StudioBlobStoregetBlobStore(String siteId, String storeId, org.apache.commons.configuration2.HierarchicalConfiguration config) getByPaths(String site, String... paths) Returns the firstStudioBlobStorecompatible with all given paths for the given siteprotected org.apache.commons.configuration2.HierarchicalConfigurationgetConfiguration(String siteId) protected org.apache.commons.configuration2.HierarchicalConfigurationgetConfiguration(org.craftercms.commons.config.ConfigurationProvider provider) protected StringbooleanIndicates if a given path belongs to a blob storevoidvoidsetConfigurationService(ConfigurationService configurationService) voidsetContentRepository(ContentRepository contentRepository) voidsetContextManager(ContextManager contextManager) voidsetInterceptedPaths(String[] interceptedPaths) voidsetStudioConfiguration(StudioConfiguration studioConfiguration) Methods inherited from class org.craftercms.commons.file.blob.impl.BlobStoreResolverImpl
findStore, findStoreId, getById, getById, setApplicationContext, setConfigModule, setConfigPath, setConfigurationResolverMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.craftercms.commons.file.blob.BlobStoreResolver
getById
-
Field Details
-
CACHE_KEY_STORE
- See Also:
-
contentRepository
-
cache
-
configurationService
-
studioConfiguration
-
interceptedPaths
The patterns of urls that should be handled by blob stores
-
-
Constructor Details
-
StudioBlobStoreResolverImpl
public StudioBlobStoreResolverImpl()
-
-
Method Details
-
setContentRepository
-
setCache
-
setConfigurationService
-
setStudioConfiguration
-
setInterceptedPaths
-
getConfiguration
protected org.apache.commons.configuration2.HierarchicalConfiguration getConfiguration(org.craftercms.commons.config.ConfigurationProvider provider) throws org.craftercms.commons.config.ConfigurationException - Overrides:
getConfigurationin classorg.craftercms.commons.file.blob.impl.BlobStoreResolverImpl- Throws:
org.craftercms.commons.config.ConfigurationException
-
getConfiguration
protected org.apache.commons.configuration2.HierarchicalConfiguration getConfiguration(String siteId) throws ExecutionException - Throws:
ExecutionException
-
getBlobStore
protected StudioBlobStore getBlobStore(String siteId, String storeId, org.apache.commons.configuration2.HierarchicalConfiguration config) throws ExecutionException - Throws:
ExecutionException
-
getAll
Description copied from interface:StudioBlobStoreResolverReturns allStudioBlobStoreconfigured for the given site- Specified by:
getAllin interfaceStudioBlobStoreResolver- Parameters:
siteId- the id of the site- Returns:
- list of blob stores
- Throws:
ServiceLayerException
-
getByPaths
Description copied from interface:StudioBlobStoreResolverReturns the firstStudioBlobStorecompatible with all given paths for the given site- Specified by:
getByPathsin interfaceStudioBlobStoreResolver- Parameters:
site- the id of the sitepaths- the lists of paths to check- Returns:
- the blob store object
- Throws:
ServiceLayerException- if there is any error looking up the stores
-
isBlob
Description copied from interface:StudioBlobStoreResolverIndicates if a given path belongs to a blob store- Specified by:
isBlobin interfaceStudioBlobStoreResolver- Parameters:
site- the id of the sitepath- the path to check- Returns:
- true if there is a matching blob store
- Throws:
ServiceLayerException- if there is any error looking up the stores
-
getEnvironment
-
setContextManager
-