public class PreImageOrder extends Order implements Payment
Created by Philip Vendil on 2018-12-30.
Modifier and Type | Field and Description |
---|---|
protected byte[] |
preImage |
CLAIM_NAME, description, expireDate, orderAmount, preImageHash
Constructor and Description |
---|
PreImageOrder()
Empty Constructor
|
PreImageOrder(byte[] preImage,
Order order)
Default Constructor.
|
PreImageOrder(javax.json.JsonObject jsonObject)
JSON Parseable constructor
|
PreImageOrder(org.jose4j.jwt.JwtClaims jwtClaims)
Parse from JWTClaims constructor
|
Modifier and Type | Method and Description |
---|---|
void |
convertToJson(javax.json.JsonObjectBuilder jsonObjectBuilder)
Method that should set the objects property to Json representation.
|
byte[] |
getPreImage() |
void |
parseJson(javax.json.JsonObject jsonObject)
Method to read all properties from a JsonObject into this value object.
|
void |
setPreImage(byte[] preImage) |
PreImageData |
toPreImageData()
Help method to convert the order to a pre image data.
|
getClaimName, getDescription, getExpireDate, getOrderAmount, getPreImageHash, setDescription, setExpireDate, setOrderAmount, setPreImageHash
add, addB58, addNotRequired, addNotRequiredB58, getBoolean, getBooleanIfSet, getByteArrayFromB58, getByteArrayFromB58IfSet, getByteArrayFromB64, getByteArrayFromB64IfSet, getByteArrayFromHex, getByteArrayFromHexIfSet, getDate, getDateIfSet, getDouble, getDoubleIfSet, getInt, getIntIfSet, getJsonArray, getJsonArrayIfSet, getJsonObject, getJsonObjectIfSet, getLong, getLongIfSet, getString, getStringIfSet, toJson, toJsonAsString, toString
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getPreImageHash
public PreImageOrder()
public PreImageOrder(byte[] preImage, Order order)
preImage
- the generated secret preImage from PreImageData. (Required)order
- the related order to include preImage to. (Required)public PreImageOrder(javax.json.JsonObject jsonObject) throws javax.json.JsonException
jsonObject
- the json object to parsejavax.json.JsonException
public PreImageOrder(org.jose4j.jwt.JwtClaims jwtClaims)
jwtClaims
- the JWT Tokens Claim set to extract data from.public byte[] getPreImage()
public void setPreImage(byte[] preImage)
preImage
- the generated secret preImage from PreImageData.public PreImageData toPreImageData()
public void convertToJson(javax.json.JsonObjectBuilder jsonObjectBuilder) throws javax.json.JsonException
convertToJson
in class Order
jsonObjectBuilder
- the json object build to use to set key/values in jsonjavax.json.JsonException
- if problems occurred converting object to JSON.public void parseJson(javax.json.JsonObject jsonObject) throws javax.json.JsonException