public class FileSystemContentStoreAdapter extends AbstractFileBasedContentStoreAdapter implements org.springframework.context.ResourceLoaderAware
ContentStoreAdapter that enables access to a store in the filesystem.| Modifier and Type | Field and Description |
|---|---|
static String |
STORE_TYPE |
charset, DEFAULT_CHARSET, descriptorFileExtension, metadataFileExtensioncacheTemplate, CONST_KEY_ELEM_CONTENT, CONST_KEY_ELEM_ITEM, CONST_KEY_ELEM_ITEMS, defaultCachingOptions| Constructor and Description |
|---|
FileSystemContentStoreAdapter() |
| Modifier and Type | Method and Description |
|---|---|
Context |
createContext(String id,
String storeServerUrl,
String username,
String password,
String rootFolderPath,
boolean mergingOn,
boolean cacheOn,
int maxAllowedItemsInCache,
boolean ignoreHiddenFiles) |
void |
destroyContext(Context context) |
protected File |
findFile(Context context,
String path)
Returns the
File at the given path, returning null if not found. |
protected List<File> |
getChildren(Context context,
File dir)
Returns the list of children of the given directory.
|
void |
setPathValidator(org.craftercms.commons.validation.validators.Validator<String> pathValidator) |
void |
setResourceLoader(org.springframework.core.io.ResourceLoader resourceLoader) |
boolean |
validate(Context context) |
protected void |
validatePath(String path) |
createXmlReader, doFindContent, doFindItem, doFindItems, exists, normalizePath, setCharset, setDescriptorFileExtension, setMetadataFileExtensionfindContent, findItem, findItems, setCacheTemplate, setDefaultCachingOptionspublic static final String STORE_TYPE
public void setResourceLoader(org.springframework.core.io.ResourceLoader resourceLoader)
setResourceLoader in interface org.springframework.context.ResourceLoaderAwarepublic void setPathValidator(org.craftercms.commons.validation.validators.Validator<String> pathValidator)
public Context createContext(String id, String storeServerUrl, String username, String password, String rootFolderPath, boolean mergingOn, boolean cacheOn, int maxAllowedItemsInCache, boolean ignoreHiddenFiles) throws RootFolderNotFoundException, StoreException, AuthenticationException
createContext in interface ContentStoreAdapterRootFolderNotFoundExceptionStoreExceptionAuthenticationExceptionpublic boolean validate(Context context) throws InvalidContextException, StoreException, AuthenticationException
validate in interface ContentStoreAdapterInvalidContextExceptionStoreExceptionAuthenticationExceptionpublic void destroyContext(Context context) throws InvalidContextException, StoreException, AuthenticationException
destroyContext in interface ContentStoreAdapterInvalidContextExceptionStoreExceptionAuthenticationExceptionprotected File findFile(Context context, String path)
AbstractFileBasedContentStoreAdapterFile at the given path, returning null if not found.findFile in class AbstractFileBasedContentStoreAdapterprotected List<File> getChildren(Context context, File dir)
AbstractFileBasedContentStoreAdaptergetChildren in class AbstractFileBasedContentStoreAdapterprotected void validatePath(String path) throws StoreException
StoreExceptionCopyright © 2018 CrafterCMS. All rights reserved.