-
-
Notifications
You must be signed in to change notification settings - Fork 33
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add Freemarker template to generate CSV with stakeholders
- Loading branch information
Showing
2 changed files
with
20 additions
and
0 deletions.
There are no files selected for viewing
14 changes: 14 additions & 0 deletions
14
org.contextmapper.dsl.ui/samples/freemarker/csv-files/stakeholders.csv.ftl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
Context,Stakeholder Group,Stakeholder,description,influence,interest | ||
<#list stakeholders as stakeholderContainer> | ||
<#assign stakeholderGroups = stakeholderContainer.stakeholders?filter(s -> instanceOf(s, StakeholderGroup))> | ||
<#assign singleStakeholders = stakeholderContainer.stakeholders?filter(s -> instanceOf(s, Stakeholder))> | ||
<#if stakeholderContainer.contexts?has_content><#assign contextDescription = stakeholderContainer.contexts?map(c -> c.name)?join("; ")><#else><#assign contextDescription = ""></#if> | ||
<#list stakeholderGroups as sg> | ||
<#list sg.stakeholders as stakeholder> | ||
${contextDescription},${sg.name},${stakeholder.name},${stakeholder.description!""},${stakeholder.influence!""},${stakeholder.interest!""} | ||
</#list> | ||
</#list> | ||
<#list singleStakeholders as stakeholder> | ||
${contextDescription},,${stakeholder.name},${stakeholder.description!""},${stakeholder.influence!""},${stakeholder.interest!""} | ||
</#list> | ||
</#list> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters