Package io.meeds.social.category.service
Interface CategoryLinkService
public interface CategoryLinkService
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptiongetLinkedIds(CategoryObject object) booleanisLinked(long categoryId, CategoryObject object) voidlink(long categoryId, CategoryObject object) Creates a link from the designated object to the categoryvoidlink(long categoryId, CategoryObject object, String username) Creates a link from the designated object to the categoryvoidunlink(long categoryId, CategoryObject object) Deletes a link of the designated object from the categoryvoidunlink(long categoryId, CategoryObject object, String username) Deletes a link of the designated object from the category
-
Field Details
-
EVENT_CATEGORY_LINK_ADDED
- See Also:
-
EVENT_CATEGORY_LINK_REMOVED
- See Also:
-
-
Method Details
-
getLinkedIds
- Parameters:
object-CategoryObjectusing type/id to designate any object in the platform (Space, Activity ...)- Returns:
Listof linkedCategoryidentifiers
-
isLinked
- Parameters:
categoryId-Categoryidentifierobject-CategoryObjectusing 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-Categoryidentifierobject-CategoryObjectusing 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 existorg.exoplatform.commons.ObjectAlreadyExistsException- when the object is already linked to the categoryIllegalAccessException- when the user doesn't have 'Link' permission on the category or not having 'edit' permission on the object
-
link
Creates a link from the designated object to the category- Parameters:
categoryId-Categoryidentifierobject-CategoryObjectusing 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-Categoryidentifierobject-CategoryObjectusing 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 existIllegalAccessException- when the user doesn't have 'Link' permission on the category or not having 'edit' permission on the object
-
unlink
Deletes a link of the designated object from the category- Parameters:
categoryId-Categoryidentifierobject-CategoryObjectusing type/id to designate any object in the platform (Space, Activity ...)
-