org.joinedworkz.common.DiagramCartridge.xtend Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of common-base Show documentation
Show all versions of common-base Show documentation
DSL based modeling framework - facilities common base
package org.joinedworkz.common
import java.util.Properties
import javax.inject.Inject
import org.joinedworkz.common.generator.CmnDiagramGenerator
import org.joinedworkz.common.helper.ScenarioHelper
import org.joinedworkz.core.facility.AbstractCartridge
import org.joinedworkz.core.facility.Outlet
import org.joinedworkz.core.facility.Outlets
import org.joinedworkz.core.model.CmnModel
import org.joinedworkz.core.model.CmnObject
class DiagramCartridge extends AbstractCartridge {
@Inject
protected ScenarioHelper scenarioHelper
@Inject
protected CmnDiagramGenerator diagramGenerator
override apply(CmnObject cmnObj, Outlets outlets) {
apply(cmnObj, outlets, null)
}
override void apply(CmnObject obj, Outlets outlets, Properties properties) {
val diagramOutlet = outlets.get("generatedDiagram")
if (obj instanceof CmnModel) {
obj.generateDiagram(diagramOutlet, properties)
}
}
def void generateDiagram(CmnModel model, Outlet diagramOutlet, Properties properties) {
diagramGenerator.generateDiagram(model, diagramOutlet, properties)
// new CmnDiagramGenerator(model,diagramOutlet, scenarioHelper, cmnModelHelper);
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy