All Downloads are FREE. Search and download functionalities are using the official Maven repository.

pl.touk.nussknacker.ui.config.scenariotoolbar.ToolbarCondition.scala Maven / Gradle / Ivy

There is a newer version: 1.17.0
Show newest version
package pl.touk.nussknacker.ui.config.scenariotoolbar

import pl.touk.nussknacker.ui.config.scenariotoolbar.ToolbarConditionType.ToolbarConditionType

object ToolbarConditionType extends Enumeration {

  type ToolbarConditionType = Value

  val OneOf: Value = Value("oneof")
  val AllOf: Value = Value("allof")

  def isAllOf(`type`: ToolbarConditionType): Boolean =
    `type`.equals(AllOf)
}

final case class ToolbarCondition(
    fragment: Option[Boolean],
    archived: Option[Boolean],
    `type`: Option[ToolbarConditionType]
) {
  def shouldMatchAllOfConditions: Boolean = `type`.exists(ToolbarConditionType.isAllOf)
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy