Class TopicServiceImpl

  • All Implemented Interfaces:
    EntityService<de.digitalcollections.model.identifiable.entity.Topic>, TopicService, IdentifiableService<de.digitalcollections.model.identifiable.entity.Topic>, NodeService<de.digitalcollections.model.identifiable.entity.Topic>

    @Service
    public class TopicServiceImpl
    extends EntityServiceImpl<de.digitalcollections.model.identifiable.entity.Topic>
    implements TopicService
    Service for Topic handling.
    • Method Detail

      • addChildren

        public boolean addChildren​(UUID parentUuid,
                                   List<UUID> childrenUuids)
        Specified by:
        addChildren in interface NodeService<de.digitalcollections.model.identifiable.entity.Topic>
      • findChildren

        public de.digitalcollections.model.paging.SearchPageResponse<de.digitalcollections.model.identifiable.entity.Topic> findChildren​(UUID uuid,
                                                                                                                                         de.digitalcollections.model.paging.SearchPageRequest searchPageRequest)
        Specified by:
        findChildren in interface NodeService<de.digitalcollections.model.identifiable.entity.Topic>
      • getAllEntities

        public List<de.digitalcollections.model.identifiable.entity.Entity> getAllEntities​(UUID topicUuid)
        Specified by:
        getAllEntities in interface TopicService
      • getBreadcrumbNavigation

        public de.digitalcollections.model.view.BreadcrumbNavigation getBreadcrumbNavigation​(UUID nodeUuid)
        Description copied from interface: NodeService
        Build and return the breadcrumb navigation for the given node UUID
        Specified by:
        getBreadcrumbNavigation in interface NodeService<de.digitalcollections.model.identifiable.entity.Topic>
        Parameters:
        nodeUuid - the uuid of the node.
        Returns:
        BreadcrumbNavigation with labels in all available languages
      • getChildren

        public List<de.digitalcollections.model.identifiable.entity.Topic> getChildren​(UUID nodeUuid)
        Specified by:
        getChildren in interface NodeService<de.digitalcollections.model.identifiable.entity.Topic>
      • getChildren

        public de.digitalcollections.model.paging.PageResponse<de.digitalcollections.model.identifiable.entity.Topic> getChildren​(UUID nodeUuid,
                                                                                                                                  de.digitalcollections.model.paging.PageRequest pageRequest)
        Specified by:
        getChildren in interface NodeService<de.digitalcollections.model.identifiable.entity.Topic>
      • getEntities

        public de.digitalcollections.model.paging.PageResponse<de.digitalcollections.model.identifiable.entity.Entity> getEntities​(UUID topicUuid,
                                                                                                                                   de.digitalcollections.model.paging.PageRequest pageRequest)
        Specified by:
        getEntities in interface TopicService
      • getFileResources

        public List<de.digitalcollections.model.identifiable.resource.FileResource> getFileResources​(UUID topicUuid)
        Specified by:
        getFileResources in interface TopicService
      • getFileResources

        public de.digitalcollections.model.paging.PageResponse<de.digitalcollections.model.identifiable.resource.FileResource> getFileResources​(UUID topicUuid,
                                                                                                                                                de.digitalcollections.model.paging.PageRequest pageRequest)
        Specified by:
        getFileResources in interface TopicService
      • getParent

        public de.digitalcollections.model.identifiable.entity.Topic getParent​(UUID nodeUuid)
        Specified by:
        getParent in interface NodeService<de.digitalcollections.model.identifiable.entity.Topic>
      • getParents

        public List<de.digitalcollections.model.identifiable.entity.Topic> getParents​(UUID nodeUuid)
        Specified by:
        getParents in interface NodeService<de.digitalcollections.model.identifiable.entity.Topic>
      • getRootNodes

        public de.digitalcollections.model.paging.PageResponse<de.digitalcollections.model.identifiable.entity.Topic> getRootNodes​(de.digitalcollections.model.paging.PageRequest pageRequest)
        Specified by:
        getRootNodes in interface NodeService<de.digitalcollections.model.identifiable.entity.Topic>
      • getTopicsOfEntity

        public List<de.digitalcollections.model.identifiable.entity.Topic> getTopicsOfEntity​(UUID entityUuid)
        Specified by:
        getTopicsOfEntity in interface TopicService
      • removeChild

        public boolean removeChild​(UUID parentUuid,
                                   UUID childUuid)
        Specified by:
        removeChild in interface NodeService<de.digitalcollections.model.identifiable.entity.Topic>
      • saveEntities

        public List<de.digitalcollections.model.identifiable.entity.Entity> saveEntities​(UUID topicUuid,
                                                                                         List<de.digitalcollections.model.identifiable.entity.Entity> entities)
        Specified by:
        saveEntities in interface TopicService
      • saveFileResources

        public List<de.digitalcollections.model.identifiable.resource.FileResource> saveFileResources​(UUID topicUuid,
                                                                                                      List<de.digitalcollections.model.identifiable.resource.FileResource> fileResources)
        Specified by:
        saveFileResources in interface TopicService
      • saveWithParent

        public de.digitalcollections.model.identifiable.entity.Topic saveWithParent​(UUID childUuid,
                                                                                    UUID parentUuid)
                                                                             throws IdentifiableServiceException
        Specified by:
        saveWithParent in interface NodeService<de.digitalcollections.model.identifiable.entity.Topic>
        Parameters:
        childUuid - UUID of newly created child node
        parentUuid - parent node the new node is child of
        Returns:
        saved child node
        Throws:
        IdentifiableServiceException - if saving fails
      • updateChildrenOrder

        public boolean updateChildrenOrder​(UUID parentUuid,
                                           List<de.digitalcollections.model.identifiable.entity.Topic> children)
        Specified by:
        updateChildrenOrder in interface NodeService<de.digitalcollections.model.identifiable.entity.Topic>
      • findRootNodes

        public de.digitalcollections.model.paging.SearchPageResponse<de.digitalcollections.model.identifiable.entity.Topic> findRootNodes​(de.digitalcollections.model.paging.SearchPageRequest searchPageRequest)
        Specified by:
        findRootNodes in interface NodeService<de.digitalcollections.model.identifiable.entity.Topic>