Skip to content

Commit

Permalink
feat(backend): Mark some DTO converter methods as private
Browse files Browse the repository at this point in the history
  • Loading branch information
zhe-zhao committed May 11, 2021
1 parent 7a10474 commit ae391df
Showing 1 changed file with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ data class BuildDetailDTO(
) {
private var logger = LoggerFactory.getLogger(this.javaClass.name)

fun getBuildExecutionStatus(): Status {
private fun getBuildExecutionStatus(): Status {
return if (stages.stage.any { it.state == "Unknown" }) Status.IN_PROGRESS else
when (this.buildState) {
"Successful" -> {
Expand All @@ -48,7 +48,7 @@ data class BuildDetailDTO(
}
}

fun getBuildStartedTimestamp(): Long? {
private fun getBuildStartedTimestamp(): Long? {
return when {
buildStartedTime != null -> TimeFormatUtil.mapDateToTimeStamp(buildStartedTime!!)
buildCompletedTime != null -> TimeFormatUtil.mapDateToTimeStamp(buildCompletedTime!!)
Expand Down Expand Up @@ -93,11 +93,11 @@ data class Stage(val stage: List<StageDTO>)
data class StageDTO(
val name: String,
val state: String?,
val results: StageResult
val results: StageResults
) {
private var logger = LoggerFactory.getLogger(this.javaClass.name)

fun getStageExecutionStatus(): Status {
private fun getStageExecutionStatus(): Status {
return when (this.state) {
"Successful" -> {
Status.SUCCESS
Expand Down Expand Up @@ -143,9 +143,9 @@ data class StageDTO(
}
}

data class StageResult(val result: List<StageDetailResult>)
data class StageResults(val result: List<StageResultDetail>)

data class StageDetailResult(
data class StageResultDetail(
val buildStartedTime: ZonedDateTime?,
var buildCompletedTime: ZonedDateTime?,
var buildDuration: Long?
Expand Down

0 comments on commit ae391df

Please sign in to comment.