Interface NodeService<N extends de.digitalcollections.model.identifiable.Identifiable>

All Superinterfaces:
IdentifiableService<N>, UniqueObjectService<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 Details

    • addChild

      boolean addChild(N parent, N child) throws ServiceException
      Throws:
      ServiceException
    • addChildren

      boolean addChildren(N parent, List<N> children) throws ServiceException
      Throws:
      ServiceException
    • findChildren

      de.digitalcollections.model.list.paging.PageResponse<N> findChildren(N parent, de.digitalcollections.model.list.paging.PageRequest pageRequest) throws ServiceException
      Throws:
      ServiceException
    • findRootNodes

      de.digitalcollections.model.list.paging.PageResponse<N> findRootNodes(de.digitalcollections.model.list.paging.PageRequest pageRequest) throws ServiceException
      Throws:
      ServiceException
    • getBreadcrumbNavigation

      default de.digitalcollections.model.view.BreadcrumbNavigation getBreadcrumbNavigation(N node, Locale locale, Locale fallbackLocale) throws ServiceException
      Build and return the breadcrumb navigation for the given node 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:
      node - the node
      locale - the desired locale for the navigation item labels
      fallbackLocale - the fallback locale for the navigation item labels
      Returns:
      Breadcrumb navigation with labels in the desired language (if possible)
      Throws:
      ServiceException
    • getBreadcrumbNavigation

      de.digitalcollections.model.view.BreadcrumbNavigation getBreadcrumbNavigation(N node) throws ServiceException
      Build and return the breadcrumb navigation for the given node
      Parameters:
      node - the node.
      Returns:
      BreadcrumbNavigation with labels in all available languages
      Throws:
      ServiceException
    • getChildren

      List<N> getChildren(N node) throws ServiceException
      Throws:
      ServiceException
    • getParent

      N getParent(N node) throws ServiceException
      Throws:
      ServiceException
    • getParents

      List<N> getParents(N node) throws ServiceException
      Throws:
      ServiceException
    • getRootNodesLanguages

      List<Locale> getRootNodesLanguages() throws ServiceException
      Throws:
      ServiceException
    • removeChild

      boolean removeChild(N parent, N child) throws ServiceException
      Throws:
      ServiceException
    • saveWithParent

      N saveWithParent(N child, N parent) throws ServiceException
      Parameters:
      child - newly created child node to be saved
      parent - parent node the new node is child of
      Returns:
      saved child node
      Throws:
      ServiceException - if saving fails
    • updateChildrenOrder

      boolean updateChildrenOrder(N parent, List<N> children) throws ServiceException
      Throws:
      ServiceException