Package 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 Description static class
ParameterParser.FileData
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method 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 Alias
getAlias(javax.servlet.http.HttpServletRequest req)
static long
getAmountNQT(javax.servlet.http.HttpServletRequest req)
static long
getAmountNQTPerQNT(javax.servlet.http.HttpServletRequest req)
static Asset
getAsset(javax.servlet.http.HttpServletRequest req)
static CurrencyBuyOffer
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 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 Appendix.EncryptToSelfMessage
getEncryptToSelfMessage(javax.servlet.http.HttpServletRequest req)
static long
getFeeNQT(javax.servlet.http.HttpServletRequest req)
static int
getFirstIndex(javax.servlet.http.HttpServletRequest req)
static DigitalGoodsStore.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, HoldingType holdingType)
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 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 Poll
getPoll(javax.servlet.http.HttpServletRequest req)
static long
getPriceNQT(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 DigitalGoodsStore.Purchase
getPurchase(javax.servlet.http.HttpServletRequest req)
static long
getQuantityQNT(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 CurrencySellOffer
getSellOffer(javax.servlet.http.HttpServletRequest req)
static Account
getSenderAccount(javax.servlet.http.HttpServletRequest req)
static Shuffling
getShuffling(javax.servlet.http.HttpServletRequest req)
static Attachment.TaggedDataUpload
getTaggedData(javax.servlet.http.HttpServletRequest req)
static int
getTimestamp(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 Transaction.Builder
parseTransaction(java.lang.String transactionJSON, java.lang.String transactionBytes, java.lang.String prunableAttachmentJSON)
-
-
-
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
-
getBytes
public static byte[] getBytes(javax.servlet.http.HttpServletRequest req, java.lang.String name, boolean isMandatory) throws ParameterException
- Throws:
ParameterException
-
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 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
-
getFeeNQT
public static long getFeeNQT(javax.servlet.http.HttpServletRequest req) throws ParameterException
- Throws:
ParameterException
-
getPriceNQT
public static long getPriceNQT(javax.servlet.http.HttpServletRequest req) throws ParameterException
- Throws:
ParameterException
-
getPoll
public static 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 CurrencyBuyOffer getBuyOffer(javax.servlet.http.HttpServletRequest req) throws ParameterException
- Throws:
ParameterException
-
getSellOffer
public static CurrencySellOffer getSellOffer(javax.servlet.http.HttpServletRequest req) throws ParameterException
- Throws:
ParameterException
-
getShuffling
public static 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
-
getAmountNQTPerQNT
public static long getAmountNQTPerQNT(javax.servlet.http.HttpServletRequest req) throws ParameterException
- Throws:
ParameterException
-
getGoods
public static DigitalGoodsStore.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 Appendix.EncryptToSelfMessage getEncryptToSelfMessage(javax.servlet.http.HttpServletRequest req) throws ParameterException
- Throws:
ParameterException
-
getPurchase
public static DigitalGoodsStore.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
-
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
-
getSenderAccount
public static Account getSenderAccount(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, HoldingType holdingType) throws ParameterException
- Throws:
ParameterException
-
getAccountProperty
public static java.lang.String getAccountProperty(javax.servlet.http.HttpServletRequest req, boolean isMandatory) 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 Attachment.TaggedDataUpload getTaggedData(javax.servlet.http.HttpServletRequest req) throws ParameterException, NxtException.NotValidException
-
-