Interface IUriService
-
- All Known Implementing Classes:
UriService
public interface IUriService
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description UriNode
createDefault()
Creates default UriNodejava.util.List<UriNode>
findAllByParent(java.lang.String parentId)
Retrieves all UriNode based on parent IDUriNode
findById(java.lang.String id)
Retrieves UriNode based on IDjava.util.List<UriNode>
findByLevel(int level)
Retrieves UriNode based on levelUriNode
findByUri(java.lang.String path)
Retrieves UriNode based on uriUriNode
getOrCreate(java.lang.String uri, UriContentType contentType)
Creates new UriNode from URI path, or retrieves existing oneUriNode
getRoot()
Retrieves UriNode that is root nodejava.lang.String
getUriSeparator()
Returns configured uri separatorUriNode
move(UriNode node, java.lang.String destUri)
Moves UriNode to other destinationUriNode
move(java.lang.String uri, java.lang.String destUri)
Moves UriNode to other destinationUriNode
populateDirectRelatives(UriNode uriNode)
Collects direct relatives (parent and children) of input UriNode and returns filled objectUriNode
save(UriNode uriNode)
Saves UriNode object to database
-
-
-
Method Detail
-
save
UriNode save(UriNode uriNode)
Saves UriNode object to database- Parameters:
uriNode
- to be saved
-
findAllByParent
java.util.List<UriNode> findAllByParent(java.lang.String parentId)
Retrieves all UriNode based on parent ID- Parameters:
parentId
- ID of parent UriNode- Returns:
- list of UriNode
-
getRoot
UriNode getRoot()
Retrieves UriNode that is root node- Returns:
- root UriNode
-
findByLevel
java.util.List<UriNode> findByLevel(int level)
Retrieves UriNode based on level- Parameters:
level
- of UriNode- Returns:
- UriNode
-
findById
UriNode findById(java.lang.String id)
Retrieves UriNode based on ID- Parameters:
id
- ID of UriNode- Returns:
- UriNode
-
findByUri
UriNode findByUri(java.lang.String path)
Retrieves UriNode based on uri- Parameters:
path
- of UriNode- Returns:
- UriNode
-
populateDirectRelatives
UriNode populateDirectRelatives(UriNode uriNode)
Collects direct relatives (parent and children) of input UriNode and returns filled object- Parameters:
uriNode
- to be filled with relatives- Returns:
- filled UriNode
-
move
UriNode move(java.lang.String uri, java.lang.String destUri)
Moves UriNode to other destination- Parameters:
uri
- to be moveddestUri
- the destination URI- Returns:
- result UriNode object
-
move
UriNode move(UriNode node, java.lang.String destUri)
Moves UriNode to other destination- Parameters:
node
- to be moveddestUri
- the destination URI- Returns:
- result UriNode object
-
getOrCreate
UriNode getOrCreate(java.lang.String uri, UriContentType contentType)
Creates new UriNode from URI path, or retrieves existing one- Parameters:
uri
- to be used for creating UriNodecontentType
- to decide the content type of UriNode- Returns:
- the UriNode that was created or modified
-
createDefault
UriNode createDefault()
Creates default UriNode- Returns:
- the UriNode that was created or modified
-
getUriSeparator
java.lang.String getUriSeparator()
Returns configured uri separator
-
-