Package com.redhat.parodos.tasks.jira
Class JiraTask
- java.lang.Object
-
- com.redhat.parodos.workflow.task.BaseWorkFlowTask
-
- com.redhat.parodos.tasks.jira.JiraTask
-
- All Implemented Interfaces:
WorkFlowTask,com.redhat.parodos.workflows.work.Work,org.springframework.beans.factory.Aware,org.springframework.beans.factory.BeanNameAware
public class JiraTask extends BaseWorkFlowTask
JiraTask can create/retrieve/update/delete a jira task depending on the fields passed in the context of the execution. #excute returns an extended work report containing a jira issue, and/or the api respond Any 2xx return code is COMPLETED, and anything else is FAILED
-
-
Field Summary
Fields Modifier and Type Field Description static intDEFAULT_EXECUTION_TIMEOUT_IN_SECONDSprotected com.redhat.parodos.tasks.jira.JiraTask.JiraIssueClientjiraClient
-
Constructor Summary
Constructors Constructor Description JiraTask()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description com.redhat.parodos.workflows.work.WorkReportexecute(com.redhat.parodos.workflows.work.WorkContext workContext)@NonNull List<WorkParameter>getWorkFlowTaskParameters()-
Methods inherited from class com.redhat.parodos.workflow.task.BaseWorkFlowTask
addParameter, getAllParameters, getMainExecutionId, getName, getOptionalParameterValue, getProjectId, getRequiredParameterValue, getWorkFlowCheckers, setBeanName, setWorkFlowCheckers
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.redhat.parodos.workflow.task.WorkFlowTask
getAsJsonSchema, getWorkFlowTaskOutputs
-
-
-
-
Field Detail
-
jiraClient
protected com.redhat.parodos.tasks.jira.JiraTask.JiraIssueClient jiraClient
-
DEFAULT_EXECUTION_TIMEOUT_IN_SECONDS
public static final int DEFAULT_EXECUTION_TIMEOUT_IN_SECONDS
- See Also:
- Constant Field Values
-
-
Method Detail
-
getWorkFlowTaskParameters
@NonNull public @NonNull List<WorkParameter> getWorkFlowTaskParameters()
-
execute
public com.redhat.parodos.workflows.work.WorkReport execute(com.redhat.parodos.workflows.work.WorkContext workContext)
- Parameters:
workContext- optional context values: serverURL, and bearerToken for the Jira's client auth. Other optional context values and how they affect execution: Create: id: do not exist in the context map title: value of title comments: [ list of comments to add ] Retrieve: id: valid ticket id all title, status, comments do not exist in the map Update: id: valid ticket id status: new ticket status (allows closing) title: new title comments: new comment to add If none of the context params passed then this execution is invalid and returns a failure.- Returns:
-
-