class JdbcMetadataParameter extends NullableParameter {

  @Override
  public Object applyInputParam(AdaptrisMessage msg) throws JdbcParameterException {
    this.checkMetadataKey();
    
    if (!msg.headersContainsKey(this.getMetadataKey()))
      throw new JdbcParameterException("Metadata does not exist for key: " + this.getMetadataKey());
    
    return normalize(msg.getMetadataValue(getMetadataKey()));
  }

}