Class Requirement.RequirementBuilder

java.lang.Object
se.swedenconnect.bankid.rpapi.types.Requirement.RequirementBuilder
Enclosing class:
Requirement

public static class Requirement.RequirementBuilder extends Object
A class implementing a builder pattern for constructing Requirement objects.
  • Constructor Details

    • RequirementBuilder

      public RequirementBuilder()
      Default constructor.
    • RequirementBuilder

      public RequirementBuilder(Requirement requirement)
      Constructor setting up a builder from the supplied requirement object.
      Parameters:
      requirement - the object to initialize the builder from
  • Method Details

    • build

      public Requirement build()
      Returns the built Requirement object
      Returns:
      a Requirement object
    • productionSetup

      public Requirement.RequirementBuilder productionSetup(boolean production)
      Tells whether we are setting up the requirement for a production system.
      Parameters:
      production - true for production and false for test
      Returns:
      the builder
    • pinCode

      public Requirement.RequirementBuilder pinCode(Boolean pinCode)
      Sets whether users are required to sign the transaction with their PIN code, even if they have biometrics activated.
      Parameters:
      pinCode - whether pin code is required
      Returns:
      the builder
    • mrtd

      Assigns the MRTD flag. If set to "true", the client needs to provide MRTD (Machine readable travel document) information to complete the order.Only Swedish passports and national ID cards are supported.
      Parameters:
      mrtd - the MRTD flag
      Returns:
      the builder
    • personalNumber

      public Requirement.RequirementBuilder personalNumber(String personalNumber)
      Assigns the personal eidentification number to be used to complete the transaction. If a BankID with another personal number attempts to sign the transaction, it fails.
      Parameters:
      personalNumber - the personal number
      Returns:
      the builder
    • cardReader

      public Requirement.RequirementBuilder cardReader(Requirement.CardReaderRequirement cardReaderRequirement)
      Assigns the requirement for which type of smart card reader that is required.

      See Requirement.setCardReader(CardReaderRequirement).

      Parameters:
      cardReaderRequirement - the card reader requirement
      Returns:
      the builder
    • mobile

      public Requirement.RequirementBuilder mobile(boolean enable)
      Enables/disables use of Mobile BankID.

      By default, Mobile BankID is enabled.

      Parameters:
      enable - should Mobile BankID be enabled or disabled?
      Returns:
      the builder
    • onFile

      public Requirement.RequirementBuilder onFile(boolean enable)
      Enables/disables use of BankID on file.

      By default, BankID on file is enabled.

      Parameters:
      enable - should BankID on file be enabled or disabled?
      Returns:
      the builder
    • onSmartCard

      public Requirement.RequirementBuilder onSmartCard(boolean enable)
      Enables/disables use of BankID on smart card.

      By default, BankID on smart card is enabled.

      Parameters:
      enable - should BankID on smart card be enabled or disabled?
      Returns:
      the builder
    • nordea

      public Requirement.RequirementBuilder nordea(boolean enable)
      Enables/disables use of Nordea BankID:s.

      By default, Nordea BankID:s are enabled.

      Note: Nordea BankID:s will automatically be disabled if BanID on file and BankID on smart card are disabled.

      Parameters:
      enable - should Nordea BankID:s be enabled or disabled?
      Returns:
      the builder
    • BANKID_ON_FILE

      public static String BANKID_ON_FILE(boolean production)
    • BANKID_ON_SMARTCARD

      public static String BANKID_ON_SMARTCARD(boolean production)
    • MOBILE_BANKID

      public static String MOBILE_BANKID(boolean production)
    • NORDEA_EID

      public static String NORDEA_EID(boolean production)