Class TopicServiceImpl
java.lang.Object
de.digitalcollections.cudami.server.business.impl.service.UniqueObjectServiceImpl<I,R>
de.digitalcollections.cudami.server.business.impl.service.identifiable.IdentifiableServiceImpl<E,EntityRepository<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>,UniqueObjectService<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, httpClientFields inherited from class de.digitalcollections.cudami.server.business.impl.service.identifiable.IdentifiableServiceImpl
identifierServiceFields inherited from class de.digitalcollections.cudami.server.business.impl.service.UniqueObjectServiceImpl
repository -
Constructor Summary
ConstructorsConstructorDescriptionTopicServiceImpl(TopicRepository repository, IdentifierService identifierService, UrlAliasService urlAliasService, HookProperties hookProperties, LocaleService localeService, CudamiConfig cudamiConfig) -
Method Summary
Modifier and TypeMethodDescriptionbooleanaddChild(de.digitalcollections.model.identifiable.entity.Topic parent, de.digitalcollections.model.identifiable.entity.Topic child) booleanaddChildren(de.digitalcollections.model.identifiable.entity.Topic parent, List<de.digitalcollections.model.identifiable.entity.Topic> children) booleanaddEntities(de.digitalcollections.model.identifiable.entity.Topic topic, List<de.digitalcollections.model.identifiable.entity.Entity> entities) booleanaddEntity(de.digitalcollections.model.identifiable.entity.Topic topic, de.digitalcollections.model.identifiable.entity.Entity entity) booleanaddFileResource(de.digitalcollections.model.identifiable.entity.Topic topic, de.digitalcollections.model.identifiable.resource.FileResource fileResource) booleanaddFileResources(de.digitalcollections.model.identifiable.entity.Topic topic, List<de.digitalcollections.model.identifiable.resource.FileResource> fileResources) de.digitalcollections.model.list.paging.PageResponse<de.digitalcollections.model.identifiable.entity.Topic>findChildren(de.digitalcollections.model.identifiable.entity.Topic topic, de.digitalcollections.model.list.paging.PageRequest pageRequest) de.digitalcollections.model.list.paging.PageResponse<de.digitalcollections.model.identifiable.entity.Entity>findEntities(de.digitalcollections.model.identifiable.entity.Topic topic, de.digitalcollections.model.list.paging.PageRequest pageRequest) de.digitalcollections.model.list.paging.PageResponse<de.digitalcollections.model.identifiable.resource.FileResource>findFileResources(de.digitalcollections.model.identifiable.entity.Topic topic, 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(de.digitalcollections.model.identifiable.entity.Topic topic) Build and return the breadcrumb navigation for the given nodeList<de.digitalcollections.model.identifiable.entity.Topic>getChildren(de.digitalcollections.model.identifiable.entity.Topic topic) List<de.digitalcollections.model.identifiable.resource.FileResource>getFileResources(de.digitalcollections.model.identifiable.entity.Topic topic) getLanguagesOfEntities(de.digitalcollections.model.identifiable.entity.Topic topic) getLanguagesOfFileResources(de.digitalcollections.model.identifiable.entity.Topic topic) de.digitalcollections.model.identifiable.entity.TopicgetParent(de.digitalcollections.model.identifiable.entity.Topic topic) List<de.digitalcollections.model.identifiable.entity.Topic>getParents(de.digitalcollections.model.identifiable.entity.Topic topic) List<de.digitalcollections.model.identifiable.entity.Topic>getTopicsOfEntity(de.digitalcollections.model.identifiable.entity.Entity entity) List<de.digitalcollections.model.identifiable.entity.Topic>getTopicsOfFileResource(de.digitalcollections.model.identifiable.resource.FileResource fileResource) booleanremoveChild(de.digitalcollections.model.identifiable.entity.Topic parent, de.digitalcollections.model.identifiable.entity.Topic child) booleanremoveEntity(de.digitalcollections.model.identifiable.entity.Topic topic, de.digitalcollections.model.identifiable.entity.Entity entity) booleanremoveFileResource(de.digitalcollections.model.identifiable.entity.Topic topic, de.digitalcollections.model.identifiable.resource.FileResource fileResource) de.digitalcollections.model.identifiable.entity.TopicsaveWithParent(de.digitalcollections.model.identifiable.entity.Topic child, de.digitalcollections.model.identifiable.entity.Topic parent) booleansetEntities(de.digitalcollections.model.identifiable.entity.Topic topic, List<de.digitalcollections.model.identifiable.entity.Entity> entities) booleansetFileResources(de.digitalcollections.model.identifiable.entity.Topic topic, List<de.digitalcollections.model.identifiable.resource.FileResource> fileResources) booleanupdateChildrenOrder(de.digitalcollections.model.identifiable.entity.Topic parent, List<de.digitalcollections.model.identifiable.entity.Topic> children) Methods inherited from class de.digitalcollections.cudami.server.business.impl.service.identifiable.entity.EntityServiceImpl
addRelatedFileresource, buildNotificationUrl, getByRefId, save, sendNotification, updateMethods inherited from class de.digitalcollections.cudami.server.business.impl.service.identifiable.IdentifiableServiceImpl
addRelatedEntity, find, findByLanguageAndInitial, findRelatedEntities, findRelatedFileResources, getByExampleAndLocale, getByIdentifier, getLanguages, reduceMultilanguageFieldsToGivenLocale, setRelatedEntities, setRelatedFileResources, validateMethods inherited from class de.digitalcollections.cudami.server.business.impl.service.UniqueObjectServiceImpl
count, create, delete, delete, getAll, getByExample, getByExampleAndFiltering, getRandom, setDefaultSortingMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface de.digitalcollections.cudami.server.business.api.service.identifiable.entity.EntityService
getByRefIdMethods inherited from interface de.digitalcollections.cudami.server.business.api.service.identifiable.IdentifiableService
addRelatedEntity, addRelatedFileresource, cleanupLabelFromUnwantedLocales, findByLanguageAndInitial, findRelatedEntities, findRelatedFileResources, getByExampleAndLocale, getByIdentifier, getLanguages, setRelatedEntities, setRelatedFileResources, validateMethods inherited from interface de.digitalcollections.cudami.server.business.api.service.identifiable.NodeService
getBreadcrumbNavigationMethods inherited from interface de.digitalcollections.cudami.server.business.api.service.UniqueObjectService
count, create, delete, delete, find, getAll, getByExample, getByExampleAndFiltering, getRandom, save, update
-
Constructor Details
-
TopicServiceImpl
public TopicServiceImpl(TopicRepository repository, IdentifierService identifierService, UrlAliasService urlAliasService, HookProperties hookProperties, LocaleService localeService, CudamiConfig cudamiConfig)
-
-
Method Details
-
addChild
public boolean addChild(de.digitalcollections.model.identifiable.entity.Topic parent, de.digitalcollections.model.identifiable.entity.Topic child) throws ServiceException - Specified by:
addChildin interfaceNodeService<de.digitalcollections.model.identifiable.entity.Topic>- Throws:
ServiceException
-
addChildren
public boolean addChildren(de.digitalcollections.model.identifiable.entity.Topic parent, List<de.digitalcollections.model.identifiable.entity.Topic> children) throws ServiceException - Specified by:
addChildrenin interfaceNodeService<de.digitalcollections.model.identifiable.entity.Topic>- Throws:
ServiceException
-
addEntities
public boolean addEntities(de.digitalcollections.model.identifiable.entity.Topic topic, List<de.digitalcollections.model.identifiable.entity.Entity> entities) throws ServiceException - Specified by:
addEntitiesin interfaceTopicService- Throws:
ServiceException
-
addEntity
public boolean addEntity(de.digitalcollections.model.identifiable.entity.Topic topic, de.digitalcollections.model.identifiable.entity.Entity entity) throws ServiceException - Specified by:
addEntityin interfaceTopicService- Throws:
ServiceException
-
addFileResource
public boolean addFileResource(de.digitalcollections.model.identifiable.entity.Topic topic, de.digitalcollections.model.identifiable.resource.FileResource fileResource) throws ServiceException - Specified by:
addFileResourcein interfaceTopicService- Throws:
ServiceException
-
addFileResources
public boolean addFileResources(de.digitalcollections.model.identifiable.entity.Topic topic, List<de.digitalcollections.model.identifiable.resource.FileResource> fileResources) throws ServiceException - Specified by:
addFileResourcesin interfaceTopicService- Throws:
ServiceException
-
findChildren
public de.digitalcollections.model.list.paging.PageResponse<de.digitalcollections.model.identifiable.entity.Topic> findChildren(de.digitalcollections.model.identifiable.entity.Topic topic, de.digitalcollections.model.list.paging.PageRequest pageRequest) throws ServiceException - Specified by:
findChildrenin interfaceNodeService<de.digitalcollections.model.identifiable.entity.Topic>- Throws:
ServiceException
-
findEntities
public de.digitalcollections.model.list.paging.PageResponse<de.digitalcollections.model.identifiable.entity.Entity> findEntities(de.digitalcollections.model.identifiable.entity.Topic topic, de.digitalcollections.model.list.paging.PageRequest pageRequest) throws ServiceException - Specified by:
findEntitiesin interfaceTopicService- Throws:
ServiceException
-
findFileResources
public de.digitalcollections.model.list.paging.PageResponse<de.digitalcollections.model.identifiable.resource.FileResource> findFileResources(de.digitalcollections.model.identifiable.entity.Topic topic, de.digitalcollections.model.list.paging.PageRequest pageRequest) throws ServiceException - Specified by:
findFileResourcesin interfaceTopicService- Throws:
ServiceException
-
findRootNodes
public de.digitalcollections.model.list.paging.PageResponse<de.digitalcollections.model.identifiable.entity.Topic> findRootNodes(de.digitalcollections.model.list.paging.PageRequest pageRequest) throws ServiceException - Specified by:
findRootNodesin interfaceNodeService<de.digitalcollections.model.identifiable.entity.Topic>- Throws:
ServiceException
-
getChildren
public List<de.digitalcollections.model.identifiable.entity.Topic> getChildren(de.digitalcollections.model.identifiable.entity.Topic topic) throws ServiceException - Specified by:
getChildrenin interfaceNodeService<de.digitalcollections.model.identifiable.entity.Topic>- Throws:
ServiceException
-
getFileResources
public List<de.digitalcollections.model.identifiable.resource.FileResource> getFileResources(de.digitalcollections.model.identifiable.entity.Topic topic) throws ServiceException - Specified by:
getFileResourcesin interfaceTopicService- Throws:
ServiceException
-
getLanguagesOfEntities
public List<Locale> getLanguagesOfEntities(de.digitalcollections.model.identifiable.entity.Topic topic) throws ServiceException - Specified by:
getLanguagesOfEntitiesin interfaceTopicService- Throws:
ServiceException
-
getLanguagesOfFileResources
public List<Locale> getLanguagesOfFileResources(de.digitalcollections.model.identifiable.entity.Topic topic) throws ServiceException - Specified by:
getLanguagesOfFileResourcesin interfaceTopicService- Throws:
ServiceException
-
getParent
public de.digitalcollections.model.identifiable.entity.Topic getParent(de.digitalcollections.model.identifiable.entity.Topic topic) throws ServiceException - Specified by:
getParentin interfaceNodeService<de.digitalcollections.model.identifiable.entity.Topic>- Throws:
ServiceException
-
getParents
public List<de.digitalcollections.model.identifiable.entity.Topic> getParents(de.digitalcollections.model.identifiable.entity.Topic topic) throws ServiceException - Specified by:
getParentsin interfaceNodeService<de.digitalcollections.model.identifiable.entity.Topic>- Throws:
ServiceException
-
getRootNodesLanguages
- Specified by:
getRootNodesLanguagesin interfaceNodeService<de.digitalcollections.model.identifiable.entity.Topic>- Throws:
ServiceException
-
getTopicsOfEntity
public List<de.digitalcollections.model.identifiable.entity.Topic> getTopicsOfEntity(de.digitalcollections.model.identifiable.entity.Entity entity) throws ServiceException - Specified by:
getTopicsOfEntityin interfaceTopicService- Throws:
ServiceException
-
getTopicsOfFileResource
public List<de.digitalcollections.model.identifiable.entity.Topic> getTopicsOfFileResource(de.digitalcollections.model.identifiable.resource.FileResource fileResource) throws ServiceException - Specified by:
getTopicsOfFileResourcein interfaceTopicService- Throws:
ServiceException
-
removeChild
public boolean removeChild(de.digitalcollections.model.identifiable.entity.Topic parent, de.digitalcollections.model.identifiable.entity.Topic child) throws ServiceException - Specified by:
removeChildin interfaceNodeService<de.digitalcollections.model.identifiable.entity.Topic>- Throws:
ServiceException
-
removeEntity
public boolean removeEntity(de.digitalcollections.model.identifiable.entity.Topic topic, de.digitalcollections.model.identifiable.entity.Entity entity) throws ServiceException - Specified by:
removeEntityin interfaceTopicService- Throws:
ServiceException
-
removeFileResource
public boolean removeFileResource(de.digitalcollections.model.identifiable.entity.Topic topic, de.digitalcollections.model.identifiable.resource.FileResource fileResource) throws ServiceException - Specified by:
removeFileResourcein interfaceTopicService- Throws:
ServiceException
-
saveWithParent
public de.digitalcollections.model.identifiable.entity.Topic saveWithParent(de.digitalcollections.model.identifiable.entity.Topic child, de.digitalcollections.model.identifiable.entity.Topic parent) throws ServiceException - Specified by:
saveWithParentin interfaceNodeService<de.digitalcollections.model.identifiable.entity.Topic>- Parameters:
child- newly created child node to be savedparent- parent node the new node is child of- Returns:
- saved child node
- Throws:
ServiceException- if saving fails
-
setEntities
public boolean setEntities(de.digitalcollections.model.identifiable.entity.Topic topic, List<de.digitalcollections.model.identifiable.entity.Entity> entities) throws ServiceException - Specified by:
setEntitiesin interfaceTopicService- Throws:
ServiceException
-
setFileResources
public boolean setFileResources(de.digitalcollections.model.identifiable.entity.Topic topic, List<de.digitalcollections.model.identifiable.resource.FileResource> fileResources) throws ServiceException - Specified by:
setFileResourcesin interfaceTopicService- Throws:
ServiceException
-
updateChildrenOrder
public boolean updateChildrenOrder(de.digitalcollections.model.identifiable.entity.Topic parent, List<de.digitalcollections.model.identifiable.entity.Topic> children) throws ServiceException - Specified by:
updateChildrenOrderin interfaceNodeService<de.digitalcollections.model.identifiable.entity.Topic>- Throws:
ServiceException
-