Package org.opensaml.saml.saml2.binding.artifact

# Class SAML2ArtifactBuilderFactory

java.lang.Object
org.opensaml.saml.saml2.binding.artifact.SAML2ArtifactBuilderFactory

public class SAML2ArtifactBuilderFactory extends Object
Factory used to construct SAML 2 artifact builders.

## Field Summary

Fields
Modifier and Type
Field
Description
`private Map<String,SAML2ArtifactBuilder<?>>`
`artifactBuilders`
Registered artifact builders.

## Constructor Summary

Constructors
Constructor
Description
`SAML2ArtifactBuilderFactory()`
Constructor.

## Method Summary

Modifier and Type
Method
Description
`SAML2Artifact`
`buildArtifact(byte[] artifact)`
convenience method for getting an artifact builder and parsing the given artifact with it.
`SAML2Artifact`
`buildArtifact(String base64Artifact)`
Convenience method for getting an artifact builder and parsing the given Base64 encoded artifact with it.
`SAML2ArtifactBuilder<?>`
`getArtifactBuilder(byte[] type)`
Gets the artifact builder for the given type.
`Map<String,SAML2ArtifactBuilder<?>>`
`getArtifactBuilders()`
Gets the currently registered artifact builders.

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

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

## Field Details

### artifactBuilders

@Nonnull private Map<String,SAML2ArtifactBuilder<?>> artifactBuilders
Registered artifact builders.

## Constructor Details

### SAML2ArtifactBuilderFactory

public SAML2ArtifactBuilderFactory()
Constructor.

## Method Details

### getArtifactBuilders

@Nonnull @NotLive @Unmodifiable public Map<String,SAML2ArtifactBuilder<?>> getArtifactBuilders()
Gets the currently registered artifact builders.

Returns:
  currently registered artifact builders

### getArtifactBuilder

@Nullable public SAML2ArtifactBuilder<?> getArtifactBuilder(@Nonnull byte[] type)
Gets the artifact builder for the given type.

Parameters:
  `type` - type of artifact to be built
Returns:
  artifact builder for the given type

### buildArtifact

@Nullable public SAML2Artifact buildArtifact(@Nonnull String base64Artifact) throws DecodingException
Convenience method for getting an artifact builder and parsing the given Base64 encoded artifact with it.

Parameters:
  `base64Artifact` - Base64 encoded artifact to parse
Returns:
  constructed artifact
Throws:
  `DecodingException` - if the `base64Artifact` could not be base64-decoded.

### buildArtifact

@Nullable public SAML2Artifact buildArtifact(@Nullable byte[] artifact)
convenience method for getting an artifact builder and parsing the given artifact with it.

Parameters:
  `artifact` - artifact to parse
Returns:
  constructed artifact