/** * Validates that the system is not using the horribly buggy Sun JAXP implementation. */ public static void validateNonSunJAXP() { Logger log = getLogger(); String builderFactoryClass = DocumentBuilderFactory.newInstance().getClass().getName(); log.debug("VM using JAXP parser {}", builderFactoryClass); if (builderFactoryClass.startsWith("com.sun")) { String errorMsg = "\n\n\nOpenSAML requires an xml parser that supports JAXP 1.3 and DOM3.\n" + "The JVM is currently configured to use the Sun XML parser, which is known\n" + "to be buggy and can not be used with OpenSAML. Please endorse a functional\n" + "JAXP library(ies) such as Xerces and Xalan. For instructions on how to endorse\n" + "a new parser see http://java.sun.com/j2se/1.5.0/docs/guide/standards/index.html\n\n\n"; log.error(errorMsg); throw new Error(errorMsg); } }
/** * Validates that the system is not using the horribly buggy Sun JAXP implementation. */ public static void validateNonSunJAXP() { Logger log = getLogger(); String builderFactoryClass = DocumentBuilderFactory.newInstance().getClass().getName(); log.debug("VM using JAXP parser {}", builderFactoryClass); if (builderFactoryClass.startsWith("com.sun")) { String errorMsg = "\n\n\nOpenSAML requires an xml parser that supports JAXP 1.3 and DOM3.\n" + "The JVM is currently configured to use the Sun XML parser, which is known\n" + "to be buggy and can not be used with OpenSAML. Please endorse a functional\n" + "JAXP library(ies) such as Xerces and Xalan. For instructions on how to endorse\n" + "a new parser see http://java.sun.com/j2se/1.5.0/docs/guide/standards/index.html\n\n\n"; log.error(errorMsg); throw new Error(errorMsg); } }
Logger log = getLogger(); boolean ret = true;
Logger log = getLogger(); boolean ret = true;
/** * Removes the builder, marshaller, and unmarshaller registered to the given key. * * @param key the key of the builder, marshaller, and unmarshaller to be removed */ public static void deregisterObjectProvider(QName key) { Logger log = getLogger(); log.debug("Unregistering builder, marshaller, and unmarshaller for {}", key); configuredObjectProviders.remove(key); builderFactory.deregisterBuilder(key); marshallerFactory.deregisterMarshaller(key); unmarshallerFactory.deregisterUnmarshaller(key); }
/** * Removes the builder, marshaller, and unmarshaller registered to the given key. * * @param key the key of the builder, marshaller, and unmarshaller to be removed */ public static void deregisterObjectProvider(QName key) { Logger log = getLogger(); log.debug("Unregistering builder, marshaller, and unmarshaller for {}", key); configuredObjectProviders.remove(key); builderFactory.deregisterBuilder(key); marshallerFactory.deregisterMarshaller(key); unmarshallerFactory.deregisterUnmarshaller(key); }
/** * Adds an object provider to this configuration. * * @param providerName the name of the object provider, corresponding to the element name or type name that the * builder, marshaller, and unmarshaller operate on * @param builder the builder for that given provider * @param marshaller the marshaller for the provider * @param unmarshaller the unmarshaller for the provider */ public static void registerObjectProvider(QName providerName, XMLObjectBuilder builder, Marshaller marshaller, Unmarshaller unmarshaller) { Logger log = getLogger(); log.debug("Registering new builder, marshaller, and unmarshaller for {}", providerName); builderFactory.registerBuilder(providerName, builder); marshallerFactory.registerMarshaller(providerName, marshaller); unmarshallerFactory.registerUnmarshaller(providerName, unmarshaller); }
/** * Adds an object provider to this configuration. * * @param providerName the name of the object provider, corresponding to the element name or type name that the * builder, marshaller, and unmarshaller operate on * @param builder the builder for that given provider * @param marshaller the marshaller for the provider * @param unmarshaller the unmarshaller for the provider * @param configuration optional XML configuration snippet * * @deprecated this method is deprecated with no replacement */ public static void registerObjectProvider(QName providerName, XMLObjectBuilder builder, Marshaller marshaller, Unmarshaller unmarshaller, Element configuration) { Logger log = getLogger(); log.debug("Registering new builder, marshaller, and unmarshaller for {}", providerName); if (configuration != null) { configuredObjectProviders.put(providerName, configuration); } builderFactory.registerBuilder(providerName, builder); marshallerFactory.registerMarshaller(providerName, marshaller); unmarshallerFactory.registerUnmarshaller(providerName, unmarshaller); }
/** * Adds an object provider to this configuration. * * @param providerName the name of the object provider, corresponding to the element name or type name that the * builder, marshaller, and unmarshaller operate on * @param builder the builder for that given provider * @param marshaller the marshaller for the provider * @param unmarshaller the unmarshaller for the provider */ public static void registerObjectProvider(QName providerName, XMLObjectBuilder builder, Marshaller marshaller, Unmarshaller unmarshaller) { Logger log = getLogger(); log.debug("Registering new builder, marshaller, and unmarshaller for {}", providerName); builderFactory.registerBuilder(providerName, builder); marshallerFactory.registerMarshaller(providerName, marshaller); unmarshallerFactory.registerUnmarshaller(providerName, unmarshaller); }
/** * Adds an object provider to this configuration. * * @param providerName the name of the object provider, corresponding to the element name or type name that the * builder, marshaller, and unmarshaller operate on * @param builder the builder for that given provider * @param marshaller the marshaller for the provider * @param unmarshaller the unmarshaller for the provider * @param configuration optional XML configuration snippet * * @deprecated this method is deprecated with no replacement */ public static void registerObjectProvider(QName providerName, XMLObjectBuilder builder, Marshaller marshaller, Unmarshaller unmarshaller, Element configuration) { Logger log = getLogger(); log.debug("Registering new builder, marshaller, and unmarshaller for {}", providerName); if (configuration != null) { configuredObjectProviders.put(providerName, configuration); } builderFactory.registerBuilder(providerName, builder); marshallerFactory.registerMarshaller(providerName, marshaller); unmarshallerFactory.registerUnmarshaller(providerName, unmarshaller); }