nxt.http

## Class ParameterParser

- java.lang.Object
- - nxt.http.ParameterParser

-     public final class ParameterParser
      extends java.lang.Object

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `static class` | `ParameterParser.FileData`

  - ### Method Summary

    All Methods Static Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static Account` | `getAccount(javax.servlet.http.HttpServletRequest req)`
    `static Account` | `getAccount(javax.servlet.http.HttpServletRequest req, boolean isMandatory)`
    `static long` | `getAccountId(javax.servlet.http.HttpServletRequest req, boolean isMandatory)`
    `static long` | `getAccountId(javax.servlet.http.HttpServletRequest req, java.lang.String name, boolean isMandatory)`
    `static long[]` | `getAccountIds(javax.servlet.http.HttpServletRequest req, boolean isMandatory)`
    `static java.lang.String` | `getAccountProperty(javax.servlet.http.HttpServletRequest req, boolean isMandatory)`
    `static java.util.List<Account>` | `getAccounts(javax.servlet.http.HttpServletRequest req)`
    `static AliasHome.Alias` | `getAlias(javax.servlet.http.HttpServletRequest req)`
    `static long` | `getAmountNQT(javax.servlet.http.HttpServletRequest req)`
    `static long` | `getAmountNQTPerShare(javax.servlet.http.HttpServletRequest req)`
    `static Asset` | `getAsset(javax.servlet.http.HttpServletRequest req)`
    `static java.math.BigInteger` | `getBigInteger(javax.servlet.http.HttpServletRequest req, java.lang.String name, boolean isMandatory)`
    `static java.util.List<Bundler.Filter>` | `getBundlingFilters(javax.servlet.http.HttpServletRequest req)`
    `static ExchangeOfferHome.BuyOffer` | `getBuyOffer(javax.servlet.http.HttpServletRequest req)`
    `static byte` | `getByte(javax.servlet.http.HttpServletRequest req, java.lang.String name, byte min, byte max, boolean isMandatory)`
    `static byte` | `getByte(javax.servlet.http.HttpServletRequest req, java.lang.String name, byte min, byte max, byte defaultValue, boolean isMandatory)`
    `static byte[]` | `getBytes(javax.servlet.http.HttpServletRequest req, java.lang.String name, boolean isMandatory)`
    `static Chain` | `getChain(javax.servlet.http.HttpServletRequest request)`
    `static Chain` | `getChain(javax.servlet.http.HttpServletRequest request, boolean isMandatory)`
    `static Chain` | `getChain(javax.servlet.http.HttpServletRequest request, java.lang.String name, boolean isMandatory)`
    `static ChainTransactionId` | `getChainTransactionId(javax.servlet.http.HttpServletRequest req, java.lang.String name)`
    `static ChainTransactionId` | `getChainTransactionId(java.lang.String value)`
    `static java.util.List<ChainTransactionId>` | `getChainTransactionIds(javax.servlet.http.HttpServletRequest req, java.lang.String name)`
    `static ChildChain` | `getChildChain(javax.servlet.http.HttpServletRequest request)`
    `static ChildChain` | `getChildChain(javax.servlet.http.HttpServletRequest request, boolean isMandatory)`
    `static Currency` | `getCurrency(javax.servlet.http.HttpServletRequest req)`
    `static Currency` | `getCurrency(javax.servlet.http.HttpServletRequest req, boolean isMandatory)`
    `static EncryptedData` | `getEncryptedData(javax.servlet.http.HttpServletRequest req, java.lang.String messageType)`
    `static Appendix` | `getEncryptedMessage(javax.servlet.http.HttpServletRequest req, Account recipient, boolean prunable)`
    `static EncryptToSelfMessageAppendix` | `getEncryptToSelfMessage(javax.servlet.http.HttpServletRequest req)`
    `static ParameterParser.FileData` | `getFileData(javax.servlet.http.HttpServletRequest req, java.lang.String paramName, boolean isMandatory)`
    `static int` | `getFirstIndex(javax.servlet.http.HttpServletRequest req)`
    `static DigitalGoodsHome.Goods` | `getGoods(javax.servlet.http.HttpServletRequest req)`
    `static int` | `getGoodsQuantity(javax.servlet.http.HttpServletRequest req)`
    `static int` | `getHeight(javax.servlet.http.HttpServletRequest req)`
    `static int` | `getHeight(javax.servlet.http.HttpServletRequest req, boolean isMandatory)`
    `static long` | `getHoldingId(javax.servlet.http.HttpServletRequest req)`
    `static HoldingType` | `getHoldingType(javax.servlet.http.HttpServletRequest req)`
    `static int` | `getInt(javax.servlet.http.HttpServletRequest req, java.lang.String name, int min, int max, boolean isMandatory)`
    `static int` | `getInt(javax.servlet.http.HttpServletRequest req, java.lang.String name, int min, int max, int defaultValue)`
    `static org.json.simple.JSONObject` | `getJson(javax.servlet.http.HttpServletRequest req, java.lang.String name)`
    `static org.json.simple.JSONArray` | `getJsonArray(javax.servlet.http.HttpServletRequest req, java.lang.String name)`
    `static int` | `getLastIndex(javax.servlet.http.HttpServletRequest req)`
    `static long` | `getLong(javax.servlet.http.HttpServletRequest req, java.lang.String name, long min, long max, boolean isMandatory)`
    `static long` | `getLong(javax.servlet.http.HttpServletRequest req, java.lang.String name, long min, long max, long defaultValue)`
    `static int` | `getNumberOfConfirmations(javax.servlet.http.HttpServletRequest req)`
    `static java.lang.String` | `getParameter(javax.servlet.http.HttpServletRequest req, java.lang.String name)`
    `static Appendix` | `getPlainMessage(javax.servlet.http.HttpServletRequest req, boolean prunable)`
    `static PollHome.Poll` | `getPoll(javax.servlet.http.HttpServletRequest req)`
    `static long` | `getPriceNQT(javax.servlet.http.HttpServletRequest req)`
    `static long` | `getPriceNQTPerCoin(javax.servlet.http.HttpServletRequest req)`
    `static long` | `getPriceNQTPerShare(javax.servlet.http.HttpServletRequest req)`
    `static byte[]` | `getPublicKey(javax.servlet.http.HttpServletRequest req)`
    `static byte[]` | `getPublicKey(javax.servlet.http.HttpServletRequest req, java.lang.String prefix)`
    `static java.util.List<byte[]>` | `getPublicKeys(javax.servlet.http.HttpServletRequest req, java.lang.String name)`
    `static DigitalGoodsHome.Purchase` | `getPurchase(javax.servlet.http.HttpServletRequest req)`
    `static long` | `getQuantityQNT(javax.servlet.http.HttpServletRequest req)`
    `static long` | `getRateNQTPerUnit(javax.servlet.http.HttpServletRequest req)`
    `static java.lang.String` | `getSearchQuery(javax.servlet.http.HttpServletRequest req)`
    `static java.lang.String` | `getSecretPhrase(javax.servlet.http.HttpServletRequest req, boolean isMandatory)`
    `static java.lang.String` | `getSecretPhrase(javax.servlet.http.HttpServletRequest req, java.lang.String prefix, boolean isMandatory)`
    `static ExchangeOfferHome.SellOffer` | `getSellOffer(javax.servlet.http.HttpServletRequest req)`
    `static Account` | `getSenderAccount(javax.servlet.http.HttpServletRequest req)`
    `static long` | `getSenderId(javax.servlet.http.HttpServletRequest req)`
    `static ShufflingHome.Shuffling` | `getShuffling(javax.servlet.http.HttpServletRequest req)`
    `static TaggedDataAttachment` | `getTaggedData(javax.servlet.http.HttpServletRequest req)`
    `static int` | `getTimestamp(javax.servlet.http.HttpServletRequest req)`
    `static long` | `getUnitsQNT(javax.servlet.http.HttpServletRequest req)`
    `static long` | `getUnsignedLong(javax.servlet.http.HttpServletRequest req, java.lang.String name, boolean isMandatory)`
    `static long[]` | `getUnsignedLongs(javax.servlet.http.HttpServletRequest req, java.lang.String name)`
    `static PhasingParams` | `parsePhasingParams(javax.servlet.http.HttpServletRequest req, java.lang.String parameterPrefix)`
    `static Transaction.Builder` | `parseTransaction(java.lang.String transactionJSON, java.lang.String transactionBytes, java.lang.String prunableAttachmentJSON)`
    `static org.json.simple.JSONObject` | `parseVoucher(byte[] data)`
    `static org.json.simple.JSONObject` | `parseVoucher(org.json.simple.JSONObject voucherJson)`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Method Detail

    - #### getByte

          public static byte getByte(javax.servlet.http.HttpServletRequest req,
                                     java.lang.String name,
                                     byte min,
                                     byte max,
                                     boolean isMandatory)
                              throws ParameterException

      Throws:
        `ParameterException`

    - #### getByte

          public static byte getByte(javax.servlet.http.HttpServletRequest req,
                                     java.lang.String name,
                                     byte min,
                                     byte max,
                                     byte defaultValue,
                                     boolean isMandatory)
                              throws ParameterException

      Throws:
        `ParameterException`

    - #### getInt

          public static int getInt(javax.servlet.http.HttpServletRequest req,
                                   java.lang.String name,
                                   int min,
                                   int max,
                                   boolean isMandatory)
                            throws ParameterException

      Throws:
        `ParameterException`

    - #### getInt

          public static int getInt(javax.servlet.http.HttpServletRequest req,
                                   java.lang.String name,
                                   int min,
                                   int max,
                                   int defaultValue)
                            throws ParameterException

      Throws:
        `ParameterException`

    - #### getLong

          public static long getLong(javax.servlet.http.HttpServletRequest req,
                                     java.lang.String name,
                                     long min,
                                     long max,
                                     boolean isMandatory)
                              throws ParameterException

      Throws:
        `ParameterException`

    - #### getLong

          public static long getLong(javax.servlet.http.HttpServletRequest req,
                                     java.lang.String name,
                                     long min,
                                     long max,
                                     long defaultValue)
                              throws ParameterException

      Throws:
        `ParameterException`

    - #### getUnsignedLong

          public static long getUnsignedLong(javax.servlet.http.HttpServletRequest req,
                                             java.lang.String name,
                                             boolean isMandatory)
                                      throws ParameterException

      Throws:
        `ParameterException`

    - #### getUnsignedLongs

          public static long[] getUnsignedLongs(javax.servlet.http.HttpServletRequest req,
                                                java.lang.String name)
                                         throws ParameterException

      Throws:
        `ParameterException`

    - #### getBigInteger

          public static java.math.BigInteger getBigInteger(javax.servlet.http.HttpServletRequest req,
                                                           java.lang.String name,
                                                           boolean isMandatory)
                                                    throws ParameterException

      Throws:
        `ParameterException`

    - #### getBytes

          public static byte[] getBytes(javax.servlet.http.HttpServletRequest req,
                                        java.lang.String name,
                                        boolean isMandatory)
                                 throws ParameterException

      Throws:
        `ParameterException`

    - #### getJson

          public static org.json.simple.JSONObject getJson(javax.servlet.http.HttpServletRequest req,
                                                           java.lang.String name)

    - #### getJsonArray

          public static org.json.simple.JSONArray getJsonArray(javax.servlet.http.HttpServletRequest req,
                                                               java.lang.String name)

    - #### getParameter

          public static java.lang.String getParameter(javax.servlet.http.HttpServletRequest req,
                                                      java.lang.String name)
                                               throws ParameterException

      Throws:
        `ParameterException`

    - #### getAccountId

          public static long getAccountId(javax.servlet.http.HttpServletRequest req,
                                          boolean isMandatory)
                                   throws ParameterException

      Throws:
        `ParameterException`

    - #### getAccountId

          public static long getAccountId(javax.servlet.http.HttpServletRequest req,
                                          java.lang.String name,
                                          boolean isMandatory)
                                   throws ParameterException

      Throws:
        `ParameterException`

    - #### getAccountIds

          public static long[] getAccountIds(javax.servlet.http.HttpServletRequest req,
                                             boolean isMandatory)
                                      throws ParameterException

      Throws:
        `ParameterException`

    - #### getAlias

          public static AliasHome.Alias getAlias(javax.servlet.http.HttpServletRequest req)
                                          throws ParameterException

      Throws:
        `ParameterException`

    - #### getAmountNQT

          public static long getAmountNQT(javax.servlet.http.HttpServletRequest req)
                                   throws ParameterException

      Throws:
        `ParameterException`

    - #### getAmountNQTPerShare

          public static long getAmountNQTPerShare(javax.servlet.http.HttpServletRequest req)
                                           throws ParameterException

      Throws:
        `ParameterException`

    - #### getPriceNQT

          public static long getPriceNQT(javax.servlet.http.HttpServletRequest req)
                                  throws ParameterException

      Throws:
        `ParameterException`

    - #### getPriceNQTPerShare

          public static long getPriceNQTPerShare(javax.servlet.http.HttpServletRequest req)
                                          throws ParameterException

      Throws:
        `ParameterException`

    - #### getPriceNQTPerCoin

          public static long getPriceNQTPerCoin(javax.servlet.http.HttpServletRequest req)
                                         throws ParameterException

      Throws:
        `ParameterException`

    - #### getRateNQTPerUnit

          public static long getRateNQTPerUnit(javax.servlet.http.HttpServletRequest req)
                                        throws ParameterException

      Throws:
        `ParameterException`

    - #### getPoll

          public static PollHome.Poll getPoll(javax.servlet.http.HttpServletRequest req)
                                       throws ParameterException

      Throws:
        `ParameterException`

    - #### getAsset

          public static Asset getAsset(javax.servlet.http.HttpServletRequest req)
                                throws ParameterException

      Throws:
        `ParameterException`

    - #### getCurrency

          public static Currency getCurrency(javax.servlet.http.HttpServletRequest req)
                                      throws ParameterException

      Throws:
        `ParameterException`

    - #### getCurrency

          public static Currency getCurrency(javax.servlet.http.HttpServletRequest req,
                                             boolean isMandatory)
                                      throws ParameterException

      Throws:
        `ParameterException`

    - #### getBuyOffer

          public static ExchangeOfferHome.BuyOffer getBuyOffer(javax.servlet.http.HttpServletRequest req)
                                                        throws ParameterException

      Throws:
        `ParameterException`

    - #### getSellOffer

          public static ExchangeOfferHome.SellOffer getSellOffer(javax.servlet.http.HttpServletRequest req)
                                                          throws ParameterException

      Throws:
        `ParameterException`

    - #### getShuffling

          public static ShufflingHome.Shuffling getShuffling(javax.servlet.http.HttpServletRequest req)
                                                      throws ParameterException

      Throws:
        `ParameterException`

    - #### getQuantityQNT

          public static long getQuantityQNT(javax.servlet.http.HttpServletRequest req)
                                     throws ParameterException

      Throws:
        `ParameterException`

    - #### getUnitsQNT

          public static long getUnitsQNT(javax.servlet.http.HttpServletRequest req)
                                  throws ParameterException

      Throws:
        `ParameterException`

    - #### getGoods

          public static DigitalGoodsHome.Goods getGoods(javax.servlet.http.HttpServletRequest req)
                                                 throws ParameterException

      Throws:
        `ParameterException`

    - #### getGoodsQuantity

          public static int getGoodsQuantity(javax.servlet.http.HttpServletRequest req)
                                      throws ParameterException

      Throws:
        `ParameterException`

    - #### getEncryptedData

          public static EncryptedData getEncryptedData(javax.servlet.http.HttpServletRequest req,
                                                       java.lang.String messageType)
                                                throws ParameterException

      Throws:
        `ParameterException`

    - #### getEncryptToSelfMessage

          public static EncryptToSelfMessageAppendix getEncryptToSelfMessage(javax.servlet.http.HttpServletRequest req)
                                                                      throws ParameterException

      Throws:
        `ParameterException`

    - #### getPurchase

          public static DigitalGoodsHome.Purchase getPurchase(javax.servlet.http.HttpServletRequest req)
                                                       throws ParameterException

      Throws:
        `ParameterException`

    - #### getSecretPhrase

          public static java.lang.String getSecretPhrase(javax.servlet.http.HttpServletRequest req,
                                                         boolean isMandatory)
                                                  throws ParameterException

      Throws:
        `ParameterException`

    - #### getSecretPhrase

          public static java.lang.String getSecretPhrase(javax.servlet.http.HttpServletRequest req,
                                                         java.lang.String prefix,
                                                         boolean isMandatory)
                                                  throws ParameterException

      Throws:
        `ParameterException`

    - #### getPublicKey

          public static byte[] getPublicKey(javax.servlet.http.HttpServletRequest req)
                                     throws ParameterException

      Throws:
        `ParameterException`

    - #### getPublicKey

          public static byte[] getPublicKey(javax.servlet.http.HttpServletRequest req,
                                            java.lang.String prefix)
                                     throws ParameterException

      Throws:
        `ParameterException`

    - #### getPublicKeys

          public static java.util.List<byte[]> getPublicKeys(javax.servlet.http.HttpServletRequest req,
                                                             java.lang.String name)
                                                      throws ParameterException

      Throws:
        `ParameterException`

    - #### getSenderAccount

          public static Account getSenderAccount(javax.servlet.http.HttpServletRequest req)
                                          throws ParameterException

      Throws:
        `ParameterException`

    - #### getSenderId

          public static long getSenderId(javax.servlet.http.HttpServletRequest req)
                                  throws ParameterException

      Throws:
        `ParameterException`

    - #### getAccount

          public static Account getAccount(javax.servlet.http.HttpServletRequest req)
                                    throws ParameterException

      Throws:
        `ParameterException`

    - #### getAccount

          public static Account getAccount(javax.servlet.http.HttpServletRequest req,
                                           boolean isMandatory)
                                    throws ParameterException

      Throws:
        `ParameterException`

    - #### getAccounts

          public static java.util.List<Account> getAccounts(javax.servlet.http.HttpServletRequest req)
                                                     throws ParameterException

      Throws:
        `ParameterException`

    - #### getTimestamp

          public static int getTimestamp(javax.servlet.http.HttpServletRequest req)
                                  throws ParameterException

      Throws:
        `ParameterException`

    - #### getFirstIndex

          public static int getFirstIndex(javax.servlet.http.HttpServletRequest req)

    - #### getLastIndex

          public static int getLastIndex(javax.servlet.http.HttpServletRequest req)

    - #### getNumberOfConfirmations

          public static int getNumberOfConfirmations(javax.servlet.http.HttpServletRequest req)
                                              throws ParameterException

      Throws:
        `ParameterException`

    - #### getHeight

          public static int getHeight(javax.servlet.http.HttpServletRequest req)
                               throws ParameterException

      Throws:
        `ParameterException`

    - #### getHeight

          public static int getHeight(javax.servlet.http.HttpServletRequest req,
                                      boolean isMandatory)
                               throws ParameterException

      Throws:
        `ParameterException`

    - #### getHoldingType

          public static HoldingType getHoldingType(javax.servlet.http.HttpServletRequest req)
                                            throws ParameterException

      Throws:
        `ParameterException`

    - #### getHoldingId

          public static long getHoldingId(javax.servlet.http.HttpServletRequest req)
                                   throws ParameterException

      Throws:
        `ParameterException`

    - #### getAccountProperty

          public static java.lang.String getAccountProperty(javax.servlet.http.HttpServletRequest req,
                                                            boolean isMandatory)
                                                     throws ParameterException

      Throws:
        `ParameterException`

    - #### getChainTransactionId

          public static ChainTransactionId getChainTransactionId(javax.servlet.http.HttpServletRequest req,
                                                                 java.lang.String name)
                                                          throws ParameterException

      Throws:
        `ParameterException`

    - #### getChainTransactionIds

          public static java.util.List<ChainTransactionId> getChainTransactionIds(javax.servlet.http.HttpServletRequest req,
                                                                                  java.lang.String name)
                                                                           throws ParameterException

      Throws:
        `ParameterException`

    - #### getChainTransactionId

          public static ChainTransactionId getChainTransactionId(java.lang.String value)
                                                          throws ParameterException

      Throws:
        `ParameterException`

    - #### getSearchQuery

          public static java.lang.String getSearchQuery(javax.servlet.http.HttpServletRequest req)
                                                 throws ParameterException

      Throws:
        `ParameterException`

    - #### parseTransaction

          public static Transaction.Builder parseTransaction(java.lang.String transactionJSON,
                                                             java.lang.String transactionBytes,
                                                             java.lang.String prunableAttachmentJSON)
                                                      throws ParameterException

      Throws:
        `ParameterException`

    - #### getPlainMessage

          public static Appendix getPlainMessage(javax.servlet.http.HttpServletRequest req,
                                                 boolean prunable)
                                          throws ParameterException

      Throws:
        `ParameterException`

    - #### getEncryptedMessage

          public static Appendix getEncryptedMessage(javax.servlet.http.HttpServletRequest req,
                                                     Account recipient,
                                                     boolean prunable)
                                              throws ParameterException

      Throws:
        `ParameterException`

    - #### getTaggedData

          public static TaggedDataAttachment getTaggedData(javax.servlet.http.HttpServletRequest req)
                                                    throws ParameterException,
                                                           NxtException.NotValidException

      Throws:
        `ParameterException`
        `NxtException.NotValidException`

    - #### getFileData

          public static ParameterParser.FileData getFileData(javax.servlet.http.HttpServletRequest req,
                                                             java.lang.String paramName,
                                                             boolean isMandatory)
                                                      throws ParameterException

      Throws:
        `ParameterException`

    - #### getChain

          public static Chain getChain(javax.servlet.http.HttpServletRequest request)
                                throws ParameterException

      Throws:
        `ParameterException`

    - #### getChain

          public static Chain getChain(javax.servlet.http.HttpServletRequest request,
                                       boolean isMandatory)
                                throws ParameterException

      Throws:
        `ParameterException`

    - #### getChain

          public static Chain getChain(javax.servlet.http.HttpServletRequest request,
                                       java.lang.String name,
                                       boolean isMandatory)
                                throws ParameterException

      Throws:
        `ParameterException`

    - #### getChildChain

          public static ChildChain getChildChain(javax.servlet.http.HttpServletRequest request)
                                          throws ParameterException

      Throws:
        `ParameterException`

    - #### getChildChain

          public static ChildChain getChildChain(javax.servlet.http.HttpServletRequest request,
                                                 boolean isMandatory)
                                          throws ParameterException

      Throws:
        `ParameterException`

    - #### parseVoucher

          public static org.json.simple.JSONObject parseVoucher(byte[] data)
                                                         throws ParameterException

      Throws:
        `ParameterException`

    - #### parseVoucher

          public static org.json.simple.JSONObject parseVoucher(org.json.simple.JSONObject voucherJson)
                                                         throws ParameterException

      Throws:
        `ParameterException`

    - #### parsePhasingParams

          public static PhasingParams parsePhasingParams(javax.servlet.http.HttpServletRequest req,
                                                         java.lang.String parameterPrefix)
                                                  throws ParameterException

      Throws:
        `ParameterException`

    - #### getBundlingFilters

          public static java.util.List<Bundler.Filter> getBundlingFilters(javax.servlet.http.HttpServletRequest req)