Interface IUriService
-
- All Known Implementing Classes:
UriService
public interface IUriService
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description UriNodecreateDefault()Creates default UriNodejava.util.List<UriNode>findAllByParent(java.lang.String parentId)Retrieves all UriNode based on parent IDUriNodefindById(java.lang.String id)Retrieves UriNode based on IDjava.util.List<UriNode>findByLevel(int level)Retrieves UriNode based on levelUriNodefindByUri(java.lang.String path)Retrieves UriNode based on uriUriNodegetOrCreate(PetriNet petriNet, UriContentType contentType)Creates new UriNode from PetriNet identifier, or retrieves existing oneUriNodegetOrCreate(java.lang.String uri, UriContentType contentType)Creates new UriNode from URI path, or retrieves existing oneUriNodegetRoot()Retrieves UriNode that is root nodeUriNodemove(UriNode node, java.lang.String destUri)Moves UriNode to other destinationUriNodemove(java.lang.String uri, java.lang.String destUri)Moves UriNode to other destinationUriNodepopulateDirectRelatives(UriNode uriNode)Collects direct relatives (parent and children) of input UriNode and returns filled objectUriNodesave(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(PetriNet petriNet, UriContentType contentType)
Creates new UriNode from PetriNet identifier, or retrieves existing one- Parameters:
petriNet- to be used for creating UriNodecontentType- to decide the content type of UriNode- Returns:
- the UriNode that was created or modified
-
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
-
-