Class UserMessageBuilder

java.lang.Object
se.swedenconnect.opensaml.common.builder.AbstractSAMLObjectBuilder<UserMessage>
se.swedenconnect.opensaml.sweid.saml2.authn.umsg.build.UserMessageBuilder
All Implemented Interfaces:
SAMLObjectBuilder<UserMessage>

public class UserMessageBuilder extends AbstractSAMLObjectBuilder<UserMessage>
A builder for UserMessage objects.
Author:
Martin Lindström
  • Constructor Details

    • UserMessageBuilder

      public UserMessageBuilder()
  • Method Details

    • builder

      public static UserMessageBuilder builder()
      Creates a UserMessageBuilder.
      Returns:
      a UserMessageBuilder
    • getObjectType

      @Nonnull protected Class<UserMessage> getObjectType()
      Specified by:
      getObjectType in class AbstractSAMLObjectBuilder<UserMessage>
    • mimeType

      @Nonnull public UserMessageBuilder mimeType(@Nullable String mimeType)
      Assigns the MIME type.
      Parameters:
      mimeType - the MIME type
      Returns:
      the builder
    • message

      @Nonnull public UserMessageBuilder message(@Nonnull Message message)
      Adds a Message.
      Parameters:
      message - the Message to add
      Returns:
      the builder
    • messages

      @Nonnull public UserMessageBuilder messages(@Nullable List<Message> messages)
      Adds a list of Messages.

      If messages have already been added, these will be overwritten.

      Parameters:
      messages - the messages to add (if null, any previously added messages will be cleared)
      Returns:
      the builder
    • messages

      @Nonnull public UserMessageBuilder messages(@Nullable Message... messages)
      Adds Messages.

      If messages have already been added, these will be overwritten.

      Parameters:
      messages - the messages to add (if null, any previously added messages will be cleared)
      Returns:
      the builder