JAL-3878 Add jpred operation and worker to the services.
[jalview.git] / src / jalview / ws2 / operations / AlignmentOperation.java
1 package jalview.ws2.operations;
2
3 import java.io.IOException;
4
5 import jalview.datamodel.AlignmentI;
6 import jalview.ws2.WSJob;
7 import jalview.ws2.WebServiceI;
8 import jalview.ws2.gui.AlignmentMenuBuilder;
9 import jalview.ws2.gui.MenuEntryProviderI;
10
11 public class AlignmentOperation extends AbstractOperation
12 {
13   public static interface AlignmentResultSupplier {
14     public AlignmentI getAlignment(WSJob job) throws IOException;
15   }
16   
17   private AlignmentResultSupplier alignmentSupplier;
18
19   public AlignmentOperation(WebServiceI service, AlignmentResultSupplier alignmentSupplier)
20   {
21     super(service, "Alignment");
22     this.alignmentSupplier = alignmentSupplier;
23   }
24
25   @Override
26   public MenuEntryProviderI getMenuBuilder()
27   {
28     return new AlignmentMenuBuilder(this);
29   }
30   
31   public AlignmentResultSupplier getAlignmentSupplier()
32   {
33     return alignmentSupplier;
34   }
35 }