@UriEndpoint(firstVersion="3.0",
scheme="jira",
title="Jira",
syntax="jira:type",
category={API,REPORTING})
public class JiraEndpoint
extends org.apache.camel.support.DefaultEndpoint
The endpoint encapsulates portions of the JIRA API, relying on the jira-rest-java-client SDK. Available endpoint URIs include:
CONSUMERS jira://newIssues (retrieve only new issues after the route is started) jira://newComments (retrieve only new comments after the route is started) jira://watchChanges (retrieve only defined changes in issues picked base on provided jql)
PRODUCERS jira://addIssue (add an issue) jira://addComment (add a comment on a given issue) jira://attach (add an attachment on a given issue) jira://deleteIssue (delete a given issue) jira://updateIssue (update fields of a given issue) jira://transitionIssue (transition a status of a given issue) jira://watchers (add/remove watchers of a given issue)
The endpoints will respond with jira-rest-java-client POJOs (Issue, Comment, etc.)
Note: Rather than webhooks, this endpoint relies on simple polling. Reasons include: - concerned about reliability/stability if this somehow relied on an exposed, embedded server (Jetty?) - the types of payloads we're polling aren't typically large (plus, paging is available in the API) - need to support apps running somewhere not publicly accessible where a webhook would fail
| Constructor and Description |
|---|
JiraEndpoint(String uri,
JiraComponent component,
JiraConfiguration configuration) |
| Modifier and Type | Method and Description |
|---|---|
org.apache.camel.Consumer |
createConsumer(org.apache.camel.Processor processor) |
org.apache.camel.Producer |
createProducer() |
void |
doStart() |
protected void |
doStop() |
com.atlassian.jira.rest.client.api.JiraRestClient |
getClient() |
JiraConfiguration |
getConfiguration() |
int |
getDelay() |
String |
getJql()
JQL is the query language from JIRA which allows you to retrieve the data you want.
|
Integer |
getMaxResults() |
JiraType |
getType() |
String |
getWatchedFields()
Comma separated list of fields to watch for changes.
|
boolean |
isSendOnlyUpdatedField()
Indicator for sending only changed fields in exchange body or issue object.
|
void |
setClient(com.atlassian.jira.rest.client.api.JiraRestClient client) |
void |
setJql(String jql) |
void |
setMaxResults(Integer maxResults)
Max number of issues to search for
|
void |
setSendOnlyUpdatedField(boolean sendOnlyUpdatedField) |
void |
setType(JiraType type)
Operation to perform.
|
void |
setWatchedFields(String watchChange) |
configureConsumer, configurePollingConsumer, configureProperties, createAsyncProducer, createEndpointUri, createExchange, createExchange, createPollingConsumer, doInit, equals, getCamelContext, getComponent, getEndpointKey, getEndpointUri, getExceptionHandler, getExchangePattern, getId, getPollingConsumerBlockTimeout, getPollingConsumerQueueSize, hashCode, isAutowiredEnabled, isBridgeErrorHandler, isLazyStartProducer, isLenientProperties, isPollingConsumerBlockWhenFull, isSingleton, isSynchronous, setAutowiredEnabled, setBridgeErrorHandler, setCamelContext, setComponent, setEndpointUri, setEndpointUriIfNotSpecified, setExceptionHandler, setExchangePattern, setLazyStartProducer, setPollingConsumerBlockTimeout, setPollingConsumerBlockWhenFull, setPollingConsumerQueueSize, setProperties, setSynchronous, toStringbuild, doBuild, doFail, doLifecycleChange, doResume, doShutdown, doSuspend, fail, getStatus, init, isBuild, isInit, isNew, isRunAllowed, isShutdown, isStarted, isStarting, isStartingOrStarted, isStopped, isStopping, isStoppingOrStopped, isSuspended, isSuspending, isSuspendingOrSuspended, resume, shutdown, start, stop, suspendclone, finalize, getClass, notify, notifyAll, wait, wait, waitpublic JiraEndpoint(String uri, JiraComponent component, JiraConfiguration configuration)
public JiraConfiguration getConfiguration()
public void doStart()
throws Exception
doStart in class org.apache.camel.support.DefaultEndpointExceptionprotected void doStop()
throws Exception
doStop in class org.apache.camel.support.DefaultEndpointExceptionpublic org.apache.camel.Producer createProducer()
public org.apache.camel.Consumer createConsumer(org.apache.camel.Processor processor)
throws Exception
Exceptionpublic JiraType getType()
public void setType(JiraType type)
public String getJql()
public void setJql(String jql)
public int getDelay()
public com.atlassian.jira.rest.client.api.JiraRestClient getClient()
public void setClient(com.atlassian.jira.rest.client.api.JiraRestClient client)
public Integer getMaxResults()
public void setMaxResults(Integer maxResults)
public String getWatchedFields()
public void setWatchedFields(String watchChange)
public boolean isSendOnlyUpdatedField()
public void setSendOnlyUpdatedField(boolean sendOnlyUpdatedField)
Apache Camel