Interface NodeService<N extends de.digitalcollections.model.identifiable.Identifiable>
-
- All Superinterfaces:
IdentifiableService<N>
- All Known Subinterfaces:
CollectionService,TopicService,WebpageService
- All Known Implementing Classes:
CollectionServiceImpl,TopicServiceImpl,WebpageServiceImpl
public interface NodeService<N extends de.digitalcollections.model.identifiable.Identifiable> extends IdentifiableService<N>
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default booleanaddChild(UUID parentUuid, UUID childUuid)default booleanaddChild(N parent, N child)booleanaddChildren(UUID parentUuid, List<UUID> childrenUUIDs)default booleanaddChildren(N parent, List<N> children)de.digitalcollections.model.paging.SearchPageResponse<N>findChildren(UUID uuid, de.digitalcollections.model.paging.SearchPageRequest searchPageRequest)de.digitalcollections.model.paging.SearchPageResponse<N>findRootNodes(de.digitalcollections.model.paging.SearchPageRequest searchPageRequest)de.digitalcollections.model.view.BreadcrumbNavigationgetBreadcrumbNavigation(UUID nodeUuid)Build and return the breadcrumb navigation for the given node UUIDdefault de.digitalcollections.model.view.BreadcrumbNavigationgetBreadcrumbNavigation(UUID nodeUuid, Locale locale, Locale fallbackLocale)Build and return the breadcrumb navigation for the given webpage UUID and desired locale.List<N>getChildren(UUID nodeUuid)de.digitalcollections.model.paging.PageResponse<N>getChildren(UUID uuid, de.digitalcollections.model.paging.PageRequest pageRequest)default List<N>getChildren(N node)NgetParent(UUID nodeUuid)default NgetParent(N node)List<N>getParents(UUID uuid)de.digitalcollections.model.paging.PageResponse<N>getRootNodes(de.digitalcollections.model.paging.PageRequest pageRequest)List<Locale>getRootNodesLanguages()booleanremoveChild(UUID parentUuid, UUID childUuid)default booleanremoveChild(N parent, N child)NsaveWithParent(UUID childUuid, UUID parentUuid)default NsaveWithParent(N child, UUID parentUuid)booleanupdateChildrenOrder(UUID parentUuid, List<N> children)-
Methods inherited from interface de.digitalcollections.cudami.server.business.api.service.identifiable.IdentifiableService
addRelatedEntity, addRelatedEntity, addRelatedFileresource, addRelatedFileresource, cleanupLabelFromUnwantedLocales, count, delete, delete, deleteIdentifiers, find, find, find, findAllFull, findAllReduced, findByLanguageAndInitial, get, get, get, getByIdentifier, getLanguages, getRelatedEntities, getRelatedEntities, getRelatedFileResources, getRelatedFileResources, save, saveRelatedEntities, saveRelatedEntities, saveRelatedFileResources, saveRelatedFileResources, update
-
-
-
-
Method Detail
-
getBreadcrumbNavigation
de.digitalcollections.model.view.BreadcrumbNavigation getBreadcrumbNavigation(UUID nodeUuid)
Build and return the breadcrumb navigation for the given node UUID- Parameters:
nodeUuid- the uuid of the node.- Returns:
- BreadcrumbNavigation with labels in all available languages
-
getBreadcrumbNavigation
default de.digitalcollections.model.view.BreadcrumbNavigation getBreadcrumbNavigation(UUID nodeUuid, Locale locale, Locale fallbackLocale)
Build and return the breadcrumb navigation for the given webpage UUID and desired locale. If no label for that locale exists, use the label for the fallbackLocale, and if even this fails, use the first locale.- Parameters:
nodeUuid- the uuid of the webpagelocale- the desired locale for the navigation item labelsfallbackLocale- the fallback locale for the navigation item labels- Returns:
- Breadcrumb navigation with labels in the desired language (if possible)
-
getChildren
de.digitalcollections.model.paging.PageResponse<N> getChildren(UUID uuid, de.digitalcollections.model.paging.PageRequest pageRequest)
-
findChildren
de.digitalcollections.model.paging.SearchPageResponse<N> findChildren(UUID uuid, de.digitalcollections.model.paging.SearchPageRequest searchPageRequest)
-
getRootNodes
de.digitalcollections.model.paging.PageResponse<N> getRootNodes(de.digitalcollections.model.paging.PageRequest pageRequest)
-
findRootNodes
de.digitalcollections.model.paging.SearchPageResponse<N> findRootNodes(de.digitalcollections.model.paging.SearchPageRequest searchPageRequest)
-
saveWithParent
default N saveWithParent(N child, UUID parentUuid) throws IdentifiableServiceException, ValidationException
- Parameters:
child- newly created child node to be savedparentUuid- parent node the new node is child of- Returns:
- saved child node
- Throws:
IdentifiableServiceException- if saving failsValidationException
-
saveWithParent
N saveWithParent(UUID childUuid, UUID parentUuid) throws IdentifiableServiceException
- Parameters:
childUuid- UUID of newly created child nodeparentUuid- parent node the new node is child of- Returns:
- saved child node
- Throws:
IdentifiableServiceException- if saving fails
-
-