java.lang.Object
se.swedenconnect.opensaml.common.builder.AbstractSAMLObjectBuilder<SignMessage>
se.swedenconnect.opensaml.sweid.saml2.signservice.build.SignMessageBuilder
All Implemented Interfaces:
SAMLObjectBuilder<SignMessage>

public class SignMessageBuilder extends AbstractSAMLObjectBuilder<SignMessage>
Creates a SignMessage instance using the builder patterns.
Author:
Martin Lindström (martin@idsec.se)
  • Constructor Details

    • SignMessageBuilder

      public SignMessageBuilder()
  • Method Details

    • builder

      public static SignMessageBuilder builder()
      Utility method that creates a builder.
      Returns:
      a builder
    • message

      public SignMessageBuilder message(String message)
      Assigns the message to include.

      If the message should be encrypted, use SignMessageEncrypter after the SignMessage has been built.

      Parameters:
      message - the message to include (in cleartext)
      Returns:
      the builder
    • displayEntity

      public SignMessageBuilder displayEntity(String displayEntity)
      Assigns the entityID of the entity responsible for displaying the sign message to the signer. When the sign message is encrypted, then this entity is also the holder of the private decryption key necessary to decrypt the sign message.
      Parameters:
      displayEntity - the entityID of the recipient
      Returns:
      the builder
    • mimeType

      public SignMessageBuilder mimeType(SignMessageMimeTypeEnum mimeType)
      Assigns the MIME type of the message.
      Parameters:
      mimeType - the MIME type
      Returns:
      the builder
    • mustShow

      public SignMessageBuilder mustShow(Boolean mustShow)
      Assigns the MustShow attribute. When this parameter is set to true then the requested signature MUST NOT be created unless this message has been displayed and accepted by the signer.
      Parameters:
      mustShow - the must show flag
      Returns:
      the builder
    • getObjectType

      protected Class<SignMessage> getObjectType()
      Specified by:
      getObjectType in class AbstractSAMLObjectBuilder<SignMessage>