Class OneTimeCodeAsset

java.lang.Object
it.unibo.ds.chainvote.asset.OneTimeCodeAsset

public final class OneTimeCodeAsset extends Object
Hyperledger Fabric OneTimeCode asset.
  • Constructor Details

    • OneTimeCodeAsset

      public OneTimeCodeAsset(@JsonProperty("electionId") String electionId, @JsonProperty("userId") String userId, @JsonProperty("code") it.unibo.ds.chainvote.codes.OneTimeCode code)
      Creates a new asset.
      Parameters:
      electionId - the election identifier
      userId - the user identifier
      code - the code to be associated to the given election and user
  • Method Details

    • getElectionId

      public String getElectionId()
      Returns:
      the election identifier
    • getCode

      public it.unibo.ds.chainvote.codes.OneTimeCode getCode()
      Returns:
      the code
    • getUserId

      public String getUserId()
      Returns:
      the user identifier
    • toString

      public String toString()
      Overrides:
      toString in class Object