opensaml-3.2.1
|
Supplies an individual source of metadata. More...
#include <saml/saml2/metadata/MetadataProvider.h>
Classes | |
struct | Criteria |
Batches up criteria for entity lookup. More... | |
Public Member Functions | |
virtual | ~MetadataProvider () |
Destructor will delete any installed filters. | |
virtual const char * | getId () const |
Returns an identifier for the provider for logging/status purposes. More... | |
virtual void | addMetadataFilter (MetadataFilter *newFilter) |
Adds a metadata filter to apply to any resolved metadata. More... | |
virtual MetadataFilter * | removeMetadataFilter (MetadataFilter *oldFilter) |
Removes a metadata filter. More... | |
void | setContext (const MetadataFilterContext *ctx) |
Sets a filtering context object for use by the filtering process. More... | |
virtual void | init ()=0 |
Should be called after instantiating provider and adding filters, but before performing any lookup operations. More... | |
virtual void | outputStatus (std::ostream &os) const |
Generate an XML representation of the provider's status. More... | |
virtual const xmltooling::XMLObject * | getMetadata () const =0 |
Gets the entire metadata tree, after the registered filter has been applied. More... | |
virtual const EntitiesDescriptor * | getEntitiesDescriptor (const XMLCh *name, bool requireValidMetadata=true) const |
Gets the metadata for a given group of entities. More... | |
virtual const EntitiesDescriptor * | getEntitiesDescriptor (const char *name, bool requireValidMetadata=true) const =0 |
Gets the metadata for a given group of entities. More... | |
virtual std::pair< const EntityDescriptor *, const RoleDescriptor * > | getEntityDescriptor (const Criteria &criteria) const =0 |
Gets entity metadata based on supplied criteria. More... | |
Protected Member Functions | |
MetadataProvider (const xercesc::DOMElement *e, bool deprecationSupport=true) | |
Constructor. More... | |
void | doFilters (const MetadataFilterContext *ctx, xmltooling::XMLObject &xmlObject) const |
Applies any installed filters to a metadata instance. More... | |
Supplies an individual source of metadata.
The source can be a local file, remote service, or the result of a dynamic lookup, can include local caching, etc. Providers MUST be locked before any lookup operations.
|
protected |
Constructor.
If a DOM is supplied, a set of default logic will be used to identify and build MetadataFilter plugins and install them into the provider.
The following XML content is supported:
XML namespaces are ignored in the processing of these elements.
e | DOM to supply configuration for provider |
deprecationSupport | true iff deprecated features and settings should be supported |
|
virtual |
Adds a metadata filter to apply to any resolved metadata.
Will not be applied to metadata that is already loaded.
newFilter | metadata filter to add |
|
protected |
Applies any installed filters to a metadata instance.
ctx | The Context for this filtering operation. |
xmlObject | the metadata to be filtered |
|
virtual |
Gets the metadata for a given group of entities.
If a valid group is returned, the resolver will be left in a locked state. The caller MUST unlock the resolver when finished with the group.
name | the name of the group |
requireValidMetadata | indicates whether the metadata for the group must be valid/current |
|
pure virtual |
Gets the metadata for a given group of entities.
If a valid group is returned, the resolver will be left in a locked state. The caller MUST unlock the resolver when finished with the group.
name | the name of the group |
requireValidMetadata | indicates whether the metadata for the group must be valid/current |
Implemented in opensaml::saml2md::AbstractMetadataProvider.
|
pure virtual |
Gets entity metadata based on supplied criteria.
If a valid entity is returned, the provider will be left in a locked state. The caller MUST unlock the provider when finished with the entity.
criteria | lookup criteria |
Implemented in opensaml::saml2md::AbstractMetadataProvider, and opensaml::saml2md::AbstractDynamicMetadataProvider.
|
virtual |
Returns an identifier for the provider for logging/status purposes.
Reimplemented in opensaml::saml2md::AbstractDynamicMetadataProvider.
|
pure virtual |
Gets the entire metadata tree, after the registered filter has been applied.
The caller MUST unlock the provider when finished with the data.
Implemented in opensaml::saml2md::AbstractDynamicMetadataProvider.
|
pure virtual |
Should be called after instantiating provider and adding filters, but before performing any lookup operations.
Allows the provider to defer initialization processes that are likely to result in exceptions until after the provider is safely created. Providers SHOULD perform as much processing as possible in this method so as to report/log any errors that would affect later processing.
|
virtual |
Generate an XML representation of the provider's status.
The XML must be well-formed, but is otherwise arbitrary.
os | stream to write status information to |
Reimplemented in opensaml::saml2md::AbstractMetadataProvider.
|
virtual |
Removes a metadata filter.
The caller must delete the filter if necessary.
oldFilter | metadata filter to remove |
void opensaml::saml2md::MetadataProvider::setContext | ( | const MetadataFilterContext * | ctx | ) |
Sets a filtering context object for use by the filtering process.
The object's lifetime must last for the duration of the lifetime of the MetadataProvider.
ctx | a context object |