X-Git-Url: http://www.project-moonshot.org/gitweb/?p=shibboleth%2Fcpp-opensaml.git;a=blobdiff_plain;f=saml%2Fsaml2%2Fmetadata%2FMetadataFilter.h;h=a6dc24f5ce40724373742a0255de8e0bd12abdaa;hp=5c5f373b0197b9c8ebcfd1334d0f418c8e794996;hb=12d8e6ed0125ea986a8eb78ea177b6d6f0251fd6;hpb=23a6a678afa4e8ade343416279d3768d640d0d85 diff --git a/saml/saml2/metadata/MetadataFilter.h b/saml/saml2/metadata/MetadataFilter.h index 5c5f373..a6dc24f 100644 --- a/saml/saml2/metadata/MetadataFilter.h +++ b/saml/saml2/metadata/MetadataFilter.h @@ -15,7 +15,7 @@ */ /** - * @file MetadataFilter.h + * @file saml/saml2/metadata/MetadataFilter.h * * Processes metadata after it's been unmarshalled. */ @@ -39,7 +39,8 @@ namespace opensaml { class SAML_API MetadataFilter { MAKE_NONCOPYABLE(MetadataFilter); - + protected: + MetadataFilter() {} public: virtual ~MetadataFilter() {} @@ -55,11 +56,22 @@ namespace opensaml { * signal the removal of information, only for systemic processing failure. * * @param xmlObject the metadata to be filtered. - * @throws FilterException thrown if an error occurs during the filtering process */ virtual void doFilter(xmltooling::XMLObject& xmlObject) const=0; }; + /** + * Registers MetadataFilter classes into the runtime. + */ + void SAML_API registerMetadataFilters(); + + /** MetadataFilter that deletes blacklisted entities. */ + #define BLACKLIST_METADATA_FILTER "org.opensaml.saml2.metadata.provider.BlacklistMetadataFilter" + + /** MetadataFilter that deletes all but whitelisted entities. */ + #define WHITELIST_METADATA_FILTER "org.opensaml.saml2.metadata.provider.WhitelistMetadataFilter" + + DECL_XMLTOOLING_EXCEPTION(MetadataFilterException,SAML_EXCEPTIONAPI(SAML_API),opensaml::saml2md,xmltooling::XMLToolingException,Exceptions related to metadata filtering); }; };