Interface CategoryLinkService


public interface CategoryLinkService
  • Field Details

  • Method Details

    • getLinkedIds

      List<Long> getLinkedIds(CategoryObject object)
      Parameters:
      object - CategoryObject using type/id to designate any object in the platform (Space, Activity ...)
      Returns:
      List of linked Category identifiers
    • getLinkedIds

      List<Long> getLinkedIds(String objectType)
      Parameters:
      objectType - CategoryObject type, example: Space, Activity ...
      Returns:
      List of linked Category identifiers
    • isLinked

      boolean isLinked(long categoryId, CategoryObject object)
      Parameters:
      categoryId - Category identifier
      object - CategoryObject using type/id to designate any object in the platform (Space, Activity ...)
      Returns:
      true if the object is linked to the category
    • link

      void link(long categoryId, CategoryObject object, String username) throws org.exoplatform.commons.exception.ObjectNotFoundException, org.exoplatform.commons.ObjectAlreadyExistsException, IllegalAccessException
      Creates a link from the designated object to the category
      Parameters:
      categoryId - Category identifier
      object - CategoryObject using type/id to designate any object in the platform (Space, Activity ...)
      username - User name/login
      Throws:
      org.exoplatform.commons.exception.ObjectNotFoundException - when the category doesn't exist
      org.exoplatform.commons.ObjectAlreadyExistsException - when the object is already linked to the category
      IllegalAccessException - when the user doesn't have 'Link' permission on the category or not having 'edit' permission on the object
    • link

      void link(long categoryId, CategoryObject object)
      Creates a link from the designated object to the category
      Parameters:
      categoryId - Category identifier
      object - CategoryObject using type/id to designate any object in the platform (Space, Activity ...)
    • unlink

      void unlink(long categoryId, CategoryObject object, String username) throws org.exoplatform.commons.exception.ObjectNotFoundException, IllegalAccessException
      Deletes a link of the designated object from the category
      Parameters:
      categoryId - Category identifier
      object - CategoryObject using type/id to designate any object in the platform (Space, Activity ...)
      username - User name/login
      Throws:
      org.exoplatform.commons.exception.ObjectNotFoundException - when the link doesn't exist
      IllegalAccessException - when the user doesn't have 'Link' permission on the category or not having 'edit' permission on the object
    • unlink

      void unlink(long categoryId, CategoryObject object)
      Deletes a link of the designated object from the category
      Parameters:
      categoryId - Category identifier
      object - CategoryObject using type/id to designate any object in the platform (Space, Activity ...)