Class CollectionServiceImpl

    • Constructor Detail

      • CollectionServiceImpl

        @Autowired
        public CollectionServiceImpl​(CollectionRepository repository)
    • Method Detail

      • addChildren

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

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

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

        public de.digitalcollections.model.api.paging.SearchPageResponse<de.digitalcollections.model.api.identifiable.entity.Collection> findActive​(de.digitalcollections.model.api.paging.SearchPageRequest pageRequest)
        Specified by:
        findActive in interface CollectionService
      • getActive

        public de.digitalcollections.model.api.identifiable.entity.Collection getActive​(UUID uuid)
        Specified by:
        getActive in interface CollectionService
      • getActive

        public de.digitalcollections.model.api.identifiable.entity.Collection getActive​(UUID uuid,
                                                                                        Locale pLocale)
        Specified by:
        getActive in interface CollectionService
      • getActiveChildren

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

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

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

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

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

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

        public List<de.digitalcollections.model.api.identifiable.entity.agent.CorporateBody> getRelatedCorporateBodies​(UUID uuid,
                                                                                                                       de.digitalcollections.model.api.filter.Filtering filtering)
        Specified by:
        getRelatedCorporateBodies in interface CollectionService
      • getRootNodes

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

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

        public boolean removeDigitalObjectFromAllCollections​(de.digitalcollections.model.api.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
      • saveDigitalObjects

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

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