Package net.shibboleth.shared.spring.security.factory

# Class X509CertificateFactoryBean

java.lang.Object
net.shibboleth.shared.spring.security.factory.X509CertificateFactoryBean

All Implemented Interfaces:
  `FactoryBean<X509Certificate>`

public class X509CertificateFactoryBean extends Object implements FactoryBean<X509Certificate>
Spring bean factory for producing a `X509Certificate` from a `Resource`. This factory bean supports DER and PEM encoded certificate resources.

## Field Summary

Fields
Modifier and Type
Field
Description
`private X509Certificate`
`certificate`
The singleton instance of the certificate produced by this factory.
`private Resource`
`resource`
Certificate chain resource.

### Fields inherited from interface org.springframework.beans.factory.FactoryBean

`OBJECT_TYPE_ATTRIBUTE`

## Constructor Summary

Constructors
Constructor
Description
`X509CertificateFactoryBean()`

## Method Summary

Modifier and Type
Method
Description
`X509Certificate`
`getObject()`
`Class<?>`
`getObjectType()`
`boolean`
`isSingleton()`
`void`
`setResource(Resource res)`
Sets the certificate resource.

### 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
Certificate chain resource.

### certificate

@Nullable private X509Certificate certificate
The singleton instance of the certificate produced by this factory.

## Constructor Details

### X509CertificateFactoryBean

public X509CertificateFactoryBean()

## Method Details

### setResource

public void setResource(@Nullable Resource res)
Sets the certificate resource.

Parameters:
  `res` - certificate resource

### getObject

public X509Certificate getObject() throws Exception

Specified by:
  `getObject` in interface `FactoryBean<X509Certificate>`
Throws:
  `Exception`

### getObjectType

@Nonnull public Class<?> getObjectType()

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

### isSingleton

public boolean isSingleton()

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