java.lang.Object
org.a2aproject.sdk.extras.taskstore.database.jpa.JpaTask

@Entity public class JpaTask extends Object
  • Constructor Details

    • JpaTask

      public JpaTask()
    • JpaTask

      public JpaTask(String id, String taskJson)
  • Method Details

    • getId

      public String getId()
    • setId

      public void setId(String id)
    • getContextId

      public String getContextId()
    • setContextId

      public void setContextId(String contextId)
    • getState

      public String getState()
    • setState

      public void setState(String state)
    • getStatusTimestamp

      public Instant getStatusTimestamp()
    • setStatusTimestamp

      public void setStatusTimestamp(Instant statusTimestamp)
    • getTaskJson

      public String getTaskJson()
    • setTaskJson

      public void setTaskJson(String taskJson)
    • getFinalizedAt

      public Instant getFinalizedAt()
    • setFinalizedAt

      public void setFinalizedAt(Instant finalizedAt, boolean isFinalState)
      Sets the finalized timestamp for this task.

      This method is idempotent - it only sets the timestamp on the first transition to a final state, as a defense-in-depth measure complementing the existing application logic that prevents modifications to final tasks.

      Parameters:
      finalizedAt - the timestamp when the task was finalized
      isFinalState - whether the current task state is final
    • getTask

      public org.a2aproject.sdk.spec.Task getTask() throws org.a2aproject.sdk.jsonrpc.common.json.JsonProcessingException
      Throws:
      org.a2aproject.sdk.jsonrpc.common.json.JsonProcessingException
    • setTask

      public void setTask(org.a2aproject.sdk.spec.Task task) throws org.a2aproject.sdk.jsonrpc.common.json.JsonProcessingException
      Throws:
      org.a2aproject.sdk.jsonrpc.common.json.JsonProcessingException