public abstract class AbstractFileBasedContentStoreAdapter extends AbstractCachedContentStoreAdapter
| Modifier and Type | Field and Description |
|---|---|
protected String |
charset |
static String |
DEFAULT_CHARSET |
protected String |
descriptorFileExtension |
protected String |
metadataFileExtension |
cacheTemplate, CONST_KEY_ELEM_CONTENT, CONST_KEY_ELEM_ITEM, CONST_KEY_ELEM_ITEMS, defaultCachingOptions| Constructor and Description |
|---|
AbstractFileBasedContentStoreAdapter() |
| Modifier and Type | Method and Description |
|---|---|
protected org.dom4j.io.SAXReader |
createXmlReader()
Creates and configures an XML SAX reader.
|
protected Content |
doFindContent(Context context,
CachingOptions cachingOptions,
String path) |
protected Item |
doFindItem(Context context,
CachingOptions cachingOptions,
String path,
boolean withDescriptor) |
protected List<Item> |
doFindItems(Context context,
CachingOptions cachingOptions,
String path,
boolean withDescriptor) |
boolean |
exists(Context context,
String path) |
protected abstract File |
findFile(Context context,
String path)
Returns the
File at the given path, returning null if not found. |
protected abstract List<File> |
getChildren(Context context,
File dir)
Returns the list of children of the given directory.
|
protected String |
normalizePath(String path)
Normalize the path: this means, append a leading '/' at the beginning and remove any trailing '/' (unless
the path is root).
|
void |
setCharset(String charset) |
void |
setDescriptorFileExtension(String descriptorFileExtension) |
void |
setMetadataFileExtension(String metadataFileExtension) |
findContent, findItem, findItems, setCacheTemplate, setDefaultCachingOptionsclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcreateContext, destroyContext, validatepublic static final String DEFAULT_CHARSET
protected String charset
protected String descriptorFileExtension
protected String metadataFileExtension
public AbstractFileBasedContentStoreAdapter()
public void setCharset(String charset)
public void setDescriptorFileExtension(String descriptorFileExtension)
public void setMetadataFileExtension(String metadataFileExtension)
public boolean exists(Context context, String path) throws InvalidScopeException, StoreException
InvalidScopeExceptionStoreExceptionprotected Content doFindContent(Context context, CachingOptions cachingOptions, String path) throws InvalidContextException, StoreException
doFindContent in class AbstractCachedContentStoreAdapterInvalidContextExceptionStoreExceptionprotected Item doFindItem(Context context, CachingOptions cachingOptions, String path, boolean withDescriptor) throws InvalidContextException, PathNotFoundException, XmlFileParseException, StoreException
doFindItem in class AbstractCachedContentStoreAdapterInvalidContextExceptionPathNotFoundExceptionXmlFileParseExceptionStoreExceptionprotected List<Item> doFindItems(Context context, CachingOptions cachingOptions, String path, boolean withDescriptor) throws InvalidContextException, PathNotFoundException, XmlFileParseException, StoreException
doFindItems in class AbstractCachedContentStoreAdapterInvalidContextExceptionPathNotFoundExceptionXmlFileParseExceptionStoreExceptionprotected String normalizePath(String path)
path - protected org.dom4j.io.SAXReader createXmlReader()
protected abstract File findFile(Context context, String path) throws InvalidContextException, StoreException
File at the given path, returning null if not found.protected abstract List<File> getChildren(Context context, File dir) throws InvalidContextException, StoreException
Copyright © 2018 CrafterCMS. All rights reserved.