RepairStatus.kt 691 Bytes
Newer Older
1
package org.chronopolis.rest.models.enums
Michael Ritter's avatar
Michael Ritter committed
2

3 4
import com.google.common.collect.ImmutableListMultimap

Michael Ritter's avatar
Michael Ritter committed
5 6 7 8
enum class RepairStatus {
    REQUESTED, STAGING, READY, TRANSFERRED, REPAIRED, FAILED;

    companion object {
9 10 11 12 13 14 15 16 17
        fun statusByGroup(): ImmutableListMultimap<String, RepairStatus> =
                ImmutableListMultimap.Builder<String, RepairStatus>()
                        .put("Pending", REQUESTED)
                        .put("Active", STAGING)
                        .put("Active", READY)
                        .put("Active", TRANSFERRED)
                        .put("Success", REPAIRED)
                        .put("Failure", FAILED)
                        .build()
Michael Ritter's avatar
Michael Ritter committed
18 19
    }
}