1 | package test.rewolucja.scheduling.plan; |
---|
2 | |
---|
3 | import java.util.ArrayList; |
---|
4 | |
---|
5 | import schedframe.scheduling.plan.AllocationInterface; |
---|
6 | import schedframe.scheduling.plan.impl.ScheduledTask; |
---|
7 | import test.rewolucja.GSSIMJobInterface; |
---|
8 | |
---|
9 | public class ScheduledTaskNew extends ScheduledTask implements ScheduledTaskInterfaceNew{ |
---|
10 | |
---|
11 | |
---|
12 | protected GSSIMJobInterface<?> task; |
---|
13 | protected ArrayList<AllocationInterfaceNew> allocationList; |
---|
14 | |
---|
15 | public ScheduledTaskNew(){ |
---|
16 | super(); |
---|
17 | allocationList = new ArrayList<AllocationInterfaceNew>(); |
---|
18 | } |
---|
19 | |
---|
20 | public ScheduledTaskNew(org.qcg.broker.schemas.schedulingplan.Task value){ |
---|
21 | super(value); |
---|
22 | allocationList = new ArrayList<AllocationInterfaceNew>(); |
---|
23 | } |
---|
24 | |
---|
25 | public ScheduledTaskNew(GSSIMJobInterface<?> task){ |
---|
26 | super(); |
---|
27 | this.task = task; |
---|
28 | allocationList = new ArrayList<AllocationInterfaceNew>(); |
---|
29 | } |
---|
30 | |
---|
31 | |
---|
32 | |
---|
33 | public <Allocation_> void addAllocation( |
---|
34 | AllocationInterface<Allocation_> allocation) |
---|
35 | throws IndexOutOfBoundsException { |
---|
36 | super.addAllocation(allocation); |
---|
37 | allocationList.add( (AllocationNew)allocation); |
---|
38 | } |
---|
39 | |
---|
40 | public <Allocation_> void addAllocation(int index, AllocationInterface<Allocation_> allocation) |
---|
41 | throws IndexOutOfBoundsException { |
---|
42 | super.addAllocation(index, allocation); |
---|
43 | allocationList.add(index, (AllocationNew)allocation); |
---|
44 | } |
---|
45 | |
---|
46 | |
---|
47 | |
---|
48 | public ArrayList<AllocationInterfaceNew> getAllocations() { |
---|
49 | return this.allocationList; |
---|
50 | } |
---|
51 | |
---|
52 | |
---|
53 | |
---|
54 | public <Allocation_> void setAllocation(int index, |
---|
55 | AllocationInterface<Allocation_> allocation) |
---|
56 | throws IndexOutOfBoundsException { |
---|
57 | super.setAllocation(index, allocation); |
---|
58 | allocationList.set(index, (AllocationNew)allocation); |
---|
59 | } |
---|
60 | |
---|
61 | |
---|
62 | public GSSIMJobInterface<?> getTask(){ |
---|
63 | return this.task; |
---|
64 | } |
---|
65 | |
---|
66 | } |
---|
67 | |
---|