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 @Nullable LonggetDeploymentResultId()@NotNull StringgetEventName()@NotNull org.springframework.http.HttpMethodgetHttpMethod()StringgetMessage()@Nullable StringgetPlanResultKey()@Nullable DategetReceiveTime()StringgetRequestBody()StringgetRequestHeaders()StringgetResponseBody()StringgetResponseHeaders()@NotNull WebhookResponseStatusgetResponseStatus()intgetRetriesCount()@NotNull DategetSendTime()IntegergetStatusCode()@NotNull StringgetTemplateName()@NotNull StringgetUrl()@NotNull UUIDgetUuid()voidsetMessage(String message)Set a informative message about why webhook response was "TIMEOUT" or "ERROR"voidsetReceiveTime(Date receiveTime)Set time of receiving webhook response.voidsetResponseBody(String responseBody)Set response body of webhook response.voidsetResponseHeaders(String responseHeaders)Set response headers of webhook response.voidsetResponseStatus(WebhookResponseStatus responseStatus)Set status of webhook response.voidsetStatusCode(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:
getRequestBodyin interfaceWebhookResponseDetails- Returns:
- body of sent webhook.
-
getRequestHeaders
public String getRequestHeaders()
- Specified by:
getRequestHeadersin interfaceWebhookResponseDetails- Returns:
- headers of sent webhook.
-
getResponseBody
public String getResponseBody()
- Specified by:
getResponseBodyin interfaceWebhookResponseDetails- Returns:
- body of received response.
-
getResponseHeaders
public String getResponseHeaders()
- Specified by:
getResponseHeadersin interfaceWebhookResponseDetails- Returns:
- headers of received response.
-
getStatusCode
public Integer getStatusCode()
- Specified by:
getStatusCodein interfaceWebhookResponse- Returns:
- current status code of webhook response. Null if there are no status code
-
getResponseStatus
@NotNull public @NotNull WebhookResponseStatus getResponseStatus()
- Specified by:
getResponseStatusin interfaceWebhookResponse- Returns:
- current status of webhook response.
-
getHttpMethod
@NotNull public @NotNull org.springframework.http.HttpMethod getHttpMethod()
- Specified by:
getHttpMethodin interfaceWebhookResponse- Returns:
- HTTP method of sent webhook
-
getUrl
@NotNull public @NotNull String getUrl()
- Specified by:
getUrlin interfaceWebhookResponse- Returns:
- destination URL on which webhook was sent.
-
getEventName
@NotNull public @NotNull String getEventName()
- Specified by:
getEventNamein interfaceWebhookResponse- Returns:
- name of the event which triggered sending webhook.
-
getPlanResultKey
@Nullable public @Nullable String getPlanResultKey()
- Specified by:
getPlanResultKeyin interfaceWebhookResponse- Returns:
- plan result key associated with webhook. Null if webhook is not associated with any plan result.
-
getDeploymentResultId
@Nullable public @Nullable Long getDeploymentResultId()
- Specified by:
getDeploymentResultIdin 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:
getUuidin interfaceWebhookResponse- Returns:
- uuid of sent webhook.
-
getRetriesCount
public int getRetriesCount()
- Specified by:
getRetriesCountin interfaceWebhookResponse- Returns:
- number of retries of sending webhook.
-
getSendTime
@NotNull public @NotNull Date getSendTime()
- Specified by:
getSendTimein interfaceWebhookResponse- Returns:
- time of sending webhook.
-
getReceiveTime
@Nullable public @Nullable Date getReceiveTime()
- Specified by:
getReceiveTimein interfaceWebhookResponse- Returns:
- time of receiving webhook response.
-
getTemplateName
@NotNull public @NotNull String getTemplateName()
- Specified by:
getTemplateNamein interfaceWebhookResponse- Returns:
- name of template of sent webhook.
-
getMessage
public String getMessage()
- Specified by:
getMessagein interfaceWebhookResponseDetails- Returns:
- message about errors during sending webhook.
-
setResponseBody
public void setResponseBody(String responseBody)
Description copied from interface:WebhookResponseDetailsSet response body of webhook response.- Specified by:
setResponseBodyin interfaceWebhookResponseDetails- Parameters:
responseBody- body of received response.
-
setResponseHeaders
public void setResponseHeaders(String responseHeaders)
Description copied from interface:WebhookResponseDetailsSet response headers of webhook response.- Specified by:
setResponseHeadersin interfaceWebhookResponseDetails- Parameters:
responseHeaders- headers of received response.
-
setStatusCode
public void setStatusCode(Integer statusCode)
Description copied from interface:WebhookResponseDetailsSet status code of received webhook response.- Specified by:
setStatusCodein interfaceWebhookResponseDetails- Parameters:
statusCode- status code of received response
-
setResponseStatus
public void setResponseStatus(WebhookResponseStatus responseStatus)
Description copied from interface:WebhookResponseDetailsSet status of webhook response.- Specified by:
setResponseStatusin interfaceWebhookResponseDetails- Parameters:
responseStatus- status of webhook response. Possible values: "PENDING", "ERROR", "TIMEOUT", "FINISHED".
-
setReceiveTime
public void setReceiveTime(Date receiveTime)
Description copied from interface:WebhookResponseDetailsSet time of receiving webhook response.- Specified by:
setReceiveTimein 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:WebhookResponseDetailsSet a informative message about why webhook response was "TIMEOUT" or "ERROR"- Specified by:
setMessagein interfaceWebhookResponseDetails- Parameters:
message- information about failure of webhook response
-
-