Class SignMessageBuilder

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

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

      @Nonnull public SignMessageBuilder message(@Nullable 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

      @Nonnull public SignMessageBuilder displayEntity(@Nullable 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

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

      @Nonnull public SignMessageBuilder mustShow(@Nullable 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

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