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
ConstructorDescriptionWebhookResponseDetailsEntity
(DefaultWebhookResponseService.WebhookToSave webhook, WebhookResponseStatus webhookResponseStatus) -
Method Summary
Modifier and TypeMethodDescription@NotNull String
@NotNull HttpMethod
@NotNull WebhookResponseStatus
int
@NotNull Date
@NotNull String
@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 Details
-
WebhookResponseDetailsEntity
public WebhookResponseDetailsEntity() -
WebhookResponseDetailsEntity
public WebhookResponseDetailsEntity(DefaultWebhookResponseService.WebhookToSave webhook, WebhookResponseStatus webhookResponseStatus)
-
-
Method Details
-
getRequestBody
- Specified by:
getRequestBody
in interfaceWebhookResponseDetails
- Returns:
- body of sent webhook.
-
getRequestHeaders
- Specified by:
getRequestHeaders
in interfaceWebhookResponseDetails
- Returns:
- headers of sent webhook.
-
getResponseBody
- Specified by:
getResponseBody
in interfaceWebhookResponseDetails
- Returns:
- body of received response.
-
getResponseHeaders
- Specified by:
getResponseHeaders
in interfaceWebhookResponseDetails
- Returns:
- headers of received response.
-
getStatusCode
- Specified by:
getStatusCode
in interfaceWebhookResponse
- Returns:
- current status code of webhook response. Null if there are no status code
-
getResponseStatus
- Specified by:
getResponseStatus
in interfaceWebhookResponse
- Returns:
- current status of webhook response.
-
getHttpMethod
- Specified by:
getHttpMethod
in interfaceWebhookResponse
- Returns:
- HTTP method of sent webhook
-
getUrl
- Specified by:
getUrl
in interfaceWebhookResponse
- Returns:
- destination URL on which webhook was sent.
-
getEventName
- Specified by:
getEventName
in interfaceWebhookResponse
- Returns:
- name of the event which triggered sending webhook.
-
getPlanResultKey
- Specified by:
getPlanResultKey
in interfaceWebhookResponse
- Returns:
- plan result key associated with webhook. Null if webhook is not associated with any plan result.
-
getDeploymentResultId
- Specified by:
getDeploymentResultId
in interfaceWebhookResponse
- Returns:
- deployment result id associated with webhook. Null if webhook is not associated with any deployment result.
-
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
- Specified by:
getSendTime
in interfaceWebhookResponse
- Returns:
- time of sending webhook.
-
getReceiveTime
- Specified by:
getReceiveTime
in interfaceWebhookResponse
- Returns:
- time of receiving webhook response.
-
getTemplateName
- Specified by:
getTemplateName
in interfaceWebhookResponse
- Returns:
- name of template of sent webhook.
-
getMessage
- Specified by:
getMessage
in interfaceWebhookResponseDetails
- Returns:
- message about errors during sending webhook.
-
setResponseBody
Description copied from interface:WebhookResponseDetails
Set response body of webhook response.- Specified by:
setResponseBody
in interfaceWebhookResponseDetails
- Parameters:
responseBody
- body of received response.
-
setResponseHeaders
Description copied from interface:WebhookResponseDetails
Set response headers of webhook response.- Specified by:
setResponseHeaders
in interfaceWebhookResponseDetails
- Parameters:
responseHeaders
- headers of received response.
-
setStatusCode
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
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
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
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
-