Class NoteCategoryPlugin

java.lang.Object
io.meeds.notes.plugin.NoteCategoryPlugin
All Implemented Interfaces:
io.meeds.social.category.plugin.CategoryPlugin

@Component public class NoteCategoryPlugin extends Object implements io.meeds.social.category.plugin.CategoryPlugin
  • Field Details

  • Constructor Details

    • NoteCategoryPlugin

      public NoteCategoryPlugin()
  • Method Details

    • init

      @PostConstruct public void init()
    • getType

      public String getType()
      Specified by:
      getType in interface io.meeds.social.category.plugin.CategoryPlugin
    • canAccess

      public boolean canAccess(String objectId, String username)
      Specified by:
      canAccess in interface io.meeds.social.category.plugin.CategoryPlugin
    • canEdit

      public boolean canEdit(String objectId, String username)
      Specified by:
      canEdit in interface io.meeds.social.category.plugin.CategoryPlugin
    • getSpaceId

      public static long getSpaceId(Page note)
    • toCategoryObject

      public static io.meeds.social.category.model.CategoryObject toCategoryObject(Page note)
      Resolves the category link object for a note. When the note is posted to a feed (has an underlying Activity), categories are linked on the Activity itself so that they stay consistent with the existing publication flow. Otherwise, categories are linked directly on the note.
    • getCategoryIds

      public static List<Long> getCategoryIds(Page note)
    • getEntryItem

      public io.meeds.social.category.model.CategoryEntryItem getEntryItem(String objectId, String username)
      Specified by:
      getEntryItem in interface io.meeds.social.category.plugin.CategoryPlugin