Class TbsDocument.TbsDocumentBuilder

java.lang.Object
se.idsec.signservice.integration.document.TbsDocument.TbsDocumentBuilder
All Implemented Interfaces:
ObjectBuilder<TbsDocument>
Enclosing class:
TbsDocument

public static class TbsDocument.TbsDocumentBuilder extends Object implements ObjectBuilder<TbsDocument>
Builder for TbsDocument objects.
  • Method Details

    • mimeType

      public TbsDocument.TbsDocumentBuilder mimeType(String mimeType)
    • mimeType

      public TbsDocument.TbsDocumentBuilder mimeType(DocumentType mimeType)
    • id

      The unique ID for this document (within the current request). If not supplied, the SignService Integration Service will generate one.
      Parameters:
      id - unique ID for this document
      Returns:
      this.
    • content

      public TbsDocument.TbsDocumentBuilder content(String content)
      The Base64-encoded byte string that is the content of the document that is to be signed.
      Parameters:
      content - the document content (Base64-encoded)
      Returns:
      this.
    • contentReference

      public TbsDocument.TbsDocumentBuilder contentReference(String contentReference)
      A content reference may be used instead of supplying the actual content (TbsDocument.setContent(String)). This is typically something that is useful when handling large documents. However, this feature is only useable if:
      • The SignService Integration Service profile is in "stateful mode", and,
      • the document has previously been cached by the SignService Integration Service.

      Typically, this is used if the SignService Integration Service is running as a standalone service. When using the API as an integrated Java library in the service it makes less sense.

      Parameters:
      contentReference - a reference to the content
      Returns:
      this.
    • processingRules

      public TbsDocument.TbsDocumentBuilder processingRules(String processingRules)
      Optional processing rules used by the sign service to process sign data.
      Parameters:
      processingRules - the processing rules
      Returns:
      this.
    • adesRequirement

      public TbsDocument.TbsDocumentBuilder adesRequirement(TbsDocument.EtsiAdesRequirement adesRequirement)
      Specifies of the resulting signature should use an ETSI AdES format.
      Parameters:
      adesRequirement - the AdES requirement
      Returns:
      this.
    • visiblePdfSignatureRequirement

      public TbsDocument.TbsDocumentBuilder visiblePdfSignatureRequirement(VisiblePdfSignatureRequirement visiblePdfSignatureRequirement)
      If the document that is to be signed is a PDF document, the sign requester may require the resulting PDF to have a "visible PDF signature". The VisiblePdfSignatureRequirement specifies how this visible indication should be included.

      Note that a signature policy may have a default visible PDF signature requirement configued, which means that the visiblePdfSignatureRequirement does not have to be assigned, unless the signature policy default should be overridden. For the special case where a signature policy has a default requirement configured, and the caller does not want a visible PDF signature to be included at all, an VisiblePdfSignatureRequirement instance with an extension VisiblePdfSignatureRequirement.NULL_INDICATOR_EXTENSION set to true should be assigned (see VisiblePdfSignatureRequirement.createNullVisiblePdfSignatureRequirement()).

      Parameters:
      visiblePdfSignatureRequirement - requirement for visible PDF signatures
      Returns:
      this.
    • extension

      public TbsDocument.TbsDocumentBuilder extension(Extension extension)
      Extensions for the object.
      Returns:
      this.
    • build

      public TbsDocument build()
      Description copied from interface: ObjectBuilder
      Builds the object.
      Specified by:
      build in interface ObjectBuilder<TbsDocument>
      Returns:
      the object
    • toString

      public String toString()
      Overrides:
      toString in class Object