@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)
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() |
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 |
setType(JiraType type)
Operation to perform.
|
configureConsumer, configurePollingConsumer, configureProperties, createAsyncProducer, createEndpointUri, createExchange, createExchange, createPollingConsumer, doInit, equals, getCamelContext, getComponent, getEndpointKey, getEndpointUri, getExceptionHandler, getExchangePattern, getId, getPollingConsumerBlockTimeout, getPollingConsumerQueueSize, hashCode, isBasicPropertyBinding, isBridgeErrorHandler, isLazyStartProducer, isLenientProperties, isPollingConsumerBlockWhenFull, isSingleton, isSynchronous, setBasicPropertyBinding, setBridgeErrorHandler, setCamelContext, setComponent, setEndpointUri, setEndpointUriIfNotSpecified, setExceptionHandler, setExchangePattern, setLazyStartProducer, setPollingConsumerBlockTimeout, setPollingConsumerBlockWhenFull, setPollingConsumerQueueSize, setProperties, setSynchronous, toString
build, 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, suspend
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
public JiraEndpoint(String uri, JiraComponent component, JiraConfiguration configuration)
public JiraConfiguration getConfiguration()
public void doStart() throws Exception
doStart
in class org.apache.camel.support.DefaultEndpoint
Exception
protected void doStop() throws Exception
doStop
in class org.apache.camel.support.DefaultEndpoint
Exception
public org.apache.camel.Producer createProducer()
public org.apache.camel.Consumer createConsumer(org.apache.camel.Processor processor) throws Exception
Exception
public 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)
Apache Camel