org.opensaml.saml2.binding.encoding
Class HTTPArtifactEncoderBuilder

java.lang.Object
  extended by org.opensaml.saml2.binding.encoding.HTTPArtifactEncoderBuilder
All Implemented Interfaces:
MessageEncoderBuilder

public class HTTPArtifactEncoderBuilder
extends java.lang.Object
implements MessageEncoderBuilder

Builder of HTTPArtifactEncoders.


Constructor Summary
HTTPArtifactEncoderBuilder(SAMLArtifactFactory factory, SAMLArtifactMap map)
          Constructor.
HTTPArtifactEncoderBuilder(SAMLArtifactFactory factory, SAMLArtifactMap map, org.apache.velocity.app.VelocityEngine engine, java.lang.String templatePath)
          Constructor.
 
Method Summary
 MessageEncoder buildEncoder()
          Creates a new instance of the message encoder.
protected  void registerTemplate(java.lang.String templatePath)
          Gets the template from the classpath and registers it with the velocity engine.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HTTPArtifactEncoderBuilder

public HTTPArtifactEncoderBuilder(SAMLArtifactFactory factory,
                                  SAMLArtifactMap map)
Constructor. Creates a builder that performs URL artifact encoding.

Parameters:
factory - factory used to create artifacts
map - artifact map used to store create artifact information

HTTPArtifactEncoderBuilder

public HTTPArtifactEncoderBuilder(SAMLArtifactFactory factory,
                                  SAMLArtifactMap map,
                                  org.apache.velocity.app.VelocityEngine engine,
                                  java.lang.String templatePath)
                           throws java.io.IOException
Constructor. Creates a builder that performs a FORM artifact encoding.

Parameters:
factory - factory used to create artifacts
map - artifact map used to store create artifact information
engine - velocity engine used during POST encoding
templatePath - classpath location of the POST encoding template
Throws:
java.io.IOException - thrown if the template can not be read from the classpath
Method Detail

buildEncoder

public MessageEncoder buildEncoder()
Creates a new instance of the message encoder.

Specified by:
buildEncoder in interface MessageEncoderBuilder
Returns:
new instance of the message encoder

registerTemplate

protected void registerTemplate(java.lang.String templatePath)
                         throws java.io.IOException
Gets the template from the classpath and registers it with the velocity engine.

Parameters:
templatePath - classpath location of the template
Throws:
java.io.IOException - thrown if the template can not be read from the classpath