Interface ContentServiceInternal
-
- All Known Implementing Classes:
ContentServiceInternalImpl
public interface ContentServiceInternal
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description GetChildrenResult
getChildrenByPath(String siteId, String path, String locale, String keyword, List<String> systemTypes, List<String> excludes, String sortStrategy, String order, int offset, int limit)
Get list of children for given pathOptional<org.springframework.core.io.Resource>
getContentByCommitId(String siteId, String path, String commitId)
Get content for commit idlong
getContentSize(String siteId, String path)
Get content sizeorg.craftercms.core.service.Item
getItem(String siteId, String path, boolean flatten)
DetailedItem
getItemByPath(String siteId, String path, boolean preferContent)
Get detailed for given pathList<SandboxItem>
getSandboxItemsById(String siteId, List<Long> ids, boolean preferContent)
Get sandbox items for given list of pathsList<SandboxItem>
getSandboxItemsByPath(String siteId, List<String> paths, boolean preferContent)
Get sandbox items for given list of pathsList<String>
getSubtreeItems(String siteId, String path)
Get subtree items for given path.List<String>
getSubtreeItems(String siteId, List<String> path)
Get subtree items for given paths.boolean
isEditable(String itemPath, String itemMimeType)
Check if item is editablevoid
itemLockByPath(String siteId, String path)
Lock item by path for given sitevoid
itemUnlockByPath(String siteId, String path)
Unlock item by path for given site
-
-
-
Method Detail
-
getSubtreeItems
List<String> getSubtreeItems(String siteId, String path)
Get subtree items for given path.- Parameters:
siteId
- site identifierpath
- path to get subtree items for- Returns:
- list of paths of subtree items
-
getSubtreeItems
List<String> getSubtreeItems(String siteId, List<String> path)
Get subtree items for given paths.- Parameters:
siteId
- site identifierpath
- list of paths to get subtree items for- Returns:
- list of paths of subtree items
-
getChildrenByPath
GetChildrenResult getChildrenByPath(String siteId, String path, String locale, String keyword, List<String> systemTypes, List<String> excludes, String sortStrategy, String order, int offset, int limit) throws ServiceLayerException, UserNotFoundException
Get list of children for given path- Parameters:
siteId
- site identifierpath
- item path to children forlocale
- filter children by localekeyword
- filter children by keywordsystemTypes
- filter children by typeexcludes
- exclude items by pathsortStrategy
- sort orderorder
- ascending or descendingoffset
- offset of the first child in the resultlimit
- number of children to return- Returns:
- list of children
- Throws:
ServiceLayerException
UserNotFoundException
-
getContentSize
long getContentSize(String siteId, String path)
Get content size- Parameters:
siteId
- site identifierpath
- content path- Returns:
- size in bytes
-
getItemByPath
DetailedItem getItemByPath(String siteId, String path, boolean preferContent) throws ServiceLayerException, UserNotFoundException
Get detailed for given path- Parameters:
siteId
- site identifierpath
- item for pathpreferContent
- if true return content item if available- Returns:
- detailed item
- Throws:
ServiceLayerException
UserNotFoundException
-
getSandboxItemsByPath
List<SandboxItem> getSandboxItemsByPath(String siteId, List<String> paths, boolean preferContent) throws ServiceLayerException, UserNotFoundException
Get sandbox items for given list of paths- Parameters:
siteId
- site identifierpaths
- list of paths to get sandbox itemspreferContent
- if true return content items if available- Returns:
- list of sandbox items
- Throws:
ServiceLayerException
UserNotFoundException
-
getSandboxItemsById
List<SandboxItem> getSandboxItemsById(String siteId, List<Long> ids, boolean preferContent) throws ServiceLayerException, UserNotFoundException
Get sandbox items for given list of paths- Parameters:
siteId
- site identifierids
- list of ids to get sandbox itemspreferContent
- if true return content items if available- Returns:
- list of sandbox items
- Throws:
ServiceLayerException
UserNotFoundException
-
isEditable
boolean isEditable(String itemPath, String itemMimeType)
Check if item is editable- Parameters:
itemPath
- item pathitemMimeType
- item mime type- Returns:
- true if item is editable
-
itemLockByPath
void itemLockByPath(String siteId, String path)
Lock item by path for given site- Parameters:
siteId
- site identifierpath
- item path to lock
-
itemUnlockByPath
void itemUnlockByPath(String siteId, String path)
Unlock item by path for given site- Parameters:
siteId
- site identifierpath
- item path
-
getContentByCommitId
Optional<org.springframework.core.io.Resource> getContentByCommitId(String siteId, String path, String commitId) throws ContentNotFoundException
Get content for commit id- Parameters:
siteId
- site identifierpath
- path of the contentcommitId
- commit id of the content version- Returns:
- the resource if available
- Throws:
ContentNotFoundException
-
-