Class CategoryServiceImpl

java.lang.Object
io.meeds.social.category.service.CategoryServiceImpl
All Implemented Interfaces:
io.meeds.social.category.service.CategoryService

@Service public class CategoryServiceImpl extends Object implements io.meeds.social.category.service.CategoryService
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
     

    Fields inherited from interface io.meeds.social.category.service.CategoryService

    EVENT_SOCIAL_CATEGORY_CREATED, EVENT_SOCIAL_CATEGORY_DELETED, EVENT_SOCIAL_CATEGORY_ITEM_LINKED, EVENT_SOCIAL_CATEGORY_ITEM_UNLINKED, EVENT_SOCIAL_CATEGORY_UPDATED
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    canAccess(long categoryId, String username)
     
    boolean
    canAccess(io.meeds.social.category.model.Category category, String username)
     
    boolean
    canEdit(long categoryId, String username)
     
    boolean
    canEdit(io.meeds.social.category.model.Category category, String username)
     
    boolean
    canManageLink(long categoryId, String username)
     
    boolean
    canManageLink(io.meeds.social.category.model.Category category, String username)
     
    io.meeds.social.category.model.Category
    createCategory(io.meeds.social.category.model.Category category, String username)
     
    io.meeds.social.category.model.Category
    deleteCategory(long categoryId, String username)
     
    List<io.meeds.social.category.model.CategorySearchResult>
    findCategories(io.meeds.social.category.model.CategorySearchFilter filter, String username, Locale locale)
     
    getAncestorIds(long categoryId)
     
    getAncestorIds(long categoryId, String username)
     
    io.meeds.social.category.model.Category
    getCategory(long categoryId)
     
    io.meeds.social.category.model.CategoryWithName
    getCategory(long categoryId, String username, Locale locale)
     
    io.meeds.social.category.model.CategoryTree
    getCategoryTree(io.meeds.social.category.model.CategoryFilter filter, String username, Locale locale)
     
    io.meeds.social.category.model.Category
    getRootCategory(long ownerId)
     
    getSubcategoryIds(long categoryId, long offset, long limit, long depth)
     
    getSubcategoryIds(String username, long categoryId, long offset, long limit, long depth)
     
    io.meeds.social.category.model.Category
    updateCategory(io.meeds.social.category.model.Category category, String username)
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface io.meeds.social.category.service.CategoryService

    getSubcategoryIds
  • Field Details

  • Constructor Details

    • CategoryServiceImpl

      public CategoryServiceImpl()
  • Method Details

    • getCategoryTree

      public io.meeds.social.category.model.CategoryTree getCategoryTree(io.meeds.social.category.model.CategoryFilter filter, String username, Locale locale)
      Specified by:
      getCategoryTree in interface io.meeds.social.category.service.CategoryService
    • findCategories

      public List<io.meeds.social.category.model.CategorySearchResult> findCategories(io.meeds.social.category.model.CategorySearchFilter filter, String username, Locale locale)
      Specified by:
      findCategories in interface io.meeds.social.category.service.CategoryService
    • getAncestorIds

      public List<Long> getAncestorIds(long categoryId, String username) throws org.exoplatform.commons.exception.ObjectNotFoundException, IllegalAccessException
      Specified by:
      getAncestorIds in interface io.meeds.social.category.service.CategoryService
      Throws:
      org.exoplatform.commons.exception.ObjectNotFoundException
      IllegalAccessException
    • getAncestorIds

      public List<Long> getAncestorIds(long categoryId)
      Specified by:
      getAncestorIds in interface io.meeds.social.category.service.CategoryService
    • getSubcategoryIds

      public List<Long> getSubcategoryIds(String username, long categoryId, long offset, long limit, long depth)
      Specified by:
      getSubcategoryIds in interface io.meeds.social.category.service.CategoryService
    • getSubcategoryIds

      public List<Long> getSubcategoryIds(long categoryId, long offset, long limit, long depth)
      Specified by:
      getSubcategoryIds in interface io.meeds.social.category.service.CategoryService
    • getCategory

      public io.meeds.social.category.model.CategoryWithName getCategory(long categoryId, String username, Locale locale) throws org.exoplatform.commons.exception.ObjectNotFoundException, IllegalAccessException
      Specified by:
      getCategory in interface io.meeds.social.category.service.CategoryService
      Throws:
      org.exoplatform.commons.exception.ObjectNotFoundException
      IllegalAccessException
    • getCategory

      public io.meeds.social.category.model.Category getCategory(long categoryId)
      Specified by:
      getCategory in interface io.meeds.social.category.service.CategoryService
    • getRootCategory

      public io.meeds.social.category.model.Category getRootCategory(long ownerId)
      Specified by:
      getRootCategory in interface io.meeds.social.category.service.CategoryService
    • createCategory

      public io.meeds.social.category.model.Category createCategory(io.meeds.social.category.model.Category category, String username) throws org.exoplatform.commons.ObjectAlreadyExistsException, org.exoplatform.commons.exception.ObjectNotFoundException, IllegalAccessException
      Specified by:
      createCategory in interface io.meeds.social.category.service.CategoryService
      Throws:
      org.exoplatform.commons.ObjectAlreadyExistsException
      org.exoplatform.commons.exception.ObjectNotFoundException
      IllegalAccessException
    • updateCategory

      public io.meeds.social.category.model.Category updateCategory(io.meeds.social.category.model.Category category, String username) throws org.exoplatform.commons.exception.ObjectNotFoundException, IllegalAccessException
      Specified by:
      updateCategory in interface io.meeds.social.category.service.CategoryService
      Throws:
      org.exoplatform.commons.exception.ObjectNotFoundException
      IllegalAccessException
    • deleteCategory

      public io.meeds.social.category.model.Category deleteCategory(long categoryId, String username) throws org.exoplatform.commons.exception.ObjectNotFoundException, IllegalAccessException
      Specified by:
      deleteCategory in interface io.meeds.social.category.service.CategoryService
      Throws:
      org.exoplatform.commons.exception.ObjectNotFoundException
      IllegalAccessException
    • canEdit

      public boolean canEdit(long categoryId, String username)
      Specified by:
      canEdit in interface io.meeds.social.category.service.CategoryService
    • canEdit

      public boolean canEdit(io.meeds.social.category.model.Category category, String username)
      Specified by:
      canEdit in interface io.meeds.social.category.service.CategoryService
    • canAccess

      public boolean canAccess(long categoryId, String username)
      Specified by:
      canAccess in interface io.meeds.social.category.service.CategoryService
    • canAccess

      public boolean canAccess(io.meeds.social.category.model.Category category, String username)
      Specified by:
      canAccess in interface io.meeds.social.category.service.CategoryService
    • canManageLink

      public boolean canManageLink(long categoryId, String username)
      Specified by:
      canManageLink in interface io.meeds.social.category.service.CategoryService
    • canManageLink

      public boolean canManageLink(io.meeds.social.category.model.Category category, String username)
      Specified by:
      canManageLink in interface io.meeds.social.category.service.CategoryService