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

com.innovenso.townplan.dsl.concepts.technology.TechnologyConfigurer.groovy Maven / Gradle / Ivy

There is a newer version: 2.1.0
Show newest version
package com.innovenso.townplan.dsl.concepts.technology

import com.innovenso.townplan.api.command.AddTechnologyCommand
import com.innovenso.townplan.api.value.enums.TechnologyType
import com.innovenso.townplan.domain.TownPlanImpl
import com.innovenso.townplan.dsl.TownPlanConfigurer
import com.innovenso.townplan.dsl.concepts.AbstractConceptConfigurer
import com.innovenso.townplan.dsl.traits.*
import jakarta.validation.constraints.NotNull
import lombok.NonNull

class TechnologyConfigurer extends AbstractConceptConfigurer implements HasDocumentation, HasExternalId, HasLifecycle, HasArchitectureVerdict, HasSwot, HasSecurity {
	@NotNull
	TechnologyType type
	String recommendation

	TechnologyConfigurer(@NonNull TownPlanConfigurer townPlanConfigurer) {
		super(townPlanConfigurer)
	}

	def apply(@NonNull TownPlanImpl townPlan) {
		townPlan.execute(AddTechnologyCommand.builder()
				.key(key)
				.title(title)
				.description(description)
				.type(type.label)
				.technologyType(type)
				.recommendation(recommendation)
				.build())
	}

	@Override
	String conceptType() {
		return "IT Technology"
	}

	void type(TechnologyType type) {
		this.type = type
	}

	void recommendation(String recommendation) {
		this.recommendation = recommendation
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy