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
ConstructorsConstructorDescriptionWebhookResponseDetailsEntity(DefaultWebhookResponseService.WebhookToSave webhook, WebhookResponseStatus webhookResponseStatus) -
Method Summary
Modifier and TypeMethodDescription@Nullable Long@NotNull String@NotNull HttpMethod@Nullable String@Nullable Date@NotNull WebhookResponseStatusint@NotNull Date@NotNull String@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, setIdMethods inherited from class com.atlassian.core.bean.EntityObject
clone, equals, getCreationDate, getCurrentDate, getLastModificationDate, hashCode, setClock, setCreationDate, setLastModificationDateMethods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.atlassian.bamboo.core.BambooIdProvider
getIdMethods inherited from interface com.atlassian.bamboo.core.BambooObject
setId
-
Constructor Details
-
WebhookResponseDetailsEntity
public WebhookResponseDetailsEntity() -
WebhookResponseDetailsEntity
public WebhookResponseDetailsEntity(DefaultWebhookResponseService.WebhookToSave webhook, WebhookResponseStatus webhookResponseStatus)
-
-
Method Details
-
getRequestBody
- Specified by:
getRequestBodyin interfaceWebhookResponseDetails- Returns:
- body of sent webhook.
-
getRequestHeaders
- Specified by:
getRequestHeadersin interfaceWebhookResponseDetails- Returns:
- headers of sent webhook.
-
getResponseBody
- Specified by:
getResponseBodyin interfaceWebhookResponseDetails- Returns:
- body of received response.
-
getResponseHeaders
- Specified by:
getResponseHeadersin interfaceWebhookResponseDetails- Returns:
- headers of received response.
-
getStatusCode
- Specified by:
getStatusCodein interfaceWebhookResponse- Returns:
- current status code of webhook response. Null if there are no status code
-
getResponseStatus
- Specified by:
getResponseStatusin interfaceWebhookResponse- Returns:
- current status of webhook response.
-
getHttpMethod
- Specified by:
getHttpMethodin interfaceWebhookResponse- Returns:
- HTTP method of sent webhook
-
getUrl
- Specified by:
getUrlin interfaceWebhookResponse- Returns:
- destination URL on which webhook was sent.
-
getEventName
- Specified by:
getEventNamein interfaceWebhookResponse- Returns:
- name of the event which triggered sending webhook.
-
getPlanResultKey
- Specified by:
getPlanResultKeyin interfaceWebhookResponse- Returns:
- plan result key associated with webhook. Null if webhook is not associated with any plan result.
-
getDeploymentResultId
- Specified by:
getDeploymentResultIdin interfaceWebhookResponse- Returns:
- deployment result id associated with webhook. Null if webhook is not associated with any deployment result.
-
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
- Specified by:
getSendTimein interfaceWebhookResponse- Returns:
- time of sending webhook.
-
getReceiveTime
- Specified by:
getReceiveTimein interfaceWebhookResponse- Returns:
- time of receiving webhook response.
-
getTemplateName
- Specified by:
getTemplateNamein interfaceWebhookResponse- Returns:
- name of template of sent webhook.
-
getMessage
- Specified by:
getMessagein interfaceWebhookResponseDetails- Returns:
- message about errors during sending webhook.
-
setResponseBody
Description copied from interface:WebhookResponseDetailsSet response body of webhook response.- Specified by:
setResponseBodyin interfaceWebhookResponseDetails- Parameters:
responseBody- body of received response.
-
setResponseHeaders
Description copied from interface:WebhookResponseDetailsSet response headers of webhook response.- Specified by:
setResponseHeadersin interfaceWebhookResponseDetails- Parameters:
responseHeaders- headers of received response.
-
setStatusCode
Description copied from interface:WebhookResponseDetailsSet status code of received webhook response.- Specified by:
setStatusCodein interfaceWebhookResponseDetails- Parameters:
statusCode- status code of received response
-
setResponseStatus
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
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
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
-