Package net.shibboleth.shared.spring.factory

# Class DOMDocumentFactoryBean

java.lang.Object
net.shibboleth.shared.spring.factory.DOMDocumentFactoryBean

All Implemented Interfaces:
  `FactoryBean<Document>`

public class DOMDocumentFactoryBean extends Object implements FactoryBean<Document>
Spring bean factory for producing a `Document` from a resource.

## Field Summary

Fields
Modifier and Type
Field
Description
`private Document`
`document`
Resulting `Document`.
`private ParserPool`
`parserPool`
Parser pool to use when parsing the document.
`private Resource`
`resource`
Resource 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

Modifier and Type
Method
Description
`Document`
`getObject()`
`Class<?>`
`getObjectType()`
`boolean`
`isSingleton()`
`void`
`setParserPool(ParserPool pool)`
Sets the parser pool to be used to parse the file.
`void`
`setResource(Resource domResource)`
Sets the resource containing the document to be parsed.

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Field Details

### resource

@Nullable private Resource resource
Resource to load the document from.

### parserPool

@Nullable private ParserPool parserPool
Parser pool to use when parsing the document.

### document

@Nullable private Document document
Resulting `Document`.

## Constructor Details

### DOMDocumentFactoryBean

public DOMDocumentFactoryBean()

## Method Details

### 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:
  `getObject` in interface `FactoryBean<Document>`
Throws:
  `Exception`

### getObjectType

@Nonnull public Class<?> getObjectType()

Specified by:
  `getObjectType` in interface `FactoryBean<Document>`

### isSingleton

public boolean isSingleton()

Specified by:
  `isSingleton` in interface `FactoryBean<Document>`