All Known Implementing Classes:
DomainServiceImpl

public interface DomainService
  • Field Details

  • Method Details

    • getDomainsByFilter

      List<DomainDTO> getDomainsByFilter(DomainFilter domainFilter, String username, int offset, int limit)
      Gets domains by filter.
      Parameters:
      domainFilter - DomainFilter used to filter results
      username - User name accessing domains
      offset - index of the search
      limit - limit of results to return
      Returns:
      A <DomainDTO> object
    • getEnabledDomains

      List<DomainDTO> getEnabledDomains()
      Return enabled domains within the DB
      Returns:
      A <DomainDTO> object
    • findEnabledDomainByTitle

      DomainDTO findEnabledDomainByTitle(String domainTitle)
      Find an enabled domain by title
      Parameters:
      domainTitle - : domain title
      Returns:
      found DomainDTO
    • getDomainByTitle

      DomainDTO getDomainByTitle(String domainTitle)
      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 DomainDTO
      aclIdentity - 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

      DomainDTO createDomain(DomainDTO domainDTO)
      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 DomainDTO
      aclIdentity - Security identity of user attempting to update a program/domain
      Returns:
      updated object DomainDTO
      Throws:
      IllegalArgumentException - when user is not authorized to update the domain
      org.exoplatform.commons.exception.ObjectNotFoundException - when the domain identified by its technical identifier is not found
      IllegalAccessException - 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 delete
      aclIdentity - Security identity of user attempting to delete a domain
      Returns:
      deleted DomainDTO
      Throws:
      IllegalAccessException - when user is not authorized to delete domain
      org.exoplatform.commons.exception.ObjectNotFoundException - domain not found
    • getDomainById

      DomainDTO getDomainById(long id)
      Retrieves a domain identified by its technical identifier.
      Parameters:
      id - : domain id
      Returns:
      found DomainDTO
    • countDomains

      int countDomains(DomainFilter domainFilter, String username)
      Count all domains by filter
      Parameters:
      domainFilter - DomainFilter used to filter domains
      username - 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/program
      aclIdentity - Security identity of user
      Returns:
      true if user has enough privileges to create a program, else false