Class CollectionServiceImpl

    • Method Detail

      • addChildren

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

        public boolean addDigitalObjects​(UUID collectionUuid,
                                         List<de.digitalcollections.model.identifiable.entity.DigitalObject> digitalObjects)
        Specified by:
        addDigitalObjects in interface CollectionService
      • findActive

        public de.digitalcollections.model.list.paging.PageResponse<de.digitalcollections.model.identifiable.entity.Collection> findActive​(de.digitalcollections.model.list.paging.PageRequest pageRequest)
        Specified by:
        findActive in interface CollectionService
      • findActiveChildren

        public de.digitalcollections.model.list.paging.PageResponse<de.digitalcollections.model.identifiable.entity.Collection> findActiveChildren​(UUID uuid,
                                                                                                                                                   de.digitalcollections.model.list.paging.PageRequest pageRequest)
        Specified by:
        findActiveChildren in interface CollectionService
      • findChildren

        public de.digitalcollections.model.list.paging.PageResponse<de.digitalcollections.model.identifiable.entity.Collection> findChildren​(UUID nodeUuid,
                                                                                                                                             de.digitalcollections.model.list.paging.PageRequest pageRequest)
        Specified by:
        findChildren in interface NodeService<de.digitalcollections.model.identifiable.entity.Collection>
      • findDigitalObjects

        public de.digitalcollections.model.list.paging.PageResponse<de.digitalcollections.model.identifiable.entity.DigitalObject> findDigitalObjects​(UUID collectionUuid,
                                                                                                                                                      de.digitalcollections.model.list.paging.PageRequest pageRequest)
        Specified by:
        findDigitalObjects in interface CollectionService
      • findRelatedCorporateBodies

        public List<de.digitalcollections.model.identifiable.entity.agent.CorporateBody> findRelatedCorporateBodies​(UUID uuid,
                                                                                                                    de.digitalcollections.model.list.filtering.Filtering filtering)
        Specified by:
        findRelatedCorporateBodies in interface CollectionService
      • findRootNodes

        public de.digitalcollections.model.list.paging.PageResponse<de.digitalcollections.model.identifiable.entity.Collection> findRootNodes​(de.digitalcollections.model.list.paging.PageRequest pageRequest)
        Specified by:
        findRootNodes in interface NodeService<de.digitalcollections.model.identifiable.entity.Collection>
      • getActive

        public de.digitalcollections.model.identifiable.entity.Collection getActive​(UUID uuid)
        Specified by:
        getActive in interface CollectionService
      • 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.Collection>
        Parameters:
        nodeUuid - the uuid of the node.
        Returns:
        BreadcrumbNavigation with labels in all available languages
      • getChildren

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

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

        public List<de.digitalcollections.model.identifiable.entity.Collection> getParents​(UUID uuid)
        Specified by:
        getParents in interface NodeService<de.digitalcollections.model.identifiable.entity.Collection>
      • removeChild

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

        public boolean removeDigitalObjectFromAllCollections​(de.digitalcollections.model.identifiable.entity.DigitalObject digitalObject)
        Description copied from interface: CollectionService
        Removes a digitalObject from all collections, to which it was connected to.
        Specified by:
        removeDigitalObjectFromAllCollections in interface CollectionService
        Parameters:
        digitalObject - the digital object
        Returns:
        boolean value for success
      • saveWithParent

        public de.digitalcollections.model.identifiable.entity.Collection saveWithParent​(UUID childUuid,
                                                                                         UUID parentUuid)
                                                                                  throws IdentifiableServiceException
        Specified by:
        saveWithParent in interface NodeService<de.digitalcollections.model.identifiable.entity.Collection>
        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
      • setDigitalObjects

        public boolean setDigitalObjects​(UUID collectionUuid,
                                         List<de.digitalcollections.model.identifiable.entity.DigitalObject> digitalObjects)
        Specified by:
        setDigitalObjects in interface CollectionService
      • updateChildrenOrder

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

        protected void setNodeRepository​(NodeRepository<de.digitalcollections.model.identifiable.entity.Collection> nodeRepository)
        Only for testing purposes
        Parameters:
        nodeRepository - The NodeRepository