Interface DomainService
- All Known Implementing Classes:
DomainServiceImpl
public interface DomainService
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionbooleancanAddDomain(org.exoplatform.services.security.Identity aclIdentity) Check whether user can add programs or notintcountDomains(DomainFilter domainFilter, String username) Count all domains by filtercreateDomain(DomainDTO domainDTO) Creates a new domaincreateDomain(DomainDTO domainDTO, org.exoplatform.services.security.Identity aclIdentity) Creates a new domaindeleteDomainById(long domainId, org.exoplatform.services.security.Identity aclIdentity) Deletes an existing domain by idgetDomainById(long id) Retrieves a domain identified by its technical identifier.getDomainByTitle(String domainTitle) Find a domain by titlegetDomainsByFilter(DomainFilter domainFilter, String username, int offset, int limit) Gets domains by filter.Return enabled domains within the DBgetFileDetailAsStream(long domainId) Retrieves a cover identified by domain technical identifier.booleanisDomainOwner(long domainId, org.exoplatform.services.security.Identity aclIdentity) Check whether user can add programs or notupdateDomain(DomainDTO domainDTO, org.exoplatform.services.security.Identity aclIdentity) Update an existing Domain
-
Field Details
-
GAMIFICATION_DOMAIN_DELETE_LISTENER
- See Also:
-
GAMIFICATION_DOMAIN_DISABLE_LISTENER
- See Also:
-
GAMIFICATION_DOMAIN_ENABLE_LISTENER
- See Also:
-
-
Method Details
-
getDomainsByFilter
List<DomainDTO> getDomainsByFilter(DomainFilter domainFilter, String username, int offset, int limit) Gets domains by filter.- Parameters:
domainFilter-DomainFilterused to filter resultsusername- User name accessing domainsoffset- index of the searchlimit- limit of results to return- Returns:
- A
<DomainDTO>object
-
getEnabledDomains
Return enabled domains within the DB- Returns:
- A
<DomainDTO>object
-
getDomainByTitle
Find a domain by title- Parameters:
domainTitle- : domain title- Returns:
- found
DomainDTO
-
createDomain
DomainDTO createDomain(DomainDTO domainDTO, org.exoplatform.services.security.Identity aclIdentity) throws IllegalAccessException Creates a new domain- Parameters:
domainDTO- : an object of type DomainDTOaclIdentity- Security identity of user attempting to create a program/domain- Returns:
- created
DomainDTO - Throws:
IllegalAccessException- when user is not authorized to create a domain for the designated owner defined in object
-
createDomain
Creates a new domain- Parameters:
domainDTO- : an object of type DomainDTO- Returns:
- created
DomainDTO
-
updateDomain
DomainDTO updateDomain(DomainDTO domainDTO, org.exoplatform.services.security.Identity aclIdentity) throws org.exoplatform.commons.exception.ObjectNotFoundException, IllegalAccessException Update an existing Domain- Parameters:
domainDTO- : an instance of type DomainDTOaclIdentity- Security identity of user attempting to update a program/domain- Returns:
- updated object
DomainDTO - Throws:
IllegalArgumentException- when user is not authorized to update the domainorg.exoplatform.commons.exception.ObjectNotFoundException- when the domain identified by its technical identifier is not foundIllegalAccessException- when user is not authorized to create a domain for the designated owner defined in object
-
deleteDomainById
DomainDTO deleteDomainById(long domainId, org.exoplatform.services.security.Identity aclIdentity) throws org.exoplatform.commons.exception.ObjectNotFoundException, IllegalAccessException Deletes an existing domain by id- Parameters:
domainId- Domain technical identifier to deleteaclIdentity- Security identity of user attempting to delete a domain- Returns:
- deleted
DomainDTO - Throws:
IllegalAccessException- when user is not authorized to delete domainorg.exoplatform.commons.exception.ObjectNotFoundException- domain not found
-
getDomainById
Retrieves a domain identified by its technical identifier.- Parameters:
id- : domain id- Returns:
- found
DomainDTO
-
countDomains
Count all domains by filter- Parameters:
domainFilter-DomainFilterused to filter domainsusername- User name accessing domains- Returns:
- domains count
-
getFileDetailAsStream
InputStream getFileDetailAsStream(long domainId) throws org.exoplatform.commons.exception.ObjectNotFoundException Retrieves a cover identified by domain technical identifier.- Parameters:
domainId- domain unique identifier- Returns:
- found
InputStream - Throws:
org.exoplatform.commons.exception.ObjectNotFoundException- domain not found
-
canAddDomain
boolean canAddDomain(org.exoplatform.services.security.Identity aclIdentity) Check whether user can add programs or not- Parameters:
aclIdentity- Security identity of user- Returns:
- true if user has enough privileges to create a program, else false
-
isDomainOwner
boolean isDomainOwner(long domainId, org.exoplatform.services.security.Identity aclIdentity) Check whether user can add programs or not- Parameters:
domainId- technical identifier of domain/programaclIdentity- Security identity of user- Returns:
- true if user has enough privileges to create a program, else false
-