Class DomainServiceImpl
- java.lang.Object
-
- org.exoplatform.addons.gamification.service.configuration.DomainServiceImpl
-
- All Implemented Interfaces:
DomainService
public class DomainServiceImpl extends Object implements DomainService
-
-
Field Summary
Fields Modifier and Type Field Description protected DomainStoragedomainStoragestatic StringGAMIFICATION_DOMAIN_LISTENERprotected org.exoplatform.services.listener.ListenerServicelistenerService
-
Constructor Summary
Constructors Constructor Description DomainServiceImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description DomainDTOaddDomain(DomainDTO domainDTO)Add Domain to DBvoiddeleteDomain(Long id)Delete a DomainEntity using the idDomainDTOfindDomainByTitle(String domainTitle)Find a DomainEntity by titleList<DomainDTO>getAllDomains()Return all domains within the DBList<DomainDTO>getEnabledDomains()Return enabled domains within the DBDomainDTOupdateDomain(DomainDTO domainDTO)Update Domain
-
-
-
Field Detail
-
domainStorage
protected final DomainStorage domainStorage
-
listenerService
protected final org.exoplatform.services.listener.ListenerService listenerService
-
GAMIFICATION_DOMAIN_LISTENER
public static final String GAMIFICATION_DOMAIN_LISTENER
- See Also:
- Constant Field Values
-
-
Method Detail
-
getAllDomains
public List<DomainDTO> getAllDomains()
Description copied from interface:DomainServiceReturn all domains within the DB- Specified by:
getAllDomainsin interfaceDomainService- Returns:
- a list of DomainDTO
-
getEnabledDomains
public List<DomainDTO> getEnabledDomains()
Description copied from interface:DomainServiceReturn enabled domains within the DB- Specified by:
getEnabledDomainsin interfaceDomainService- Returns:
- a list of enabled DomainDTO
-
findDomainByTitle
public DomainDTO findDomainByTitle(String domainTitle)
Description copied from interface:DomainServiceFind a DomainEntity by title- Specified by:
findDomainByTitlein interfaceDomainService- Parameters:
domainTitle- : domain title- Returns:
- an instance DomainDTO
-
addDomain
public DomainDTO addDomain(DomainDTO domainDTO)
Description copied from interface:DomainServiceAdd Domain to DB- Specified by:
addDomainin interfaceDomainService- Parameters:
domainDTO- : an object of type DomainDTO- Returns:
- BadgeDTO object
-
updateDomain
public DomainDTO updateDomain(DomainDTO domainDTO) throws org.exoplatform.commons.exception.ObjectNotFoundException
Description copied from interface:DomainServiceUpdate Domain- Specified by:
updateDomainin interfaceDomainService- Parameters:
domainDTO- : an instance of type DomainDTO- Returns:
- DomainDTO object
- Throws:
org.exoplatform.commons.exception.ObjectNotFoundException
-
deleteDomain
public void deleteDomain(Long id) throws javax.persistence.EntityNotFoundException
Description copied from interface:DomainServiceDelete a DomainEntity using the id- Specified by:
deleteDomainin interfaceDomainService- Parameters:
id- : domain id- Throws:
javax.persistence.EntityNotFoundException
-
-