Class SignatureMetadataParameters

  • Field Details

  • Constructor Details

    • SignatureMetadataParameters

      public SignatureMetadataParameters()
      The default constructor.
  • Method Details

    • getAlg

      public String getAlg() throws IllegalStateException
      Get the value of the alg parameter.
      Returns:
      The value of the alg parameter. This can be null.
      Throws:
      IllegalStateException - The parameter value identified by the key "alg" is not null, but it is not an instance of String.
    • setAlg

      public SignatureMetadataParameters setAlg(String alg)
      Set the value of the alg parameter.
      Parameters:
      alg - The value of the alg parameter.
      Returns:
      this object.
    • getCreated

      public Instant getCreated() throws IllegalStateException
      Get the value of the created parameter.
      Returns:
      The value of the created parameter. This can be null.
      Throws:
      IllegalStateException - The parameter value identified by the key "created" is not null, but it is neither a Long instance nor an Integer instance. Or the number represented by the value is outside the valid range for 'seconds since the Unix epoch'.
    • setCreated

      public SignatureMetadataParameters setCreated(Long created)
      Set the value of the created parameter.
      Parameters:
      created - The value of the created parameter.
      Returns:
      this object.
    • setCreated

      public SignatureMetadataParameters setCreated(Instant created)
      Set the value of the created parameter.
      Parameters:
      created - The value of the created parameter.
      Returns:
      this object.
    • getExpires

      public Instant getExpires() throws IllegalStateException
      Get the value of the expires parameter.
      Returns:
      The value of the expires parameter. This can be null.
      Throws:
      IllegalStateException - The parameter value identified by the key "expires" is not null, but it is neither a Long instance nor an Integer instance. Or the number represented by the value is outside the valid range for 'seconds since the Unix epoch'.
    • setExpires

      public SignatureMetadataParameters setExpires(Long expires)
      Set the value of the expires parameter.
      Parameters:
      expires - The value of the expires parameter.
      Returns:
      this object.
    • setExpires

      public SignatureMetadataParameters setExpires(Instant expires)
      Set the value of the expires parameter.
      Parameters:
      expires - The value of the expires parameter.
      Returns:
      this object.
    • getKeyid

      public String getKeyid() throws IllegalStateException
      Get the value of the keyid parameter.
      Returns:
      The value of the keyid parameter. This can be null.
      Throws:
      IllegalStateException - The parameter value identified by the key "keyid" is not null, but it is not an instance of String.
    • setKeyid

      public SignatureMetadataParameters setKeyid(String keyid)
      Set the value of the keyid parameter.
      Parameters:
      keyid - The value of the keyid parameter.
      Returns:
      this object.
    • getNonce

      public String getNonce() throws IllegalStateException
      Get the value of the nonce parameter.
      Returns:
      The value of the nonce parameter. This can be null.
      Throws:
      IllegalStateException - The parameter value identified by the key "nonce" is not null, but it is not an instance of String.
    • setNonce

      public SignatureMetadataParameters setNonce(String nonce)
      Set the value of the nonce parameter.
      Parameters:
      nonce - The value of the nonce parameter.
      Returns:
      this object.
    • getTag

      public String getTag() throws IllegalStateException
      Get the value of the tag parameter.
      Returns:
      The value of the tag parameter. This can be null.
      Throws:
      IllegalStateException - The parameter value identified by the key "tag" is not null, but it is not an instance of String.
    • setTag

      public SignatureMetadataParameters setTag(String tag)
      Set the value of the tag parameter.
      Parameters:
      tag - The value of the tag parameter.
      Returns:
      this object.
    • toString

      public String toString()
      Get the string representation of this instance, which is the serialized parameters returned by the serialize() method.
      Overrides:
      toString in class AbstractMap<String,Object>
      Returns:
      The string representation of this instance.
    • serialize

      public String serialize()
      Serialize the parameters represented by this instance, as defined in RFC 8941 Structured Field Values for HTTP, and return the resulting string.
      Returns:
      The serialized parameters represented by this instance.
    • serializeTo

      public StringBuilder serializeTo(StringBuilder sb)
      Serialize the parameters represented by this instance, as defined in RFC 8941 Structured Field Values for HTTP, and write the resulting string into the specified string builder.

      The ABNF for Parameters from RFC 8941 Structured Field Values for HTTP, 3.1.2. Parameters:

       parameters    = *( ";" *SP parameter )
       parameter     = param-key [ "=" param-value ]
       param-key     = key
       key           = ( lcalpha / "*" )
                       *( lcalpha / DIGIT / "_" / "-" / "." / "*" )
       lcalpha       = %x61-7A ; a-z
       param-value   = bare-item
       
      Parameters:
      sb - A string builder into which the resulting string is written.
      Returns:
      The same string builder that was passed as the argument.