@ Synchronized @ SneakyThrows public void buildMetadataResolverAggregate ( final String entityId ) { LOGGER . trace ( "Building metadata resolver aggregate" ) ; this . metadataResolver = new ChainingMetadataResolver ( ) ; val resolvers = new ArrayList < MetadataResolver > ( ) ; val entries = this . metadataResources . entrySet ( ) ; entries . forEach ( entry -> { val resource = entry . getKey ( ) ; LOGGER . debug ( "Loading [{}]" , resource . getFilename ( ) ) ; resolvers . addAll ( loadMetadataFromResource ( entry . getValue ( ) , resource , entityId ) ) ; } ) ; this . metadataResolver . setId ( ChainingMetadataResolver . class . getCanonicalName ( ) ) ; this . metadataResolver . setResolvers ( resolvers ) ; LOGGER . debug ( "Collected metadata from [{}] resolvers(s). Initializing aggregate resolver..." , resolvers . size ( ) ) ; this . metadataResolver . initialize ( ) ; LOGGER . info ( "Metadata aggregate initialized successfully." ) ; }
Build metadata resolver aggregate . Loops through metadata resources and attempts to resolve the metadata .