Package org.craftercms.engine.service
Interface SiteItemService
-
- All Known Implementing Classes:
SiteItemServiceImpl
public interface SiteItemService
Service for accessingSiteItem
s of the current site.- Author:
- Alfonso Vásquez
-
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description org.craftercms.core.service.Content
getRawContent(String url)
Returns the raw content of a site item.SiteItem
getSiteItem(String url)
Returns the site item for the given URLSiteItem
getSiteItem(String url, org.craftercms.core.processors.ItemProcessor processor)
Returns the site item for the given URLSiteItem
getSiteItem(String url, org.craftercms.core.processors.ItemProcessor processor, org.apache.commons.collections4.Predicate<org.craftercms.core.service.Item> predicate)
Returns the site item for the given URLSiteItem
getSiteItem(SiteItem parent, org.dom4j.Element element)
Returns the site item for the given XML elementSiteItem
getSiteTree(String url, int depth)
Returns the site tree for the given URL.SiteItem
getSiteTree(String url, int depth, String includeByNameRegex, String excludeByNameRegex)
Deprecated.SiteItem
getSiteTree(String url, int depth, String includeByNameRegex, String excludeByNameRegex, String[]... nodeXPathAndExpectedValuePairs)
Deprecated.SiteItem
getSiteTree(String url, int depth, String includeByNameRegex, String excludeByNameRegex, Map<String,String> nodeXPathAndExpectedValuePairs)
Deprecated.SiteItem
getSiteTree(String url, int depth, org.craftercms.core.service.ItemFilter filter, org.craftercms.core.processors.ItemProcessor processor)
Returns the site tree for the given URL.
-
-
-
Method Detail
-
getRawContent
org.craftercms.core.service.Content getRawContent(String url)
Returns the raw content of a site item.- Parameters:
url
- the URL of the item
-
getSiteItem
SiteItem getSiteItem(SiteItem parent, org.dom4j.Element element)
Returns the site item for the given XML element- Parameters:
element
- the XML element- Returns:
- the site item
- Since:
- 3.1.2
-
getSiteItem
SiteItem getSiteItem(String url)
Returns the site item for the given URL- Parameters:
url
- the URL of the item
-
getSiteItem
SiteItem getSiteItem(String url, org.craftercms.core.processors.ItemProcessor processor)
Returns the site item for the given URL- Parameters:
url
- the URL of the itemprocessor
- a processor for the item
-
getSiteItem
SiteItem getSiteItem(String url, org.craftercms.core.processors.ItemProcessor processor, org.apache.commons.collections4.Predicate<org.craftercms.core.service.Item> predicate)
Returns the site item for the given URL- Parameters:
url
- the URL of the itemprocessor
- a processor for the itempredicate
- a predicate used to check if the item should be returned or not
-
getSiteTree
SiteItem getSiteTree(String url, int depth)
Returns the site tree for the given URL. The item is expected to be a folder.- Parameters:
url
- the URL of the folderdepth
- the depth of the returned tree
-
getSiteTree
SiteItem getSiteTree(String url, int depth, org.craftercms.core.service.ItemFilter filter, org.craftercms.core.processors.ItemProcessor processor)
Returns the site tree for the given URL. The item is expected to be a folder.- Parameters:
url
- the URL of the folderdepth
- the depth of the returned treefilter
- a filter for the tree itemsprocessor
- a processor for the tree items
-
getSiteTree
@Deprecated SiteItem getSiteTree(String url, int depth, String includeByNameRegex, String excludeByNameRegex)
Deprecated.Returns the site tree for the given URL. The item is expected to be a folder.- Parameters:
url
- the URL of the folderdepth
- the depth of the returned treeincludeByNameRegex
- a name regex for items to includeexcludeByNameRegex
- a name regex for items to exclude
-
getSiteTree
@Deprecated SiteItem getSiteTree(String url, int depth, String includeByNameRegex, String excludeByNameRegex, String[]... nodeXPathAndExpectedValuePairs)
Deprecated.Returns the site tree for the given URL. The item is expected to be a folder.- Parameters:
url
- the URL of the folderdepth
- the depth of the returned treeincludeByNameRegex
- a name regex for items to includeexcludeByNameRegex
- a name regex for items to excludenodeXPathAndExpectedValuePairs
- an X * 2 matrix where the first column is a node XPath and the second column is a expected value for that node. This XPath/value pairs are used to filter out items.
-
getSiteTree
@Deprecated SiteItem getSiteTree(String url, int depth, String includeByNameRegex, String excludeByNameRegex, Map<String,String> nodeXPathAndExpectedValuePairs)
Deprecated.Returns the site tree for the given URL. The item is expected to be a folder.- Parameters:
url
- the URL of the folderdepth
- the depth of the returned treeincludeByNameRegex
- a name regex for items to includeexcludeByNameRegex
- a name regex for items to excludenodeXPathAndExpectedValuePairs
- a map where each key is a node XPath and each value is a expected value for that node. This XPath/value pairs are used to filter out items.
-
-