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