View Javadoc

1   package org.minetti.astrodevice.client.business.process;
2   
3   import java.util.ArrayList;
4   import java.util.List;
5   import org.minetti.astrodevice.common.object.Entity;
6   
7   /**
8    * Process on telescopes.
9    * @author Jean-Philippe MINETTI
10   */
11  public final class TelescopeProcess
12  {
13  
14     public class EntityImpl
15              implements Entity
16     {
17  
18        private final long id;
19  
20        private final String name;
21  
22        protected EntityImpl (final long id, final String name)
23        {
24           super ();
25           this.id = id;
26           this.name = name;
27        }
28  
29        @Override
30        public long getId ()
31        {
32           return this.id;
33        }
34  
35        @Override
36        public String getName ()
37        {
38           return this.name;
39        }
40  
41     }
42  
43     /**
44      * Selected telescope.
45      */
46     private Entity selectedTelescope = null;
47  
48     /**
49      * Returns connected telescopes as entity list.
50      * @return Connected telescopes as entity list.
51      */
52     public List<Entity> getTelescopeList ()
53     {
54  
55        // TODO
56        final List<Entity> entityList = new ArrayList<Entity> ();
57        entityList.add (new EntityImpl (1, "Télescope 200/1000"));
58        entityList.add (new EntityImpl (2, "Lunette Ha"));
59        return entityList;
60  
61     }
62  
63     /**
64      * Returns the selected telescope.
65      * @return Selected telescope.
66      */
67     public Entity getSelectedTelescope ()
68     {
69        return this.selectedTelescope;
70     }
71  
72     /**
73      * Changes the selected telescope.
74      * @param selectedTelescope Selected telescope.
75      */
76     public void setSelectedTelescope (final Entity selectedTelescope)
77     {
78        this.selectedTelescope = selectedTelescope;
79     }
80  
81  
82  
83  
84  
85  }