Class SubtopicServiceImpl
- 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.
-
-
Field Summary
-
Fields inherited from class de.digitalcollections.cudami.server.business.impl.service.identifiable.IdentifiableServiceImpl
repository
-
-
Constructor Summary
Constructors Constructor Description SubtopicServiceImpl(SubtopicRepository repository)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanaddChildren(UUID parentUuid, List<de.digitalcollections.model.api.identifiable.entity.parts.Subtopic> collections)de.digitalcollections.model.api.identifiable.entity.parts.SubtopicaddSubtopicToParentSubtopic(UUID subtopicUuid, UUID parentSubtopicUuid)de.digitalcollections.model.api.identifiable.entity.parts.SubtopicaddSubtopicToParentTopic(UUID subtopicUuid, UUID parentTopicUuid)IntegerdeleteFromParentTopic(de.digitalcollections.model.api.identifiable.entity.parts.Subtopic subtopic, UUID topicUuid)de.digitalcollections.model.api.view.BreadcrumbNavigationgetBreadcrumbNavigation(UUID nodeUuid)Build and return the breadcrumb navigation for the given node UUIDList<de.digitalcollections.model.api.identifiable.entity.parts.Subtopic>getChildren(UUID uuid)de.digitalcollections.model.api.paging.PageResponse<de.digitalcollections.model.api.identifiable.entity.parts.Subtopic>getChildren(UUID uuid, de.digitalcollections.model.api.paging.PageRequest pageRequest)List<de.digitalcollections.model.api.identifiable.entity.Entity>getEntities(UUID subtopicUuid)List<de.digitalcollections.model.api.identifiable.resource.FileResource>getFileResources(UUID subtopicUuid)de.digitalcollections.model.api.identifiable.entity.parts.SubtopicgetParent(UUID nodeUuid)List<de.digitalcollections.model.api.identifiable.entity.parts.Subtopic>getParents(UUID uuid)de.digitalcollections.model.api.paging.PageResponse<de.digitalcollections.model.api.identifiable.entity.parts.Subtopic>getRootNodes(de.digitalcollections.model.api.paging.PageRequest pageRequest)List<Locale>getRootNodesLanguages()List<de.digitalcollections.model.api.identifiable.entity.parts.Subtopic>getSubtopicsOfEntity(UUID entityUuid)List<de.digitalcollections.model.api.identifiable.entity.parts.Subtopic>getSubtopicsOfFileResource(UUID fileResourceUuid)de.digitalcollections.model.api.identifiable.entity.TopicgetTopic(UUID subtopicUuid)booleanremoveChild(UUID parentUuid, UUID childUuid)IntegerremoveFromParentSubtopic(UUID subtopicUuid, UUID parentSubtopicUuid)IntegerremoveFromParentTopic(UUID subtopicUuid, UUID topicUuid)List<de.digitalcollections.model.api.identifiable.entity.Entity>saveEntities(UUID subtopicUuid, List<de.digitalcollections.model.api.identifiable.entity.Entity> entities)List<de.digitalcollections.model.api.identifiable.resource.FileResource>saveFileResources(UUID subtopicUuid, List<de.digitalcollections.model.api.identifiable.resource.FileResource> fileResources)de.digitalcollections.model.api.identifiable.entity.parts.SubtopicsaveWithParent(de.digitalcollections.model.api.identifiable.entity.parts.Subtopic child, UUID parentSubtopicUuid)de.digitalcollections.model.api.identifiable.entity.parts.SubtopicsaveWithParentTopic(de.digitalcollections.model.api.identifiable.entity.parts.Subtopic subtopic, UUID parentTopicUuid)booleanupdateChildrenOrder(UUID parentUuid, List<de.digitalcollections.model.api.identifiable.entity.parts.Subtopic> children)-
Methods inherited from class de.digitalcollections.cudami.server.business.impl.service.identifiable.entity.parts.EntityPartServiceImpl
addRelatedEntity, addRelatedFileresource, filteringForActive, getRelatedEntities, getRelatedFileResources, saveRelatedEntities, saveRelatedFileResources
-
Methods inherited from class de.digitalcollections.cudami.server.business.impl.service.identifiable.IdentifiableServiceImpl
count, delete, find, find, find, findAllFull, findAllReduced, findByLanguageAndInitial, get, get, get, getByIdentifier, reduceMultilanguageFieldsToGivenLocale, save, setDefaultSorting, update
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface de.digitalcollections.cudami.server.business.api.service.identifiable.entity.parts.EntityPartService
addRelatedEntity, addRelatedEntity, addRelatedFileresource, addRelatedFileresource, getRelatedEntities, getRelatedEntities, getRelatedFileResources, getRelatedFileResources, saveRelatedEntities, saveRelatedEntities, saveRelatedFileResources, saveRelatedFileResources
-
Methods inherited from interface de.digitalcollections.cudami.server.business.api.service.identifiable.IdentifiableService
cleanupLabelFromUnwantedLocales, count, delete, delete, find, find, find, findAllFull, findAllReduced, findByLanguageAndInitial, get, get, get, getByIdentifier, save, update
-
Methods inherited from interface de.digitalcollections.cudami.server.business.api.service.identifiable.NodeService
addChild, addChildren, getBreadcrumbNavigation, getChildren, getParent, removeChild
-
Methods inherited from interface de.digitalcollections.cudami.server.business.api.service.identifiable.entity.parts.SubtopicService
deleteFromParentSubtopic, getEntities, getFileResources, getSubtopicsOfEntity, getSubtopicsOfFileResource, saveEntities, saveFileResources
-
-
-
-
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:
addChildrenin interfaceNodeService<de.digitalcollections.model.api.identifiable.entity.parts.Subtopic>
-
addSubtopicToParentSubtopic
public de.digitalcollections.model.api.identifiable.entity.parts.Subtopic addSubtopicToParentSubtopic(UUID subtopicUuid, UUID parentSubtopicUuid) throws IdentifiableServiceException
- Specified by:
addSubtopicToParentSubtopicin interfaceSubtopicService- Throws:
IdentifiableServiceException
-
addSubtopicToParentTopic
public de.digitalcollections.model.api.identifiable.entity.parts.Subtopic addSubtopicToParentTopic(UUID subtopicUuid, UUID parentTopicUuid) throws IdentifiableServiceException
- Specified by:
addSubtopicToParentTopicin interfaceSubtopicService- Throws:
IdentifiableServiceException
-
removeFromParentSubtopic
public Integer removeFromParentSubtopic(UUID subtopicUuid, UUID parentSubtopicUuid)
- Specified by:
removeFromParentSubtopicin interfaceSubtopicService
-
deleteFromParentTopic
public Integer deleteFromParentTopic(de.digitalcollections.model.api.identifiable.entity.parts.Subtopic subtopic, UUID topicUuid)
- Specified by:
deleteFromParentTopicin interfaceSubtopicService
-
removeFromParentTopic
public Integer removeFromParentTopic(UUID subtopicUuid, UUID topicUuid)
- Specified by:
removeFromParentTopicin interfaceSubtopicService
-
getBreadcrumbNavigation
public de.digitalcollections.model.api.view.BreadcrumbNavigation getBreadcrumbNavigation(UUID nodeUuid)
Description copied from interface:NodeServiceBuild and return the breadcrumb navigation for the given node UUID- Specified by:
getBreadcrumbNavigationin interfaceNodeService<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:
getChildrenin interfaceNodeService<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:
getChildrenin interfaceNodeService<de.digitalcollections.model.api.identifiable.entity.parts.Subtopic>
-
getEntities
public List<de.digitalcollections.model.api.identifiable.entity.Entity> getEntities(UUID subtopicUuid)
- Specified by:
getEntitiesin interfaceSubtopicService
-
getFileResources
public List<de.digitalcollections.model.api.identifiable.resource.FileResource> getFileResources(UUID subtopicUuid)
- Specified by:
getFileResourcesin interfaceSubtopicService
-
getParent
public de.digitalcollections.model.api.identifiable.entity.parts.Subtopic getParent(UUID nodeUuid)
- Specified by:
getParentin interfaceNodeService<de.digitalcollections.model.api.identifiable.entity.parts.Subtopic>
-
getParents
public List<de.digitalcollections.model.api.identifiable.entity.parts.Subtopic> getParents(UUID uuid)
- Specified by:
getParentsin interfaceNodeService<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:
getRootNodesin interfaceNodeService<de.digitalcollections.model.api.identifiable.entity.parts.Subtopic>
-
getRootNodesLanguages
public List<Locale> getRootNodesLanguages()
- Specified by:
getRootNodesLanguagesin interfaceNodeService<de.digitalcollections.model.api.identifiable.entity.parts.Subtopic>
-
getSubtopicsOfEntity
public List<de.digitalcollections.model.api.identifiable.entity.parts.Subtopic> getSubtopicsOfEntity(UUID entityUuid)
- Specified by:
getSubtopicsOfEntityin interfaceSubtopicService
-
getSubtopicsOfFileResource
public List<de.digitalcollections.model.api.identifiable.entity.parts.Subtopic> getSubtopicsOfFileResource(UUID fileResourceUuid)
- Specified by:
getSubtopicsOfFileResourcein interfaceSubtopicService
-
getTopic
public de.digitalcollections.model.api.identifiable.entity.Topic getTopic(UUID subtopicUuid)
- Specified by:
getTopicin interfaceSubtopicService
-
removeChild
public boolean removeChild(UUID parentUuid, UUID childUuid)
- Specified by:
removeChildin interfaceNodeService<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:
saveEntitiesin interfaceSubtopicService
-
saveFileResources
public List<de.digitalcollections.model.api.identifiable.resource.FileResource> saveFileResources(UUID subtopicUuid, List<de.digitalcollections.model.api.identifiable.resource.FileResource> fileResources)
- Specified by:
saveFileResourcesin interfaceSubtopicService
-
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:
saveWithParentin interfaceNodeService<de.digitalcollections.model.api.identifiable.entity.parts.Subtopic>- Parameters:
child- newly created child node to be savedparentSubtopicUuid- 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, UUID parentTopicUuid) throws IdentifiableServiceException- Specified by:
saveWithParentTopicin interfaceSubtopicService- Throws:
IdentifiableServiceException
-
updateChildrenOrder
public boolean updateChildrenOrder(UUID parentUuid, List<de.digitalcollections.model.api.identifiable.entity.parts.Subtopic> children)
- Specified by:
updateChildrenOrderin interfaceNodeService<de.digitalcollections.model.api.identifiable.entity.parts.Subtopic>
-
-