+ * Builder for RoleDescriptor extension objects.
+ *
+ * This is customized to force the schema type to be specified.
+ */
+ class SAML_API RoleDescriptorBuilder : public xmltooling::XMLObjectBuilder {
+ public:
+ virtual ~RoleDescriptorBuilder() {}
+ /** Builder that allows element/type override. */
+#ifdef HAVE_COVARIANT_RETURNS
+ virtual RoleDescriptor* buildObject(
+#else
+ virtual xmltooling::XMLObject* buildObject(
+#endif
+ const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix=NULL, const xmltooling::QName* schemaType=NULL
+ ) const;
+
+ /** Singleton builder. */
+ static RoleDescriptor* buildRoleDescriptor(const xmltooling::QName& schemaType) {
+ const RoleDescriptorBuilder* b = dynamic_cast<const RoleDescriptorBuilder*>(
+ XMLObjectBuilder::getBuilder(xmltooling::QName(samlconstants::SAML20MD_NS,RoleDescriptor::LOCAL_NAME))
+ );
+ if (b) {
+#ifdef HAVE_COVARIANT_RETURNS
+ return b->buildObject(samlconstants::SAML20MD_NS, RoleDescriptor::LOCAL_NAME, samlconstants::SAML20MD_PREFIX, &schemaType);
+#else
+ return dynamic_cast<RoleDescriptor*>(b->buildObject(samlconstants::SAML20MD_NS, RoleDescriptor::LOCAL_NAME, samlconstants::SAML20MD_PREFIX, &schemaType));
+#endif
+ }
+ throw xmltooling::XMLObjectException("Unable to obtain typed builder for RoleDescriptor.");
+ }
+ };
+
+ /**