Class ContentPermissionsBulkExtractor

  • All Implemented Interfaces:
    BulkExtractor<com.atlassian.bonnie.Searchable>

    public final class ContentPermissionsBulkExtractor
    extends Object
    implements BulkExtractor<com.atlassian.bonnie.Searchable>
    Extracts the content permissions set on searchable objects. If the searchable object is an attachment or comment extract the permissions from the containing content object. At the moment, content permissions are only set on AbstractPages. Hence this class only handles permissions for AbstractPage objects.
    Since:
    7.14
    • Method Detail

      • canHandle

        public boolean canHandle​(@Nonnull
                                 Class<?> type)
        Specified by:
        canHandle in interface BulkExtractor<com.atlassian.bonnie.Searchable>
        Returns:
        true of the extractor can handle entities of the given type, else false
      • extractAll

        public void extractAll​(@Nonnull
                               Collection<com.atlassian.bonnie.Searchable> searchables,
                               @Nonnull
                               Class<? extends com.atlassian.bonnie.Searchable> entityType,
                               @Nonnull
                               BiConsumer<com.atlassian.bonnie.Searchable,​FieldDescriptor> sink)
        Description copied from interface: BulkExtractor
        Extracts all indexable data from all of the given entities
        Specified by:
        extractAll in interface BulkExtractor<com.atlassian.bonnie.Searchable>
        Parameters:
        searchables - the entities to extract the fields from
        sink - the consumer into which all FieldDescriptors should be pushed.