Class TicketValueObject

java.lang.Object
ubic.gemma.model.common.auditAndSecurity.curation.TicketValueObject
All Implemented Interfaces:
Serializable

public class TicketValueObject extends Object implements Serializable
Value object projection of Ticket for the REST surface (Phase B-2 of AUDIT_AS_WORKFLOW_RECCE.md). Embeds the ticket's targets and (optionally) its event log.

Events are populated by the "single ticket" endpoint; the list endpoint leaves the events collection empty for payload economy.

Author:
paul
See Also:
  • Constructor Details

    • TicketValueObject

      public TicketValueObject()
  • Method Details

    • from

      public static TicketValueObject from(Ticket t)
      Project the ticket WITHOUT its event log (cheap, for list views). Targets are always included.
    • from

      public static TicketValueObject from(Ticket t, boolean includeEvents)
      Project the ticket; include events iff includeEvents. Events are sorted by occurredAt ascending.
    • getId

      public Long getId()
    • getTitle

      public String getTitle()
    • getBody

      public String getBody()
      Curator-facing instructions text. May be empty for tickets filed by scripts that didn't set a body. Empty string (not null) on serialization to match the UI contract — see TicketValueObject TypeScript interface in gemma-curation-ui.
    • getType

      public TicketType getType()
    • getState

      public TicketState getState()
    • getPriority

      public TicketPriority getPriority()
    • getMode

      public TicketMode getMode()
      How the ticket advances between actions. MANUAL (default) requires explicit curator action for each step; AUTO auto-schedules the next defined action when the current one finishes with all targets DONE.
    • isAcceptsTargets

      public boolean isAcceptsTargets()
      Whether experiments may be added to this ticket after it was opened. False unless a curator has opened the ticket up — a scratchpad. Note a RESOLVED ticket refuses additions even when this is true, so this alone does not tell a client the add will succeed.
    • getDueDate

      @Nullable public Date getDueDate()
    • getReporterId

      @Nullable public Long getReporterId()
    • getReporterName

      @Nullable public String getReporterName()
    • getAssigneeId

      @Nullable public Long getAssigneeId()
    • getAssigneeName

      @Nullable public String getAssigneeName()
    • getPayload

      @Nullable public String getPayload()
      What the screen that produced this ticket asked, verbatim and opaque.
      See Also:
    • getPayloadSchemaVersion

      @Nullable public Integer getPayloadSchemaVersion()
      Which schema payload follows; null when the writer declared none.

      On the wire beside the payload on purpose — a version a client cannot read is a version that does not exist for it.

    • getCreatedAt

      public Date getCreatedAt()
    • getUpdatedAt

      public Date getUpdatedAt()
    • getExternalIssueUrl

      @Nullable public String getExternalIssueUrl()
    • getExternalIssueSyncState

      public ExternalIssueSyncState getExternalIssueSyncState()
    • getTargets

      public List<TicketTargetValueObject> getTargets()
    • getEvents

      public List<TicketEventValueObject> getEvents()
    • setId

      public void setId(Long id)
    • setTitle

      public void setTitle(String title)
    • setBody

      public void setBody(String body)
      Curator-facing instructions text. May be empty for tickets filed by scripts that didn't set a body. Empty string (not null) on serialization to match the UI contract — see TicketValueObject TypeScript interface in gemma-curation-ui.
    • setType

      public void setType(TicketType type)
    • setState

      public void setState(TicketState state)
    • setPriority

      public void setPriority(TicketPriority priority)
    • setMode

      public void setMode(TicketMode mode)
      How the ticket advances between actions. MANUAL (default) requires explicit curator action for each step; AUTO auto-schedules the next defined action when the current one finishes with all targets DONE.
    • setAcceptsTargets

      public void setAcceptsTargets(boolean acceptsTargets)
      Whether experiments may be added to this ticket after it was opened. False unless a curator has opened the ticket up — a scratchpad. Note a RESOLVED ticket refuses additions even when this is true, so this alone does not tell a client the add will succeed.
    • setDueDate

      public void setDueDate(@Nullable Date dueDate)
    • setReporterId

      public void setReporterId(@Nullable Long reporterId)
    • setReporterName

      public void setReporterName(@Nullable String reporterName)
    • setAssigneeId

      public void setAssigneeId(@Nullable Long assigneeId)
    • setAssigneeName

      public void setAssigneeName(@Nullable String assigneeName)
    • setPayload

      public void setPayload(@Nullable String payload)
      What the screen that produced this ticket asked, verbatim and opaque.
      See Also:
    • setPayloadSchemaVersion

      public void setPayloadSchemaVersion(@Nullable Integer payloadSchemaVersion)
      Which schema payload follows; null when the writer declared none.

      On the wire beside the payload on purpose — a version a client cannot read is a version that does not exist for it.

    • setCreatedAt

      public void setCreatedAt(Date createdAt)
    • setUpdatedAt

      public void setUpdatedAt(Date updatedAt)
    • setExternalIssueUrl

      public void setExternalIssueUrl(@Nullable String externalIssueUrl)
    • setExternalIssueSyncState

      public void setExternalIssueSyncState(ExternalIssueSyncState externalIssueSyncState)
    • setTargets

      public void setTargets(List<TicketTargetValueObject> targets)
    • setEvents

      public void setEvents(List<TicketEventValueObject> events)
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • canEqual

      protected boolean canEqual(Object other)
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object