Package com.atlassian.bamboo.webhook
Class WebhookResponseDetailsEntity
- java.lang.Object
-
- com.atlassian.core.bean.EntityObject
-
- com.atlassian.bamboo.hibernate.HibernateEntityObject
-
- com.atlassian.bamboo.webhook.WebhookResponseDetailsEntity
-
- All Implemented Interfaces:
BambooIdProvider
,BambooObject
,WebhookResponse
,WebhookResponseDetails
,Cloneable
@Entity public class WebhookResponseDetailsEntity extends HibernateEntityObject implements WebhookResponseDetails
-
-
Constructor Summary
Constructors Constructor Description WebhookResponseDetailsEntity()
WebhookResponseDetailsEntity(DefaultWebhookResponseService.WebhookToSave webhook, WebhookResponseStatus webhookResponseStatus)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Long
getDeploymentResultId()
@NotNull String
getEventName()
@NotNull org.springframework.http.HttpMethod
getHttpMethod()
String
getMessage()
String
getPlanResultKey()
Date
getReceiveTime()
String
getRequestBody()
String
getRequestHeaders()
String
getResponseBody()
String
getResponseHeaders()
@NotNull WebhookResponseStatus
getResponseStatus()
int
getRetriesCount()
@NotNull Date
getSendTime()
Integer
getStatusCode()
@NotNull String
getTemplateName()
@NotNull String
getUrl()
@NotNull UUID
getUuid()
void
setMessage(String message)
Set a informative message about why webhook response was "TIMEOUT" or "ERROR"void
setReceiveTime(Date receiveTime)
Set time of receiving webhook response.void
setResponseBody(String responseBody)
Set response body of webhook response.void
setResponseHeaders(String responseHeaders)
Set response headers of webhook response.void
setResponseStatus(WebhookResponseStatus responseStatus)
Set status of webhook response.void
setStatusCode(Integer statusCode)
Set status code of received webhook response.-
Methods inherited from class com.atlassian.bamboo.hibernate.HibernateEntityObject
getId, setId
-
Methods inherited from class com.atlassian.core.bean.EntityObject
clone, equals, getCreationDate, getCurrentDate, getLastModificationDate, hashCode, setClock, setCreationDate, setLastModificationDate
-
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.atlassian.bamboo.core.BambooIdProvider
getId
-
Methods inherited from interface com.atlassian.bamboo.core.BambooObject
setId
-
-
-
-
Constructor Detail
-
WebhookResponseDetailsEntity
public WebhookResponseDetailsEntity()
-
WebhookResponseDetailsEntity
public WebhookResponseDetailsEntity(DefaultWebhookResponseService.WebhookToSave webhook, WebhookResponseStatus webhookResponseStatus)
-
-
Method Detail
-
getRequestBody
public String getRequestBody()
- Specified by:
getRequestBody
in interfaceWebhookResponseDetails
- Returns:
- body of sent webhook.
-
getRequestHeaders
public String getRequestHeaders()
- Specified by:
getRequestHeaders
in interfaceWebhookResponseDetails
- Returns:
- headers of sent webhook.
-
getResponseBody
public String getResponseBody()
- Specified by:
getResponseBody
in interfaceWebhookResponseDetails
- Returns:
- body of received response.
-
getResponseHeaders
public String getResponseHeaders()
- Specified by:
getResponseHeaders
in interfaceWebhookResponseDetails
- Returns:
- headers of received response.
-
getStatusCode
public Integer getStatusCode()
- Specified by:
getStatusCode
in interfaceWebhookResponse
- Returns:
- current status code of webhook response. Null if there are no status code
-
getResponseStatus
@NotNull public @NotNull WebhookResponseStatus getResponseStatus()
- Specified by:
getResponseStatus
in interfaceWebhookResponse
- Returns:
- current status of webhook response.
-
getHttpMethod
@NotNull public @NotNull org.springframework.http.HttpMethod getHttpMethod()
- Specified by:
getHttpMethod
in interfaceWebhookResponse
- Returns:
- HTTP method of sent webhook
-
getUrl
@NotNull public @NotNull String getUrl()
- Specified by:
getUrl
in interfaceWebhookResponse
- Returns:
- destination URL on which webhook was sent.
-
getEventName
@NotNull public @NotNull String getEventName()
- Specified by:
getEventName
in interfaceWebhookResponse
- Returns:
- name of the event which triggered sending webhook.
-
getPlanResultKey
@Nullable public String getPlanResultKey()
- Specified by:
getPlanResultKey
in interfaceWebhookResponse
- Returns:
- plan result key associated with webhook. Null if webhook is not associated with any plan result.
-
getDeploymentResultId
@Nullable public Long getDeploymentResultId()
- Specified by:
getDeploymentResultId
in interfaceWebhookResponse
- Returns:
- deployment result id associated with webhook. Null if webhook is not associated with any deployment result.
-
getUuid
@NotNull public @NotNull UUID getUuid()
- Specified by:
getUuid
in interfaceWebhookResponse
- Returns:
- uuid of sent webhook.
-
getRetriesCount
public int getRetriesCount()
- Specified by:
getRetriesCount
in interfaceWebhookResponse
- Returns:
- number of retries of sending webhook.
-
getSendTime
@NotNull public @NotNull Date getSendTime()
- Specified by:
getSendTime
in interfaceWebhookResponse
- Returns:
- time of sending webhook.
-
getReceiveTime
@Nullable public Date getReceiveTime()
- Specified by:
getReceiveTime
in interfaceWebhookResponse
- Returns:
- time of receiving webhook response.
-
getTemplateName
@NotNull public @NotNull String getTemplateName()
- Specified by:
getTemplateName
in interfaceWebhookResponse
- Returns:
- name of template of sent webhook.
-
getMessage
public String getMessage()
- Specified by:
getMessage
in interfaceWebhookResponseDetails
- Returns:
- message about errors during sending webhook.
-
setResponseBody
public void setResponseBody(String responseBody)
Description copied from interface:WebhookResponseDetails
Set response body of webhook response.- Specified by:
setResponseBody
in interfaceWebhookResponseDetails
- Parameters:
responseBody
- body of received response.
-
setResponseHeaders
public void setResponseHeaders(String responseHeaders)
Description copied from interface:WebhookResponseDetails
Set response headers of webhook response.- Specified by:
setResponseHeaders
in interfaceWebhookResponseDetails
- Parameters:
responseHeaders
- headers of received response.
-
setStatusCode
public void setStatusCode(Integer statusCode)
Description copied from interface:WebhookResponseDetails
Set status code of received webhook response.- Specified by:
setStatusCode
in interfaceWebhookResponseDetails
- Parameters:
statusCode
- status code of received response
-
setResponseStatus
public void setResponseStatus(WebhookResponseStatus responseStatus)
Description copied from interface:WebhookResponseDetails
Set status of webhook response.- Specified by:
setResponseStatus
in interfaceWebhookResponseDetails
- Parameters:
responseStatus
- status of webhook response. Possible values: "PENDING", "ERROR", "TIMEOUT", "FINISHED".
-
setReceiveTime
public void setReceiveTime(Date receiveTime)
Description copied from interface:WebhookResponseDetails
Set time of receiving webhook response.- Specified by:
setReceiveTime
in interfaceWebhookResponseDetails
- Parameters:
receiveTime
- time in the moment when response status is changed from "PENDING" to any other state.
-
setMessage
public void setMessage(String message)
Description copied from interface:WebhookResponseDetails
Set a informative message about why webhook response was "TIMEOUT" or "ERROR"- Specified by:
setMessage
in interfaceWebhookResponseDetails
- Parameters:
message
- information about failure of webhook response
-
-