Class AbstractCachedFileBasedContentStoreAdapter

  • All Implemented Interfaces:
    org.craftercms.core.store.ContentStoreAdapter
    Direct Known Subclasses:
    S3ContentStoreAdapter

    public abstract class AbstractCachedFileBasedContentStoreAdapter
    extends org.craftercms.core.store.impl.AbstractFileBasedContentStoreAdapter
    AbstractFileBasedContentStoreAdapter to provide extra caching for Files. Useful for adapters that connect to remote stores, like S3.
    Author:
    avasquez.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static String CONST_KEY_ELEM_CHILDREN  
      static String CONST_KEY_ELEM_FILE  
      • Fields inherited from class org.craftercms.core.store.impl.AbstractFileBasedContentStoreAdapter

        charset, DEFAULT_CHARSET, descriptorFileExtension, metadataFileExtension, pathValidator
      • Fields inherited from class org.craftercms.core.store.impl.AbstractCachedContentStoreAdapter

        cacheTemplate, CONST_KEY_ELEM_CONTENT, CONST_KEY_ELEM_EXISTS, CONST_KEY_ELEM_ITEM, CONST_KEY_ELEM_ITEMS, defaultCachingOptions
    • Method Summary

      All Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      protected abstract org.craftercms.core.store.impl.File doFindFile​(org.craftercms.core.service.Context context, String path)  
      protected abstract List<org.craftercms.core.store.impl.File> doGetChildren​(org.craftercms.core.service.Context context, org.craftercms.core.store.impl.File dir)  
      protected org.craftercms.core.store.impl.File findFile​(org.craftercms.core.service.Context context, org.craftercms.core.service.CachingOptions cachingOptions, String path)  
      protected List<org.craftercms.core.store.impl.File> getChildren​(org.craftercms.core.service.Context context, org.craftercms.core.service.CachingOptions cachingOptions, org.craftercms.core.store.impl.File dir)  
      • Methods inherited from class org.craftercms.core.store.impl.AbstractFileBasedContentStoreAdapter

        createXmlReader, doExists, doFindContent, doFindItem, doFindItems, getContent, setCharset, setDescriptorFileExtension, setMetadataFileExtension, setPathValidator, validatePath
      • Methods inherited from class org.craftercms.core.store.impl.AbstractCachedContentStoreAdapter

        exists, findContent, findItem, findItems, setCacheTemplate, setDefaultCachingOptions
      • Methods inherited from interface org.craftercms.core.store.ContentStoreAdapter

        createContext, destroyContext, validate
    • Constructor Detail

      • AbstractCachedFileBasedContentStoreAdapter

        public AbstractCachedFileBasedContentStoreAdapter()
    • Method Detail

      • findFile

        protected org.craftercms.core.store.impl.File findFile​(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:
        findFile in class org.craftercms.core.store.impl.AbstractFileBasedContentStoreAdapter
        Throws:
        org.craftercms.core.exception.InvalidContextException
        org.craftercms.core.exception.StoreException
      • getChildren

        protected List<org.craftercms.core.store.impl.File> getChildren​(org.craftercms.core.service.Context context,
                                                                        org.craftercms.core.service.CachingOptions cachingOptions,
                                                                        org.craftercms.core.store.impl.File dir)
                                                                 throws org.craftercms.core.exception.InvalidContextException,
                                                                        org.craftercms.core.exception.StoreException
        Specified by:
        getChildren in class org.craftercms.core.store.impl.AbstractFileBasedContentStoreAdapter
        Throws:
        org.craftercms.core.exception.InvalidContextException
        org.craftercms.core.exception.StoreException
      • doFindFile

        protected abstract org.craftercms.core.store.impl.File doFindFile​(org.craftercms.core.service.Context context,
                                                                          String path)
                                                                   throws org.craftercms.core.exception.InvalidContextException,
                                                                          org.craftercms.core.exception.StoreException
        Throws:
        org.craftercms.core.exception.InvalidContextException
        org.craftercms.core.exception.StoreException
      • doGetChildren

        protected abstract List<org.craftercms.core.store.impl.File> doGetChildren​(org.craftercms.core.service.Context context,
                                                                                   org.craftercms.core.store.impl.File dir)
                                                                            throws org.craftercms.core.exception.InvalidContextException,
                                                                                   org.craftercms.core.exception.StoreException
        Throws:
        org.craftercms.core.exception.InvalidContextException
        org.craftercms.core.exception.StoreException