Class TopicServiceImpl
- java.lang.Object
-
- de.digitalcollections.cudami.server.business.impl.service.identifiable.IdentifiableServiceImpl<E>
-
- de.digitalcollections.cudami.server.business.impl.service.identifiable.entity.EntityServiceImpl<de.digitalcollections.model.identifiable.entity.Topic>
-
- de.digitalcollections.cudami.server.business.impl.service.identifiable.entity.TopicServiceImpl
-
- All Implemented Interfaces:
EntityService<de.digitalcollections.model.identifiable.entity.Topic>,TopicService,IdentifiableService<de.digitalcollections.model.identifiable.entity.Topic>,NodeService<de.digitalcollections.model.identifiable.entity.Topic>
@Service public class TopicServiceImpl extends EntityServiceImpl<de.digitalcollections.model.identifiable.entity.Topic> implements TopicService
Service for Topic handling.
-
-
Field Summary
-
Fields inherited from class de.digitalcollections.cudami.server.business.impl.service.identifiable.entity.EntityServiceImpl
hookProperties, httpClient
-
Fields inherited from class de.digitalcollections.cudami.server.business.impl.service.identifiable.IdentifiableServiceImpl
identifierRepository, repository
-
-
Constructor Summary
Constructors Constructor Description TopicServiceImpl(TopicRepository repository, IdentifierRepository identifierRepository, UrlAliasService urlAliasService, HookProperties hookProperties, LocaleService localeService, CudamiConfig cudamiConfig)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanaddChildren(UUID parentUuid, List<UUID> childrenUuids)de.digitalcollections.model.list.paging.PageResponse<de.digitalcollections.model.identifiable.entity.Topic>findChildren(UUID nodeUuid, de.digitalcollections.model.list.paging.PageRequest pageRequest)de.digitalcollections.model.list.paging.PageResponse<de.digitalcollections.model.identifiable.entity.Entity>findEntities(UUID topicUuid, de.digitalcollections.model.list.paging.PageRequest pageRequest)de.digitalcollections.model.list.paging.PageResponse<de.digitalcollections.model.identifiable.resource.FileResource>findFileResources(UUID topicUuid, de.digitalcollections.model.list.paging.PageRequest pageRequest)de.digitalcollections.model.list.paging.PageResponse<de.digitalcollections.model.identifiable.entity.Topic>findRootNodes(de.digitalcollections.model.list.paging.PageRequest pageRequest)de.digitalcollections.model.view.BreadcrumbNavigationgetBreadcrumbNavigation(UUID nodeUuid)Build and return the breadcrumb navigation for the given node UUIDList<de.digitalcollections.model.identifiable.entity.Topic>getChildren(UUID nodeUuid)List<de.digitalcollections.model.identifiable.entity.Entity>getEntities(UUID topicUuid)List<de.digitalcollections.model.identifiable.resource.FileResource>getFileResources(UUID topicUuid)List<Locale>getLanguagesOfEntities(UUID topicUuid)List<Locale>getLanguagesOfFileResources(UUID topicUuid)de.digitalcollections.model.identifiable.entity.TopicgetParent(UUID nodeUuid)List<de.digitalcollections.model.identifiable.entity.Topic>getParents(UUID nodeUuid)List<Locale>getRootNodesLanguages()List<de.digitalcollections.model.identifiable.entity.Topic>getTopicsOfEntity(UUID entityUuid)List<de.digitalcollections.model.identifiable.entity.Topic>getTopicsOfFileResource(UUID fileResourceUuid)booleanremoveChild(UUID parentUuid, UUID childUuid)de.digitalcollections.model.identifiable.entity.TopicsaveWithParent(UUID childUuid, UUID parentUuid)List<de.digitalcollections.model.identifiable.entity.Entity>setEntities(UUID topicUuid, List<de.digitalcollections.model.identifiable.entity.Entity> entities)List<de.digitalcollections.model.identifiable.resource.FileResource>setFileResources(UUID topicUuid, List<de.digitalcollections.model.identifiable.resource.FileResource> fileResources)booleanupdateChildrenOrder(UUID parentUuid, List<de.digitalcollections.model.identifiable.entity.Topic> children)-
Methods inherited from class de.digitalcollections.cudami.server.business.impl.service.identifiable.entity.EntityServiceImpl
addRelatedFileresource, addRelatedFileresource, buildNotificationUrl, filteringForActive, getByRefId, getRandom, getRelatedFileResources, getRelatedFileResources, save, sendNotification, setRelatedFileResources, setRelatedFileResources, update
-
Methods inherited from class de.digitalcollections.cudami.server.business.impl.service.identifiable.IdentifiableServiceImpl
addRelatedEntity, count, delete, deleteIdentifiers, find, find, findByLanguageAndInitial, getAllFull, getAllReduced, getByIdentifier, getByIdentifier, getByUuid, getByUuidAndLocale, getLanguages, getRelatedEntities, reduceMultilanguageFieldsToGivenLocale, saveIdentifiers, setDefaultSorting, setRelatedEntities
-
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.EntityService
getByRefId, getRandom
-
Methods inherited from interface de.digitalcollections.cudami.server.business.api.service.identifiable.IdentifiableService
addRelatedEntity, addRelatedEntity, addRelatedFileresource, addRelatedFileresource, cleanupLabelFromUnwantedLocales, count, delete, delete, deleteIdentifiers, find, find, findByLanguageAndInitial, getAllFull, getAllReduced, getByIdentifier, getByIdentifier, getByUuid, getByUuidAndLocale, getLanguages, getRelatedEntities, getRelatedEntities, getRelatedFileResources, getRelatedFileResources, save, saveRelatedEntities, setRelatedEntities, setRelatedFileResources, setRelatedFileResources, update
-
Methods inherited from interface de.digitalcollections.cudami.server.business.api.service.identifiable.NodeService
addChild, addChild, addChildren, getBreadcrumbNavigation, getChildren, getParent, removeChild, saveWithParent
-
Methods inherited from interface de.digitalcollections.cudami.server.business.api.service.identifiable.entity.TopicService
getAllEntities, getFileResources, getTopicsOfEntity, getTopicsOfFileResource, saveEntities, saveFileResources
-
-
-
-
Constructor Detail
-
TopicServiceImpl
public TopicServiceImpl(TopicRepository repository, IdentifierRepository identifierRepository, UrlAliasService urlAliasService, HookProperties hookProperties, LocaleService localeService, CudamiConfig cudamiConfig)
-
-
Method Detail
-
addChildren
public boolean addChildren(UUID parentUuid, List<UUID> childrenUuids)
- Specified by:
addChildrenin interfaceNodeService<de.digitalcollections.model.identifiable.entity.Topic>
-
findChildren
public de.digitalcollections.model.list.paging.PageResponse<de.digitalcollections.model.identifiable.entity.Topic> findChildren(UUID nodeUuid, de.digitalcollections.model.list.paging.PageRequest pageRequest)
- Specified by:
findChildrenin interfaceNodeService<de.digitalcollections.model.identifiable.entity.Topic>
-
findEntities
public de.digitalcollections.model.list.paging.PageResponse<de.digitalcollections.model.identifiable.entity.Entity> findEntities(UUID topicUuid, de.digitalcollections.model.list.paging.PageRequest pageRequest)
- Specified by:
findEntitiesin interfaceTopicService
-
findFileResources
public de.digitalcollections.model.list.paging.PageResponse<de.digitalcollections.model.identifiable.resource.FileResource> findFileResources(UUID topicUuid, de.digitalcollections.model.list.paging.PageRequest pageRequest)
- Specified by:
findFileResourcesin interfaceTopicService
-
findRootNodes
public de.digitalcollections.model.list.paging.PageResponse<de.digitalcollections.model.identifiable.entity.Topic> findRootNodes(de.digitalcollections.model.list.paging.PageRequest pageRequest)
- Specified by:
findRootNodesin interfaceNodeService<de.digitalcollections.model.identifiable.entity.Topic>
-
getBreadcrumbNavigation
public de.digitalcollections.model.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.identifiable.entity.Topic>- Parameters:
nodeUuid- the uuid of the node.- Returns:
- BreadcrumbNavigation with labels in all available languages
-
getChildren
public List<de.digitalcollections.model.identifiable.entity.Topic> getChildren(UUID nodeUuid)
- Specified by:
getChildrenin interfaceNodeService<de.digitalcollections.model.identifiable.entity.Topic>
-
getEntities
public List<de.digitalcollections.model.identifiable.entity.Entity> getEntities(UUID topicUuid)
- Specified by:
getEntitiesin interfaceTopicService
-
getFileResources
public List<de.digitalcollections.model.identifiable.resource.FileResource> getFileResources(UUID topicUuid)
- Specified by:
getFileResourcesin interfaceTopicService
-
getLanguagesOfEntities
public List<Locale> getLanguagesOfEntities(UUID topicUuid)
- Specified by:
getLanguagesOfEntitiesin interfaceTopicService
-
getLanguagesOfFileResources
public List<Locale> getLanguagesOfFileResources(UUID topicUuid)
- Specified by:
getLanguagesOfFileResourcesin interfaceTopicService
-
getParent
public de.digitalcollections.model.identifiable.entity.Topic getParent(UUID nodeUuid)
- Specified by:
getParentin interfaceNodeService<de.digitalcollections.model.identifiable.entity.Topic>
-
getParents
public List<de.digitalcollections.model.identifiable.entity.Topic> getParents(UUID nodeUuid)
- Specified by:
getParentsin interfaceNodeService<de.digitalcollections.model.identifiable.entity.Topic>
-
getRootNodesLanguages
public List<Locale> getRootNodesLanguages()
- Specified by:
getRootNodesLanguagesin interfaceNodeService<de.digitalcollections.model.identifiable.entity.Topic>
-
getTopicsOfEntity
public List<de.digitalcollections.model.identifiable.entity.Topic> getTopicsOfEntity(UUID entityUuid)
- Specified by:
getTopicsOfEntityin interfaceTopicService
-
getTopicsOfFileResource
public List<de.digitalcollections.model.identifiable.entity.Topic> getTopicsOfFileResource(UUID fileResourceUuid)
- Specified by:
getTopicsOfFileResourcein interfaceTopicService
-
removeChild
public boolean removeChild(UUID parentUuid, UUID childUuid)
- Specified by:
removeChildin interfaceNodeService<de.digitalcollections.model.identifiable.entity.Topic>
-
saveWithParent
public de.digitalcollections.model.identifiable.entity.Topic saveWithParent(UUID childUuid, UUID parentUuid) throws IdentifiableServiceException
- Specified by:
saveWithParentin interfaceNodeService<de.digitalcollections.model.identifiable.entity.Topic>- Parameters:
childUuid- UUID of newly created child nodeparentUuid- parent node the new node is child of- Returns:
- saved child node
- Throws:
IdentifiableServiceException- if saving fails
-
setEntities
public List<de.digitalcollections.model.identifiable.entity.Entity> setEntities(UUID topicUuid, List<de.digitalcollections.model.identifiable.entity.Entity> entities)
- Specified by:
setEntitiesin interfaceTopicService
-
setFileResources
public List<de.digitalcollections.model.identifiable.resource.FileResource> setFileResources(UUID topicUuid, List<de.digitalcollections.model.identifiable.resource.FileResource> fileResources)
- Specified by:
setFileResourcesin interfaceTopicService
-
updateChildrenOrder
public boolean updateChildrenOrder(UUID parentUuid, List<de.digitalcollections.model.identifiable.entity.Topic> children)
- Specified by:
updateChildrenOrderin interfaceNodeService<de.digitalcollections.model.identifiable.entity.Topic>
-
-