public class XMLObjectProviderRegistry extends Object
The registry instance to use would typically be retrieved from the
ConfigurationService
.
Modifier and Type | Field and Description |
---|---|
private XMLObjectBuilderFactory |
builderFactory
Configured XMLObject builder factory.
|
private Map<QName,Element> |
configuredObjectProviders
Object provider configuration elements indexed by QName.
|
private static QName |
defaultProvider
Default object provider.
|
private Set<QName> |
idAttributeNames
Configured set of attribute QNames which have been globally registered as having an ID type.
|
private org.slf4j.Logger |
log
Logger.
|
private MarshallerFactory |
marshallerFactory
Configured XMLObject marshaller factory.
|
private ParserPool |
parserPool
Configured parser pool.
|
private UnmarshallerFactory |
unmarshallerFactory
Configured XMLObject unmarshaller factory.
|
Constructor and Description |
---|
XMLObjectProviderRegistry()
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
deregisterIDAttribute(QName attributeName)
Deregister an attribute as having a type of ID.
|
void |
deregisterObjectProvider(QName key)
Removes the builder, marshaller, and unmarshaller registered to the given key.
|
XMLObjectBuilderFactory |
getBuilderFactory()
Gets the XMLObject builder factory that has been configured with information from loaded configuration files.
|
QName |
getDefaultProviderQName()
Gets the QName for the object provider that will be used for XMLObjects that do not have a registered object
provider.
|
MarshallerFactory |
getMarshallerFactory()
Gets the XMLObject marshaller factory that has been configured with information from loaded configuration files.
|
ParserPool |
getParserPool()
Get the currently configured ParserPool instance.
|
UnmarshallerFactory |
getUnmarshallerFactory()
Gets the XMLObject unmarshaller factory that has been configured with information from loaded configuration
files.
|
boolean |
isIDAttribute(QName attributeName)
Determine whether a given attribute is registered as having an ID type.
|
void |
registerIDAttribute(QName attributeName)
Register an attribute as having a type of ID.
|
void |
registerObjectProvider(QName providerName,
XMLObjectBuilder<?> builder,
Marshaller marshaller,
Unmarshaller unmarshaller)
Adds an object provider to this configuration.
|
void |
setParserPool(ParserPool newParserPool)
Set the currently configured ParserPool instance.
|
private static QName defaultProvider
private org.slf4j.Logger log
@Nonnull private final Map<QName,Element> configuredObjectProviders
private XMLObjectBuilderFactory builderFactory
private MarshallerFactory marshallerFactory
private UnmarshallerFactory unmarshallerFactory
@Nonnull private final Set<QName> idAttributeNames
private ParserPool parserPool
public ParserPool getParserPool()
public void setParserPool(@Nullable ParserPool newParserPool)
newParserPool
- the new ParserPool instance to configurepublic QName getDefaultProviderQName()
public void registerObjectProvider(@Nonnull QName providerName, @Nonnull XMLObjectBuilder<?> builder, @Nonnull Marshaller marshaller, @Nonnull Unmarshaller unmarshaller)
providerName
- the name of the object provider, corresponding to the element name or type name that the
builder, marshaller, and unmarshaller operate onbuilder
- the builder for that given providermarshaller
- the marshaller for the providerunmarshaller
- the unmarshaller for the providerpublic void deregisterObjectProvider(@Nonnull QName key)
key
- the key of the builder, marshaller, and unmarshaller to be removedpublic XMLObjectBuilderFactory getBuilderFactory()
public MarshallerFactory getMarshallerFactory()
public UnmarshallerFactory getUnmarshallerFactory()
public void registerIDAttribute(QName attributeName)
attributeName
- the QName of the ID attribute to be registeredpublic void deregisterIDAttribute(QName attributeName)
attributeName
- the QName of the ID attribute to be de-registeredpublic boolean isIDAttribute(QName attributeName)
attributeName
- the QName of the attribute to be checked for ID type.Copyright © 1999–2018 Shibboleth Consortium. All rights reserved.