]> gerrit.simantics Code Review - simantics/platform.git/blob - bundles/org.simantics.export.core/src/org/simantics/export/core/manager/ExportPlan.java
Migrated source code from Simantics SVN
[simantics/platform.git] / bundles / org.simantics.export.core / src / org / simantics / export / core / manager / ExportPlan.java
1 package org.simantics.export.core.manager;\r
2 \r
3 import java.util.ArrayList;\r
4 import java.util.List;\r
5 \r
6 import org.simantics.export.core.ExportContext;\r
7 \r
8 public class ExportPlan {\r
9 \r
10         public String label = "Export action";\r
11         \r
12         /** A list of actions */\r
13         List<ExportAction> actions = new ArrayList<ExportAction>();\r
14         \r
15         /** Expected outcome */\r
16         List<Content> manifest = new ArrayList<Content>(); \r
17         \r
18         public void addAction(ExportAction action) {\r
19                 actions.add( action );\r
20         }\r
21         \r
22         public void addToManifest(Content content) {\r
23                 manifest.add( content );\r
24         }\r
25         \r
26         public int totalWork(ExportContext ctx) {\r
27                 int total = 0;\r
28                 for (ExportAction action : actions)\r
29                         total += action.work(ctx);\r
30                 return total;\r
31         }\r
32         \r
33         public List<Content> getManifest() {\r
34                 return manifest;\r
35         }\r
36 \r
37 }\r