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

com.innovenso.townplan.dsl.concepts.actor.ActorConfigurer.groovy Maven / Gradle / Ivy

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

import com.innovenso.townplan.api.command.AddActorCommand
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.NotBlank
import lombok.NonNull

class ActorConfigurer extends AbstractConceptConfigurer implements HasFlowRelationships, HasMemberRelationships, HasRaciRelationships, HasInfluenceRelationships, HasDeliveryRelationships, HasStakeholderRelationships, HasDocumentation, HasExternalId, HasSwot, HasRequiredEnterpriseKey {
	@NotBlank
	String type

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

	def apply(@NonNull TownPlanImpl townPlan) {
		townPlan.execute(AddActorCommand.builder()
				.key(key)
				.title(title)
				.type(type)
				.description(description)
				.enterprise(enterprise)
				.build())
	}

	def type(String type) {
		this.type = type
	}

	@Override
	String conceptType() {
		return "Actor"
	}

	@Override
	List dependsOnKeys() {
		return [enterprise]
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy