Class AbstractBatchMetadataResolver

    • Field Detail

      • log

        private final org.slf4j.Logger log
        Class logger.
      • cacheSourceMetadata

        private boolean cacheSourceMetadata
        Flag indicating whether to cache the original source metadata document.
      • resolveViaPredicatesOnly

        private boolean resolveViaPredicatesOnly
        Flag indicating whether resolution may be performed solely by applying predicates to the entire metadata collection. Defaults to false.
    • Constructor Detail

      • AbstractBatchMetadataResolver

        public AbstractBatchMetadataResolver()
        Constructor.
    • Method Detail

      • isCacheSourceMetadata

        protected boolean isCacheSourceMetadata()
        Get whether to cache the original source metadata document.
        Returns:
        true if source should be cached, false otherwise
      • setCacheSourceMetadata

        protected void setCacheSourceMetadata​(boolean flag)
        Set whether to cache the original source metadata document.
        Parameters:
        flag - true if source should be cached, false otherwise
      • setIndexes

        public void setIndexes​(@Nullable
                               Set<MetadataIndex> newIndexes)
        Set the configured indexes.
        Parameters:
        newIndexes - the new indexes to set
      • isResolveViaPredicatesOnly

        public boolean isResolveViaPredicatesOnly()
        Get the flag indicating whether resolution may be performed solely by applying predicates to the entire metadata collection.
        Returns:
        true if resolution may be attempted solely via predicates, false if not
      • setResolveViaPredicatesOnly

        public void setResolveViaPredicatesOnly​(boolean flag)
        Set the flag indicating whether resolution may be performed solely by applying predicates to the entire metadata collection.
        Parameters:
        flag - true if resolution may be attempted solely via predicates, false if not
      • lookupByIndexes

        @Nonnull
        @NonnullElements
        protected Optional<Set<EntityDescriptor>> lookupByIndexes​(@Nonnull
                                                                  CriteriaSet criteria)
        Resolve the set up descriptors based on the indexes currently held.
        Parameters:
        criteria - the criteria set to process
        Returns:
        an Optional instance containing the descriptors resolved via indexes, and based on the input criteria set. If the Optional instance indicates 'absent', there were either no indexes configured, or no criteria were applicable/understood by any indexes. If 'present' is indicated, then there were applicable/understood criteria, and the wrapped set contains the indexed data, which may be empty.
      • getCachedOriginalMetadata

        @Nullable
        protected XMLObject getCachedOriginalMetadata()
        Convenience method for getting the current effective cached original metadata.

        Note: may or may not be the same as that obtained from getCachedFilteredMetadata(), depending on what metadata filtering produced from the original metadata document.

        Returns:
        the current effective cached metadata document
      • getCachedFilteredMetadata

        @Nullable
        protected XMLObject getCachedFilteredMetadata()
        Convenience method for getting the current effective cached filtered metadata.

        Note: may or may not be the same as that obtained from getCachedOriginalMetadata(), depending on what metadata filtering produced from the original metadata document.

        Returns:
        the current effective cached metadata document
      • preProcessNewMetadata

        @Nonnull
        protected AbstractBatchMetadataResolver.BatchEntityBackingStore preProcessNewMetadata​(@Nonnull
                                                                                              XMLObject root)
                                                                                       throws FilterException
        Process the specified new metadata document, including metadata filtering and return its data in a new entity backing store instance.
        Parameters:
        root - the root of the new metadata document being processed
        Returns:
        the new backing store instance
        Throws:
        FilterException - if there is a problem filtering the metadata