/*
- * Copyright 2001-2006 Internet2
+ * Copyright 2001-2007 Internet2
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
*/
/**
- * @file MetadataFilter.h
+ * @file saml/saml2/metadata/MetadataFilter.h
*
* Processes metadata after it's been unmarshalled.
*/
+#include <saml/base.h>
+#include <saml/exceptions.h>
+#include <saml/saml2/metadata/MetadataProvider.h>
+
+#include <xmltooling/XMLObject.h>
+
#ifndef __saml2_metadatafilt_h__
#define __saml2_metadatafilt_h__
-#include <saml/saml2/metadata/Metadata.h>
-
namespace opensaml {
namespace saml2md {
class SAML_API MetadataFilter
{
MAKE_NONCOPYABLE(MetadataFilter);
-
+ protected:
+ MetadataFilter() {}
public:
virtual ~MetadataFilter() {}
* 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 "Blacklist"
+
+ /** MetadataFilter that deletes all but whitelisted entities. */
+ #define WHITELIST_METADATA_FILTER "Whitelist"
+
+ /** MetadataFilter that verifies signatures and filters out any that don't pass. */
+ #define SIGNATURE_METADATA_FILTER "Signature"
+
+ DECL_XMLTOOLING_EXCEPTION(MetadataFilterException,SAML_EXCEPTIONAPI(SAML_API),opensaml::saml2md,MetadataException,Exceptions related to metadata filtering);
};
};