public class ContentStoreServiceImpl
extends org.craftercms.core.service.impl.ContentStoreServiceImpl
ContentStoreServiceImpl with
fallback site logic. For example, the fallback site of 'test-fr' is 'test'.| Constructor and Description |
|---|
ContentStoreServiceImpl() |
| Modifier and Type | Method and Description |
|---|---|
protected String |
createContextId(String storeType,
String storeServerUrl,
String username,
String password,
String rootFolderPath,
boolean cacheOn,
int maxAllowedItemsInCache,
boolean ignoreHiddenFiles) |
protected List<org.craftercms.core.service.Item> |
doGetChildren(org.craftercms.core.service.Context context,
org.craftercms.core.service.CachingOptions cachingOptions,
String url,
Integer depth,
org.craftercms.core.service.ItemFilter filter,
org.craftercms.core.processors.ItemProcessor processor)
Does the following:
Retrieves the children from the underlying repository (without their descriptors).
Filters the returned list if
ItemFilter.runBeforeProcessing() returns true.
Calls AbstractCachedContentStoreService.getTree(Context, String) or AbstractCachedContentStoreService.getItem(Context, String) for each item in the list (depending on
whether the item is a folder or not, and if depth is not null), to obtain the merged and processed version
of each item.
Filters the processed list if ItemFilter.runAfterProcessing() ()} returns true.
Returns the final list of processed items.
|
protected org.craftercms.core.service.Item |
doGetItem(org.craftercms.core.service.Context context,
org.craftercms.core.service.CachingOptions cachingOptions,
String url,
org.craftercms.core.processors.ItemProcessor processor)
Returns the content store item for the given url.
|
org.craftercms.core.service.Content |
getContent(org.craftercms.core.service.Context context,
org.craftercms.core.service.CachingOptions cachingOptions,
String url) |
void |
setMacroResolver(MacroResolver macroResolver) |
void |
setSitePathPrefix(String sitePathPrefix) |
createContext, destroyContext, doFilter, doGetChildren, doGetTree, doMerging, doProcessing, getContent, getContext, setMerger, setMergeStrategyResolver, setProcessorResolver, setStoreAdapterRegistrygetChildren, getChildren, getChildren, getChildren, getChildren, getChildren, getChildren, getChildren, getItem, getItem, getItem, getItem, getTree, getTree, getTree, getTree, getTree, getTree, getTree, getTree, getTree, getTree, getTree, getTree, getTree, getTree, getTree, getTree, setCacheTemplatepublic void setMacroResolver(MacroResolver macroResolver)
public void setSitePathPrefix(String sitePathPrefix)
protected org.craftercms.core.service.Item doGetItem(org.craftercms.core.service.Context context,
org.craftercms.core.service.CachingOptions cachingOptions,
String url,
org.craftercms.core.processors.ItemProcessor processor)
throws org.craftercms.core.exception.InvalidContextException,
org.craftercms.core.exception.PathNotFoundException,
org.craftercms.core.exception.XmlFileParseException,
org.craftercms.core.exception.XmlMergeException,
org.craftercms.core.exception.ItemProcessingException,
org.craftercms.core.exception.StoreException
After acquiring the item from the ContentStoreAdapter, the item's descriptor is merged (according to its
DescriptorMergeStrategy) with related descriptors, and the final item is then processed.
doGetItem in class org.craftercms.core.service.impl.ContentStoreServiceImplorg.craftercms.core.exception.InvalidContextExceptionorg.craftercms.core.exception.PathNotFoundExceptionorg.craftercms.core.exception.XmlFileParseExceptionorg.craftercms.core.exception.XmlMergeExceptionorg.craftercms.core.exception.ItemProcessingExceptionorg.craftercms.core.exception.StoreExceptionpublic org.craftercms.core.service.Content getContent(org.craftercms.core.service.Context context,
org.craftercms.core.service.CachingOptions cachingOptions,
String url)
throws org.craftercms.core.exception.InvalidScopeException,
org.craftercms.core.exception.PathNotFoundException,
org.craftercms.core.exception.StoreException
getContent in interface org.craftercms.core.service.ContentStoreServicegetContent in class org.craftercms.core.service.impl.ContentStoreServiceImplorg.craftercms.core.exception.InvalidScopeExceptionorg.craftercms.core.exception.PathNotFoundExceptionorg.craftercms.core.exception.StoreExceptionprotected List<org.craftercms.core.service.Item> doGetChildren(org.craftercms.core.service.Context context, org.craftercms.core.service.CachingOptions cachingOptions, String url, Integer depth, org.craftercms.core.service.ItemFilter filter, org.craftercms.core.processors.ItemProcessor processor) throws org.craftercms.core.exception.InvalidContextException, org.craftercms.core.exception.PathNotFoundException, org.craftercms.core.exception.XmlFileParseException, org.craftercms.core.exception.XmlMergeException, org.craftercms.core.exception.ItemProcessingException, org.craftercms.core.exception.StoreException
ItemFilter.runBeforeProcessing() returns true.AbstractCachedContentStoreService.getTree(Context, String) or AbstractCachedContentStoreService.getItem(Context, String) for each item in the list (depending on
whether the item is a folder or not, and if depth is not null), to obtain the merged and processed version
of each item.ItemFilter.runAfterProcessing() ()} returns true.doGetChildren in class org.craftercms.core.service.impl.ContentStoreServiceImplorg.craftercms.core.exception.InvalidContextExceptionorg.craftercms.core.exception.PathNotFoundExceptionorg.craftercms.core.exception.XmlFileParseExceptionorg.craftercms.core.exception.XmlMergeExceptionorg.craftercms.core.exception.ItemProcessingExceptionorg.craftercms.core.exception.StoreExceptionprotected String createContextId(String storeType, String storeServerUrl, String username, String password, String rootFolderPath, boolean cacheOn, int maxAllowedItemsInCache, boolean ignoreHiddenFiles)
createContextId in class org.craftercms.core.service.impl.ContentStoreServiceImplCopyright © 2014 CrafterCMS. All Rights Reserved.