Class FileSystemContentStoreAdapter
java.lang.Object
org.craftercms.core.store.impl.AbstractCachedContentStoreAdapter
org.craftercms.core.store.impl.AbstractFileBasedContentStoreAdapter
org.craftercms.core.store.impl.filesystem.FileSystemContentStoreAdapter
- All Implemented Interfaces:
ContentStoreAdapter,org.springframework.beans.factory.Aware,org.springframework.context.ResourceLoaderAware
public class FileSystemContentStoreAdapter
extends AbstractFileBasedContentStoreAdapter
implements org.springframework.context.ResourceLoaderAware
Implementation of
ContentStoreAdapter that enables access to a store in the filesystem.- Author:
- Alfonso Vásquez
-
Field Summary
FieldsFields inherited from class org.craftercms.core.store.impl.AbstractFileBasedContentStoreAdapter
charset, DEFAULT_CHARSET, descriptorFileExtension, metadataFileExtension, pathValidatorFields 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 -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncreateContext(String id, String rootFolderPath, boolean mergingOn, boolean cacheOn, int maxAllowedItemsInCache, boolean ignoreHiddenFiles) voiddestroyContext(Context context) protected FilefindFile(Context context, CachingOptions cachingOptions, String path) Returns theFileat the given path, returning null if not found.getChildren(Context context, CachingOptions cachingOptions, File dir) Returns the list of children of the given directory.protected ContentgetContent(Context context, CachingOptions cachingOptions, File file) Returns theContentfor the given file.voidsetResourceLoader(org.springframework.core.io.ResourceLoader resourceLoader) booleanMethods inherited from class org.craftercms.core.store.impl.AbstractFileBasedContentStoreAdapter
createXmlReader, doExists, doFindContent, doFindItem, doFindItems, setCharset, setDescriptorFileExtension, setMetadataFileExtension, setPathValidator, validatePathMethods inherited from class org.craftercms.core.store.impl.AbstractCachedContentStoreAdapter
exists, findContent, findItem, findItems, setCacheTemplate, setDefaultCachingOptions
-
Field Details
-
STORE_TYPE
- See Also:
-
-
Constructor Details
-
FileSystemContentStoreAdapter
public FileSystemContentStoreAdapter()
-
-
Method Details
-
setResourceLoader
public void setResourceLoader(org.springframework.core.io.ResourceLoader resourceLoader) - Specified by:
setResourceLoaderin interfaceorg.springframework.context.ResourceLoaderAware
-
createContext
public Context createContext(String id, String rootFolderPath, boolean mergingOn, boolean cacheOn, int maxAllowedItemsInCache, boolean ignoreHiddenFiles) throws RootFolderNotFoundException, StoreException, AuthenticationException - Specified by:
createContextin interfaceContentStoreAdapter- Throws:
RootFolderNotFoundExceptionStoreExceptionAuthenticationException
-
validate
public boolean validate(Context context) throws InvalidContextException, StoreException, AuthenticationException - Specified by:
validatein interfaceContentStoreAdapter- Throws:
InvalidContextExceptionStoreExceptionAuthenticationException
-
destroyContext
public void destroyContext(Context context) throws InvalidContextException, StoreException, AuthenticationException - Specified by:
destroyContextin interfaceContentStoreAdapter- Throws:
InvalidContextExceptionStoreExceptionAuthenticationException
-
getContent
protected Content getContent(Context context, CachingOptions cachingOptions, File file) throws InvalidContextException, StoreException Description copied from class:AbstractFileBasedContentStoreAdapterReturns theContentfor the given file.- Specified by:
getContentin classAbstractFileBasedContentStoreAdapter- Throws:
InvalidContextExceptionStoreException
-
findFile
Description copied from class:AbstractFileBasedContentStoreAdapterReturns theFileat the given path, returning null if not found.- Specified by:
findFilein classAbstractFileBasedContentStoreAdapter
-
getChildren
Description copied from class:AbstractFileBasedContentStoreAdapterReturns the list of children of the given directory.- Specified by:
getChildrenin classAbstractFileBasedContentStoreAdapter
-