@Component
class JiraDataService(@Qualifier(value = "graphglueNeo4jOperations") val neoOperations: ReactiveNeo4jOperations, val tokenManager: JiraTokenManager, val helper: JsonHelper, val objectMapper: ObjectMapper, val jsonNodeMapper: JsonNodeMapper, val gropiusUserRepository: GropiusUserRepository, val issueDataRepository: IssueDataRepository) : SyncDataService

Context for Jira Operations

Parameters

neoOperations

Neo4jOperations to access the database

tokenManager

Reference for the spring instance of JiraTokenManager

helper

Reference for the spring instance of JsonHelper

objectMapper

Reference for the spring instance of ObjectMapper

jsonNodeMapper

Reference for the spring instance of JsonNodeMapper

gropiusUserRepository

Reference for the spring instance of GropiusUserRepository

issueDataRepository

Reference for the spring instance of IssueDataRepository

Constructors

Link copied to clipboard
constructor(@Qualifier(value = "graphglueNeo4jOperations") neoOperations: ReactiveNeo4jOperations, tokenManager: JiraTokenManager, helper: JsonHelper, objectMapper: ObjectMapper, jsonNodeMapper: JsonNodeMapper, gropiusUserRepository: GropiusUserRepository, issueDataRepository: IssueDataRepository)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
val client: HttpClient

Http Client for Jira API requests

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val logger: Logger?

Logger used to print notifications

Link copied to clipboard
val neoOperations: ReactiveNeo4jOperations
Link copied to clipboard
val objectMapper: ObjectMapper
Link copied to clipboard

Functions

Link copied to clipboard
suspend fun collectRequestUsers(imsProject: IMSProject, users: List<User>): List<User>

Collect list of users to request with using

Link copied to clipboard
private suspend fun generateNullUser(imsProject: IMSProject, name: String, displayName: String): IMSUser

Generate a new IMSUser to be a placeholder in erroneous situations

Link copied to clipboard
suspend fun issueState(imsProject: IMSProject, issue: Issue?, isOpen: Boolean): IssueState

Get the default issue state

suspend fun issueState(imsProject: IMSProject, issue: Issue?, name: String): IssueState?

Get the named issue state

Link copied to clipboard
suspend fun issueTemplate(imsProject: IMSProject): IssueTemplate

Find and ensure the IMSTemplate in the database

Link copied to clipboard
suspend fun issueType(imsProject: IMSProject, name: String): IssueType

Find and ensure the IMSIssueTemplate in the database

Link copied to clipboard
suspend fun mapLabel(imsProject: IMSProject, label: String): Label

Map a label from Jira to Gropius

Link copied to clipboard
suspend fun mapUser(imsProject: IMSProject, user: JsonElement): User

Get a IMSUser for a Jira user

Link copied to clipboard
inline suspend fun <T> request(imsProject: IMSProject, users: List<User>, requestMethod: HttpMethod, owner: List<GropiusUser>, body: T? = null, crossinline urlBuilder: URLBuilder.(URLBuilder) -> Unit): Pair<IMSUser, HttpResponse>

Process a request for a given set of users

Link copied to clipboard
inline suspend fun <T> sendRequest(imsProject: IMSProject, requestMethod: HttpMethod, body: T? = null, crossinline urlBuilder: URLBuilder.(URLBuilder) -> Unit, token: JiraTokenResponse): Optional<HttpResponse>

Process the request for a single token