Class SubtopicServiceImpl

  • All Implemented Interfaces:
    EntityPartService<de.digitalcollections.model.api.identifiable.entity.parts.Subtopic>, SubtopicService, IdentifiableService<de.digitalcollections.model.api.identifiable.entity.parts.Subtopic>, NodeService<de.digitalcollections.model.api.identifiable.entity.parts.Subtopic>

    @Service
    public class SubtopicServiceImpl
    extends EntityPartServiceImpl<de.digitalcollections.model.api.identifiable.entity.parts.Subtopic>
    implements SubtopicService
    Service for Subtopic handling.
    • Constructor Detail

      • SubtopicServiceImpl

        @Autowired
        public SubtopicServiceImpl​(SubtopicRepository repository)
    • Method Detail

      • addChildren

        public boolean addChildren​(UUID parentUuid,
                                   List<de.digitalcollections.model.api.identifiable.entity.parts.Subtopic> collections)
        Specified by:
        addChildren in interface NodeService<de.digitalcollections.model.api.identifiable.entity.parts.Subtopic>
      • getBreadcrumbNavigation

        public de.digitalcollections.model.api.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.api.identifiable.entity.parts.Subtopic>
        Parameters:
        nodeUuid - the uuid of the node.
        Returns:
        BreadcrumbNavigation with labels in all available languages
      • getChildren

        public List<de.digitalcollections.model.api.identifiable.entity.parts.Subtopic> getChildren​(UUID uuid)
        Specified by:
        getChildren in interface NodeService<de.digitalcollections.model.api.identifiable.entity.parts.Subtopic>
      • getChildren

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

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

        public List<de.digitalcollections.model.api.identifiable.resource.FileResource> getFileResources​(UUID subtopicUuid)
        Specified by:
        getFileResources in interface SubtopicService
      • getParent

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

        public List<de.digitalcollections.model.api.identifiable.entity.parts.Subtopic> getParents​(UUID uuid)
        Specified by:
        getParents in interface NodeService<de.digitalcollections.model.api.identifiable.entity.parts.Subtopic>
      • getRootNodes

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

        public de.digitalcollections.model.api.identifiable.entity.Topic getTopic​(UUID subtopicUuid)
        Specified by:
        getTopic in interface SubtopicService
      • removeChild

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

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

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

        public de.digitalcollections.model.api.identifiable.entity.parts.Subtopic saveWithParent​(de.digitalcollections.model.api.identifiable.entity.parts.Subtopic child,
                                                                                                 UUID parentSubtopicUuid)
                                                                                          throws IdentifiableServiceException
        Specified by:
        saveWithParent in interface NodeService<de.digitalcollections.model.api.identifiable.entity.parts.Subtopic>
        Parameters:
        child - newly created child node to be saved
        parentSubtopicUuid - 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.api.identifiable.entity.parts.Subtopic> children)
        Specified by:
        updateChildrenOrder in interface NodeService<de.digitalcollections.model.api.identifiable.entity.parts.Subtopic>