Class CacheWarmingAwareContentStoreAdapterDecorator

    • Field Detail

      • warmUpEnabled

        protected boolean warmUpEnabled
      • actualStoreAdapter

        protected org.craftercms.core.store.ContentStoreAdapter actualStoreAdapter
      • cacheService

        protected org.craftercms.core.service.CacheService cacheService
    • Constructor Detail

      • CacheWarmingAwareContentStoreAdapterDecorator

        public CacheWarmingAwareContentStoreAdapterDecorator()
    • Method Detail

      • setWarmUpEnabled

        public void setWarmUpEnabled​(boolean warmUpEnabled)
      • setCacheService

        public void setCacheService​(org.craftercms.core.service.CacheService cacheService)
      • createContext

        public org.craftercms.core.service.Context createContext​(String id,
                                                                 String rootFolderPath,
                                                                 boolean mergingOn,
                                                                 boolean cacheOn,
                                                                 int maxAllowedItemsInCache,
                                                                 boolean ignoreHiddenFiles)
                                                          throws org.craftercms.core.exception.RootFolderNotFoundException,
                                                                 org.craftercms.core.exception.StoreException,
                                                                 org.craftercms.core.exception.AuthenticationException
        Specified by:
        createContext in interface org.craftercms.core.store.ContentStoreAdapter
        Throws:
        org.craftercms.core.exception.RootFolderNotFoundException
        org.craftercms.core.exception.StoreException
        org.craftercms.core.exception.AuthenticationException
      • validate

        public boolean validate​(org.craftercms.core.service.Context context)
                         throws org.craftercms.core.exception.StoreException,
                                org.craftercms.core.exception.AuthenticationException
        Specified by:
        validate in interface org.craftercms.core.store.ContentStoreAdapter
        Throws:
        org.craftercms.core.exception.StoreException
        org.craftercms.core.exception.AuthenticationException
      • destroyContext

        public void destroyContext​(org.craftercms.core.service.Context context)
                            throws org.craftercms.core.exception.StoreException,
                                   org.craftercms.core.exception.AuthenticationException
        Specified by:
        destroyContext in interface org.craftercms.core.store.ContentStoreAdapter
        Throws:
        org.craftercms.core.exception.StoreException
        org.craftercms.core.exception.AuthenticationException
      • exists

        public boolean exists​(org.craftercms.core.service.Context context,
                              org.craftercms.core.service.CachingOptions cachingOptions,
                              String path)
                       throws org.craftercms.core.exception.InvalidContextException,
                              org.craftercms.core.exception.StoreException
        Specified by:
        exists in interface org.craftercms.core.store.ContentStoreAdapter
        Throws:
        org.craftercms.core.exception.InvalidContextException
        org.craftercms.core.exception.StoreException
      • findContent

        public org.craftercms.core.service.Content findContent​(org.craftercms.core.service.Context context,
                                                               org.craftercms.core.service.CachingOptions cachingOptions,
                                                               String path)
                                                        throws org.craftercms.core.exception.InvalidContextException,
                                                               org.craftercms.core.exception.StoreException
        Specified by:
        findContent in interface org.craftercms.core.store.ContentStoreAdapter
        Throws:
        org.craftercms.core.exception.InvalidContextException
        org.craftercms.core.exception.StoreException
      • findItem

        public org.craftercms.core.service.Item findItem​(org.craftercms.core.service.Context context,
                                                         org.craftercms.core.service.CachingOptions cachingOptions,
                                                         String path,
                                                         boolean withDescriptor)
                                                  throws org.craftercms.core.exception.InvalidContextException,
                                                         org.craftercms.core.exception.XmlFileParseException,
                                                         org.craftercms.core.exception.StoreException
        Specified by:
        findItem in interface org.craftercms.core.store.ContentStoreAdapter
        Throws:
        org.craftercms.core.exception.InvalidContextException
        org.craftercms.core.exception.XmlFileParseException
        org.craftercms.core.exception.StoreException
      • findItems

        public List<org.craftercms.core.service.Item> findItems​(org.craftercms.core.service.Context context,
                                                                org.craftercms.core.service.CachingOptions cachingOptions,
                                                                String path)
                                                         throws org.craftercms.core.exception.InvalidContextException,
                                                                org.craftercms.core.exception.XmlFileParseException,
                                                                org.craftercms.core.exception.StoreException
        Specified by:
        findItems in interface org.craftercms.core.store.ContentStoreAdapter
        Throws:
        org.craftercms.core.exception.InvalidContextException
        org.craftercms.core.exception.XmlFileParseException
        org.craftercms.core.exception.StoreException
      • executeIfNotPreloadedOrIfExistsInPreloadedPaths

        protected <T> T executeIfNotPreloadedOrIfExistsInPreloadedPaths​(org.craftercms.engine.cache.PreloadedFoldersAwareContext contextWrapper,
                                                                        String path,
                                                                        Supplier<T> actualCall)