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.list.paging.PageResponse<N>findChildren(UUID uuid, de.digitalcollections.model.list.paging.PageRequest pageRequest)de.digitalcollections.model.list.paging.PageResponse<N>findRootNodes(de.digitalcollections.model.list.paging.PageRequest pageRequest)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)default List<N>getChildren(N node)NgetParent(UUID nodeUuid)default NgetParent(N node)List<N>getParents(UUID uuid)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, find, find, findByLanguageAndInitial, getAllFull, getAllReduced, getByIdentifier, getByIdentifier, getByUuid, getByUuidAndLocale, getLanguages, getRelatedEntities, getRelatedEntities, getRelatedFileResources, getRelatedFileResources, save, saveRelatedEntities, setRelatedEntities, setRelatedFileResources, setRelatedFileResources, 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)
-
findChildren
de.digitalcollections.model.list.paging.PageResponse<N> findChildren(UUID uuid, de.digitalcollections.model.list.paging.PageRequest pageRequest)
-
findRootNodes
de.digitalcollections.model.list.paging.PageResponse<N> findRootNodes(de.digitalcollections.model.list.paging.PageRequest pageRequest)
-
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
-
-