java.lang.Object
de.digitalcollections.cudami.server.business.impl.service.identifiable.IdentifiableServiceImpl<P>
de.digitalcollections.cudami.server.business.impl.service.identifiable.entity.parts.EntityPartServiceImpl<de.digitalcollections.model.api.identifiable.entity.parts.Subtopic>
de.digitalcollections.cudami.server.business.impl.service.identifiable.entity.parts.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 Details

    • SubtopicServiceImpl

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

    • addChildren

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

      public de.digitalcollections.model.api.identifiable.entity.parts.Subtopic addSubtopicToParentSubtopic​(java.util.UUID subtopicUuid, java.util.UUID parentSubtopicUuid) throws IdentifiableServiceException
      Specified by:
      addSubtopicToParentSubtopic in interface SubtopicService
      Throws:
      IdentifiableServiceException
    • addSubtopicToParentTopic

      public de.digitalcollections.model.api.identifiable.entity.parts.Subtopic addSubtopicToParentTopic​(java.util.UUID subtopicUuid, java.util.UUID parentTopicUuid) throws IdentifiableServiceException
      Specified by:
      addSubtopicToParentTopic in interface SubtopicService
      Throws:
      IdentifiableServiceException
    • removeFromParentSubtopic

      public java.lang.Integer removeFromParentSubtopic​(java.util.UUID subtopicUuid, java.util.UUID parentSubtopicUuid)
      Specified by:
      removeFromParentSubtopic in interface SubtopicService
    • deleteFromParentTopic

      public java.lang.Integer deleteFromParentTopic​(de.digitalcollections.model.api.identifiable.entity.parts.Subtopic subtopic, java.util.UUID topicUuid)
      Specified by:
      deleteFromParentTopic in interface SubtopicService
    • removeFromParentTopic

      public java.lang.Integer removeFromParentTopic​(java.util.UUID subtopicUuid, java.util.UUID topicUuid)
      Specified by:
      removeFromParentTopic in interface SubtopicService
    • getBreadcrumbNavigation

      public de.digitalcollections.model.api.view.BreadcrumbNavigation getBreadcrumbNavigation​(java.util.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 java.util.List<de.digitalcollections.model.api.identifiable.entity.parts.Subtopic> getChildren​(java.util.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​(java.util.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 java.util.List<de.digitalcollections.model.api.identifiable.entity.Entity> getEntities​(java.util.UUID subtopicUuid)
      Specified by:
      getEntities in interface SubtopicService
    • getFileResources

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

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

      public java.util.List<de.digitalcollections.model.api.identifiable.entity.parts.Subtopic> getParents​(java.util.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>
    • getRootNodesLanguages

      public java.util.List<java.util.Locale> getRootNodesLanguages()
      Specified by:
      getRootNodesLanguages in interface NodeService<de.digitalcollections.model.api.identifiable.entity.parts.Subtopic>
    • getSubtopicsOfEntity

      public java.util.List<de.digitalcollections.model.api.identifiable.entity.parts.Subtopic> getSubtopicsOfEntity​(java.util.UUID entityUuid)
      Specified by:
      getSubtopicsOfEntity in interface SubtopicService
    • getSubtopicsOfFileResource

      public java.util.List<de.digitalcollections.model.api.identifiable.entity.parts.Subtopic> getSubtopicsOfFileResource​(java.util.UUID fileResourceUuid)
      Specified by:
      getSubtopicsOfFileResource in interface SubtopicService
    • getTopic

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

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

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

      public java.util.List<de.digitalcollections.model.api.identifiable.resource.FileResource> saveFileResources​(java.util.UUID subtopicUuid, java.util.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, java.util.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
    • saveWithParentTopic

      public de.digitalcollections.model.api.identifiable.entity.parts.Subtopic saveWithParentTopic​(de.digitalcollections.model.api.identifiable.entity.parts.Subtopic subtopic, java.util.UUID parentTopicUuid) throws IdentifiableServiceException
      Specified by:
      saveWithParentTopic in interface SubtopicService
      Throws:
      IdentifiableServiceException
    • updateChildrenOrder

      public boolean updateChildrenOrder​(java.util.UUID parentUuid, java.util.List<de.digitalcollections.model.api.identifiable.entity.parts.Subtopic> children)
      Specified by:
      updateChildrenOrder in interface NodeService<de.digitalcollections.model.api.identifiable.entity.parts.Subtopic>