in Extended Metadata class, it says "Class contains additional information describing a SAML entity. Metadata can be used both for local entities * (= the ones accessible as part of the deployed application using the SAML Extension) and remote entities (= the ones * user can interact with like IDPs)."
I am not following what is local entity means. In my case, we use shibboleth idp and service provider as our spring web application deployed in tomcat.
In order to interact with your Shibboleth IDP you will need to define two entities (MetadataProviders). One will represent the Service Provider, i.e. the Application you wish to secure. This is the local entity. The other will represent the Shibboleth IDP, which is your remote entity.
What the code comment is saying is that the ExtendedMetadata class can be used for both local and remote entity configuration, as it contains configurations that are valid for both.