Module net.shibboleth.ext.spring
Class DOMDocumentFactoryBean
- java.lang.Object
-
- net.shibboleth.ext.spring.factory.DOMDocumentFactoryBean
-
- All Implemented Interfaces:
FactoryBean<Document>
public class DOMDocumentFactoryBean extends Object implements FactoryBean<Document>
Spring bean factory for producing aDocumentfrom a resource.
-
-
Field Summary
Fields Modifier and Type Field Description private DocumentdocumentResultingDocument.private ParserPoolparserPoolParser pool to use when parsing the document.private ResourceresourceResource to load the document from.-
Fields inherited from interface org.springframework.beans.factory.FactoryBean
OBJECT_TYPE_ATTRIBUTE
-
-
Constructor Summary
Constructors Constructor Description DOMDocumentFactoryBean()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description DocumentgetObject()Class<?>getObjectType()booleanisSingleton()voidsetParserPool(ParserPool pool)Sets the parser pool to be used to parse the file.voidsetResource(Resource domResource)Sets the resource containing the document to be parsed.
-
-
-
Field Detail
-
resource
@Nullable private Resource resource
Resource to load the document from.
-
parserPool
@Nullable private ParserPool parserPool
Parser pool to use when parsing the document.
-
-
Method Detail
-
setResource
public void setResource(@Nonnull Resource domResource)Sets the resource containing the document to be parsed.- Parameters:
domResource- resource, never null
-
setParserPool
public void setParserPool(@Nonnull ParserPool pool)Sets the parser pool to be used to parse the file.- Parameters:
pool- parser pool, never null.
-
getObject
@Nonnull public Document getObject() throws Exception
- Specified by:
getObjectin interfaceFactoryBean<Document>- Throws:
Exception
-
getObjectType
@Nonnull public Class<?> getObjectType()
- Specified by:
getObjectTypein interfaceFactoryBean<Document>
-
isSingleton
public boolean isSingleton()
- Specified by:
isSingletonin interfaceFactoryBean<Document>
-
-