public interface ContentStoreService
.impl.IncludeDescriptorsProcessor, an another one that processes element text of descriptor documents as
templates (see TemplateProcessor).
DescriptorMergeStrategy,
DescriptorMergeStrategyResolver,
DescriptorMerger,
ItemProcessor,
ItemProcessorResolver| Modifier and Type | Field and Description |
|---|---|
static int |
UNLIMITED_TREE_DEPTH
Constant used to indicate that the depth of the tree should be unlimited.
|
| Modifier and Type | Method and Description |
|---|---|
Context |
createContext(String storeType,
String storeServerUrl,
String username,
String password,
String rootFolderPath,
boolean mergingOn,
boolean cacheOn,
int maxAllowedItemsInCache,
boolean ignoreHiddenFiles)
Returns a new context with the specified params, login in to a remote repository (if needed) and creating a
new cache scope associated to the context.
|
boolean |
destroyContext(Context context)
Destroys the specified context, login out of any remote repository (if a login was issued) and destroying the
cache scope associated to the context.
|
boolean |
exists(Context context,
String url)
Returns true if the file or folder at the specified URL exists
|
List<Item> |
findChildren(Context context,
CachingOptions cachingOptions,
String url,
ItemFilter filter,
ItemProcessor processor)
Returns the children of the folder at the given url, returning null if the folder can't be found.
|
List<Item> |
findChildren(Context context,
String url)
Returns the children of the folder at the given url, returning null if the folder can't be found.
|
Content |
findContent(Context context,
CachingOptions cachingOptions,
String url)
Returns the content of the file for the given url, returning null if not found.
|
Content |
findContent(Context context,
String url)
Returns the content of the file for the given url, returning null if not found.
|
Item |
findItem(Context context,
CachingOptions cachingOptions,
String url,
ItemProcessor processor)
Returns the content store item for the given url, returning null if not found.
|
Item |
findItem(Context context,
String url)
Returns the content store item for the given url, returning null if not found.
|
Tree |
findTree(Context context,
CachingOptions cachingOptions,
String url,
int depth,
ItemFilter filter,
ItemProcessor processor)
Returns the folder at the given url as a tree, or null if the folder wasn't found.
|
Tree |
findTree(Context context,
String url)
Returns the folder at the given url as a tree, or null if the folder wasn't found.
|
Tree |
findTree(Context context,
String url,
int depth)
Returns the folder at the given url as a tree, or null if the folder wasn't found.
|
List<Item> |
getChildren(Context context,
CachingOptions cachingOptions,
String url,
ItemFilter filter,
ItemProcessor processor)
Returns the children of the folder at the given url.
|
List<Item> |
getChildren(Context context,
String url)
Returns the children of the folder at the given url.
|
Content |
getContent(Context context,
CachingOptions cachingOptions,
String url)
Returns the content of the file for the given url.
|
Content |
getContent(Context context,
String url)
Returns the content of the file for the given url.
|
Context |
getContext(String contextId)
Returns the open
Context for the given ID, or null if no context found for the ID. |
Item |
getItem(Context context,
CachingOptions cachingOptions,
String url,
ItemProcessor processor)
Returns the content store item for the given url.
|
Item |
getItem(Context context,
String url)
Returns the content store item for the given url.
|
Tree |
getTree(Context context,
CachingOptions cachingOptions,
String url,
int depth,
ItemFilter filter,
ItemProcessor processor)
Returns the folder at the given url as a tree.
|
Tree |
getTree(Context context,
String url)
Returns the folder at the given url as a tree.
|
Tree |
getTree(Context context,
String url,
int depth)
Returns the folder at the given url as a tree.
|
boolean |
validate(Context context)
Returns true if the specified context is still valid and usable.
|
static final int UNLIMITED_TREE_DEPTH
Context getContext(String contextId)
Context for the given ID, or null if no context found for the ID.Context createContext(String storeType, String storeServerUrl, String username, String password, String rootFolderPath, boolean mergingOn, boolean cacheOn, int maxAllowedItemsInCache, boolean ignoreHiddenFiles) throws InvalidStoreTypeException, RootFolderNotFoundException, StoreException, AuthenticationException
boolean validate(Context context) throws StoreException, AuthenticationException
boolean destroyContext(Context context) throws StoreException, AuthenticationException
StoreExceptionAuthenticationExceptionboolean exists(Context context, String url) throws InvalidContextException, PathNotFoundException, StoreException
context - the context with the store configuration (required)url - the url of the file (required)InvalidContextException - if the context is invalidPathNotFoundException - if the file the url points to can't be foundStoreException - if an error occurred while accessing the content storeContent findContent(Context context, String url) throws InvalidContextException, StoreException
context - the context with the store configuration (required)url - the url of the file (required)InvalidContextException - if the context is invalidStoreException - if an error occurred while accessing the content storeContent getContent(Context context, String url) throws InvalidContextException, PathNotFoundException, StoreException
context - the context with the store configuration (required)url - the url of the file (required)InvalidContextException - if the context is invalidPathNotFoundException - if the file the url points to can't be foundStoreException - if an error occurred while accessing the content storeContent findContent(Context context, CachingOptions cachingOptions, String url) throws InvalidContextException, StoreException
context - the context with the store configuration (required)cachingOptions - the caching options for any caching operation done inside this service call (optional)url - the url of the file (required)InvalidContextException - if the context is invalidStoreException - if an error occurred while accessing the content storeContent getContent(Context context, CachingOptions cachingOptions, String url) throws InvalidContextException, PathNotFoundException, StoreException
context - the context with the store configuration (required)cachingOptions - the caching options for any caching operation done inside this service call (optional)url - the url of the file (required)InvalidContextException - if the context is invalidPathNotFoundException - if the file the url points to can't be foundStoreException - if an error occurred while accessing the content storeItem findItem(Context context, String url) throws InvalidContextException, XmlFileParseException, XmlMergeException, ItemProcessingException, StoreException
Item for the
types of files an item can be.context - the context with the store configuration (required)url - the url of the item (required)InvalidContextException - if the context is invalidXmlFileParseException - if there was an error while parsing the item's XML descriptorXmlMergeException - if there was an error while attempting to do a merge of XML descriptorsItemProcessingException - if there was an error while processing the itemStoreException - if an error occurred while accessing the content storeItem getItem(Context context, String url) throws InvalidContextException, PathNotFoundException, XmlFileParseException, XmlMergeException, ItemProcessingException, StoreException
Item for the types of files an item can be.context - the context with the store configuration (required)url - the url of the item (required)InvalidContextException - if the context is invalidPathNotFoundException - if the file the url points to can't be foundXmlFileParseException - if there was an error while parsing the item's XML descriptorXmlMergeException - if there was an error while attempting to do a merge of XML descriptorsItemProcessingException - if there was an error while processing the itemStoreException - if an error occurred while accessing the content storeItem findItem(Context context, CachingOptions cachingOptions, String url, ItemProcessor processor) throws InvalidContextException, XmlFileParseException, XmlMergeException, ItemProcessingException, StoreException
Item for the types of
files an item can be.context - the context to the content store (required)cachingOptions - the caching options for any caching operation done inside this service call (optional)url - the url of the item (optional, can be null)processor - additional ItemProcessor (optional, can be null)InvalidContextException - if the context is invalidXmlFileParseException - if there was an error while parsing the item's XML descriptorXmlMergeException - if there was an error while attempting to do a merge of XML descriptorsItemProcessingException - if there was an error while processing the itemStoreException - if an error occurred while accessing the content storeItem getItem(Context context, CachingOptions cachingOptions, String url, ItemProcessor processor) throws InvalidContextException, PathNotFoundException, XmlFileParseException, XmlMergeException, ItemProcessingException, StoreException
Item for the types of files an item can be.context - the context to the content store (required)cachingOptions - the caching options for any caching operation done inside this service call (optional)url - the url of the item (optional, can be null)processor - additional ItemProcessor (optional, can be null)InvalidContextException - if the context is invalidPathNotFoundException - if the file the url points to can't be foundXmlFileParseException - if there was an error while parsing the item's XML descriptorXmlMergeException - if there was an error while attempting to do a merge of XML descriptorsItemProcessingException - if there was an error while processing the itemStoreException - if an error occurred while accessing the content storeList<Item> findChildren(Context context, String url) throws InvalidContextException, XmlFileParseException, XmlMergeException, ItemProcessingException, StoreException
context - the context to the content store (required)url - the url of the folder (required)InvalidContextException - if the context is invalidXmlFileParseException - if there was an error while parsing a children's XML descriptorXmlMergeException - if there was an error while attempting to do a merge of XML descriptorsItemProcessingException - if there was an error while processing an itemStoreException - if an error occurred while accessing the content storeList<Item> getChildren(Context context, String url) throws InvalidContextException, PathNotFoundException, XmlFileParseException, XmlMergeException, ItemProcessingException, StoreException
context - the context to the content store (required)url - the url of the folder (required)InvalidContextException - if the context is invalidPathNotFoundException - if the folder the url points to can't be foundXmlFileParseException - if there was an error while parsing a children's XML descriptorXmlMergeException - if there was an error while attempting to do a merge of XML descriptorsItemProcessingException - if there was an error while processing an itemStoreException - if an error occurred while accessing the content storeList<Item> findChildren(Context context, CachingOptions cachingOptions, String url, ItemFilter filter, ItemProcessor processor) throws InvalidContextException, XmlFileParseException, XmlMergeException, ItemProcessingException, StoreException
context - the context to the content store (required)cachingOptions - the caching options for any caching operation done inside this service call (optional)url - the url of the folder (required)filter - an ItemFilter to filter out undesired children (optional, can be null)processor - additional ItemProcessor for the children (optional, can be null)InvalidContextException - if the context is invalidXmlFileParseException - if there was an error while parsing a children's XML descriptorXmlMergeException - if there was an error while attempting to do a merge of XML descriptorsItemProcessingException - if there was an error while processing an itemStoreException - if an error occurred while accessing the content storeList<Item> getChildren(Context context, CachingOptions cachingOptions, String url, ItemFilter filter, ItemProcessor processor) throws InvalidContextException, PathNotFoundException, XmlFileParseException, XmlMergeException, ItemProcessingException, StoreException
context - the context to the content store (required)cachingOptions - the caching options for any caching operation done inside this service call (optional)url - the url of the folder (required)filter - an ItemFilter to filter out undesired children (optional, can be null)processor - additional ItemProcessor for the children (optional, can be null)InvalidContextException - if the context is invalidPathNotFoundException - if the folder the url points to can't be foundXmlFileParseException - if there was an error while parsing a children's XML descriptorXmlMergeException - if there was an error while attempting to do a merge of XML descriptorsItemProcessingException - if there was an error while processing an itemStoreException - if an error occurred while accessing the content storeTree findTree(Context context, String url) throws InvalidContextException, XmlFileParseException, XmlMergeException, ItemProcessingException, StoreException
Items when they're files and as Trees when they're folders. The tree depth is
UNLIMITED_TREE_DEPTH.context - the context to the content store (required)url - the url of the folder (required)InvalidContextException - if the context is invalidXmlFileParseException - if there was an error while parsing a children's XML descriptorXmlMergeException - if there was an error while attempting to do a merge of XML descriptorsItemProcessingException - if there was an error while processing an itemStoreException - if an error occurred while accessing the content storeTree getTree(Context context, String url) throws InvalidContextException, PathNotFoundException, XmlFileParseException, XmlMergeException, ItemProcessingException, StoreException
Items when they're
files and as Trees when they're folders. The tree depth is UNLIMITED_TREE_DEPTH.context - the context to the content store (required)url - the url of the folder (required)InvalidContextException - if the context is invalidPathNotFoundException - if the folder the url points to can't be foundXmlFileParseException - if there was an error while parsing a children's XML descriptorXmlMergeException - if there was an error while attempting to do a merge of XML descriptorsItemProcessingException - if there was an error while processing an itemStoreException - if an error occurred while accessing the content storeTree findTree(Context context, String url, int depth) throws InvalidContextException, XmlFileParseException, XmlMergeException, ItemProcessingException, StoreException
Items when they're files and as Trees when they're folders.context - the context to the content store (required)url - the url of the folder (required)depth - the number of levels the tree should have. Use #UNLIMITED_TREE_DEPTH when you want the tree to
include all files/folder until the bottom of the folder hierarchy (required)InvalidContextException - if the context is invalidXmlFileParseException - if there was an error while parsing a children's XML descriptorXmlMergeException - if there was an error while attempting to do a merge of XML descriptorsItemProcessingException - if there was an error while processing an itemStoreException - if an error occurred while accessing the content storeTree getTree(Context context, String url, int depth) throws InvalidContextException, PathNotFoundException, XmlFileParseException, XmlMergeException, ItemProcessingException, StoreException
Items when they're
files and as Trees when they're folders.context - the context to the content store (required)url - the url of the folder (required)depth - the number of levels the tree should have. Use #UNLIMITED_TREE_DEPTH when you want the tree to
include all files/folder until the bottom of the folder hierarchy (required)InvalidContextException - if the context is invalidPathNotFoundException - if the folder the url points to can't be foundXmlFileParseException - if there was an error while parsing a children's XML descriptorXmlMergeException - if there was an error while attempting to do a merge of XML descriptorsItemProcessingException - if there was an error while processing an itemStoreException - if an error occurred while accessing the content storeTree findTree(Context context, CachingOptions cachingOptions, String url, int depth, ItemFilter filter, ItemProcessor processor) throws InvalidContextException, XmlFileParseException, XmlMergeException, ItemProcessingException, StoreException
Items when they're files and as Trees when they're folders.context - the context to the content store (required)cachingOptions - the caching options for any caching operation done inside this service call (optional)url - the url of the folder (required)depth - the number of levels the tree should have. Use #UNLIMITED_TREE_DEPTH when you want the
tree to include all files/folder until the bottom of the folder hierarchy (required)filter - an ItemFilter to filter out undesired items in the tree (optional, can be null)processor - additional ItemProcessor for the tree's items (optional, can be null)InvalidContextException - if the context is invalidXmlFileParseException - if there was an error while parsing a children's XML descriptorXmlMergeException - if there was an error while attempting to do a merge of XML descriptorsItemProcessingException - if there was an error while processing an itemStoreException - if an error occurred while accessing the content storeTree getTree(Context context, CachingOptions cachingOptions, String url, int depth, ItemFilter filter, ItemProcessor processor) throws InvalidContextException, PathNotFoundException, XmlFileParseException, XmlMergeException, ItemProcessingException, StoreException
Items when they're
files and as Trees when they're folders.context - the context to the content store (required)cachingOptions - the caching options for any caching operation done inside this service call (optional)url - the url of the folder (required)depth - the number of levels the tree should have. Use #UNLIMITED_TREE_DEPTH when you want the
tree to include all files/folder until the bottom of the folder hierarchy (required)filter - an ItemFilter to filter out undesired items in the tree (optional, can be null)processor - additional ItemProcessor for the tree's items (optional, can be null)InvalidContextException - if the context is invalidPathNotFoundException - if the folder the url points to can't be foundXmlFileParseException - if there was an error while parsing a children's XML descriptorXmlMergeException - if there was an error while attempting to do a merge of XML descriptorsItemProcessingException - if there was an error while processing an itemStoreException - if an error occurred while accessing the content storeCopyright © 2018 CrafterCMS. All rights reserved.