Interface CategoryPlugin


public interface CategoryPlugin
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    canAccess(String objectId, String username)
    Checks whether an associated object to a category is accessible to a user.
    boolean
    canEdit(String objectId, String username)
    Checks whether an associated object to a category is editable to a user.
    default List<Long>
     
    default List<Long>
    getCategoryIds(long spaceId)
    param spaceId Space Identifier
    default List<Long>
    getCategoryIds(long spaceId, String username)
    param spaceId Space Identifier
    getEntryItem(String objectId, String username)
    Resolves a generic, object-type agnostic preview (title, summary, image, author, date, url ...) of the designated object, so that it can be displayed in a Category entries listing (browse entries by Category) without the caller having to know anything specific to this objectType.
    getObject(CategoryObject metadataObject)
     
     
  • Method Details

    • getType

      String getType()
      Returns:
      The managed Object Type (Space, Activity...)
    • canAccess

      boolean canAccess(String objectId, String username)
      Checks whether an associated object to a category is accessible to a user. This check will be called after checking whether the user can access or not to the category (generic ACL check made in Category API based on Category properties)
      Parameters:
      objectId - Object technical identifier
      username - User technical name (login identifier)
      Returns:
      true if the user has access permission to the designated Object Type
    • canEdit

      boolean canEdit(String objectId, String username)
      Checks whether an associated object to a category is editable to a user. This check will be used mainly used to know if a user can modify the object in order to associate/link a category into it. This check will be called after checking whether the user can link or not an object to the category (generic ACL check made in Category API based on Category properties)
      Parameters:
      objectId - Object technical identifier
      username - User technical name (login identifier)
      Returns:
      true if the user has access permission to the designated Object Type identified by its Id
    • getCategoryIds

      default List<Long> getCategoryIds()
      Returns:
      List of Category Ids associated to objects
    • getCategoryIds

      default List<Long> getCategoryIds(long spaceId)
      param spaceId Space Identifier
      Returns:
      List of Category Ids associated to objects for the designated spaceId
    • getCategoryIds

      default List<Long> getCategoryIds(long spaceId, String username)
      param spaceId Space Identifier
      Parameters:
      username - User technical name (login identifier)
      Returns:
      List of Category Ids associated to objects for the designated spaceId
    • getObject

      default CategoryObject getObject(CategoryObject metadataObject)
    • getEntryItem

      default CategoryEntryItem getEntryItem(String objectId, String username)
      Resolves a generic, object-type agnostic preview (title, summary, image, author, date, url ...) of the designated object, so that it can be displayed in a Category entries listing (browse entries by Category) without the caller having to know anything specific to this objectType.
      Parameters:
      objectId - Object technical identifier
      username - User technical name (login identifier)
      Returns:
      CategoryEntryItem or null when this objectType isn't meant to be browsable as an entry (Space, Activity ...)