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.list.paging.PageResponse<de.digitalcollections.model.identifiable.entity.Topic> findChildren​(UUID nodeUuid,
                                                                                                                                        de.digitalcollections.model.list.paging.PageRequest pageRequest)
        Specified by:
        findChildren in interface NodeService<de.digitalcollections.model.identifiable.entity.Topic>
      • findEntities

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

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

        public de.digitalcollections.model.list.paging.PageResponse<de.digitalcollections.model.identifiable.entity.Topic> findRootNodes​(de.digitalcollections.model.list.paging.PageRequest pageRequest)
        Specified by:
        findRootNodes in interface NodeService<de.digitalcollections.model.identifiable.entity.Topic>
      • 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>
      • getEntities

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

        public List<de.digitalcollections.model.identifiable.resource.FileResource> getFileResources​(UUID topicUuid)
        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>
      • 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>
      • 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
      • setEntities

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

        public List<de.digitalcollections.model.identifiable.resource.FileResource> setFileResources​(UUID topicUuid,
                                                                                                     List<de.digitalcollections.model.identifiable.resource.FileResource> fileResources)
        Specified by:
        setFileResources in interface TopicService
      • 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>