View Javadoc

1   package org.minetti.astrodevice.client.business.process;
2   
3   import java.util.ArrayList;
4   import java.util.HashMap;
5   import java.util.List;
6   import java.util.Map;
7   import javax.naming.InitialContext;
8   import org.minetti.astrodevice.client.business.object.NewObservingSite;
9   import org.minetti.astrodevice.common.object.Entity;
10  import org.minetti.astrodevice.common.object.ObservingSite;
11  import org.minetti.astrodevice.common.orb.ObservingSiteDaoOrbProcess;
12  
13  /**
14   * Process on observing sites.
15   * @author Jean-Philippe MINETTI
16   */
17  public final class ObservingSiteProcess
18  {
19  
20     public class EntityImpl
21              implements Entity
22     {
23  
24        private final long id;
25  
26        private final String name;
27  
28        protected EntityImpl (final long id, final String name)
29        {
30           super ();
31           this.id = id;
32           this.name = name;
33        }
34  
35        @Override
36        public long getId ()
37        {
38           return this.id;
39        }
40  
41        @Override
42        public String getName ()
43        {
44           return this.name;
45        }
46  
47     }
48  
49     public List<Entity> find ()
50     {
51        // InitialContext jndi = new InitialContext ();
52        // final ObservingSiteOrbProcess orbProcess = (ObservingSiteOrbProcess) jndi.lookup
53        // ("//localhost/ObservingSiteOrbProcess");
54        // return orbProcess.find ();
55  
56        final List<Entity> entityList = new ArrayList<Entity> ();
57        entityList.add (new EntityImpl (1, "Saint-Jean-de-Védas (terrasse)"));
58        entityList.add (new EntityImpl (2, "Saint-Jean-de-Védas (jardin sud-ouest)"));
59        entityList.add (new EntityImpl (3, "Saint-Jean-de-Védas (jardin ouest)"));
60        entityList.add (new EntityImpl (4, "Toulon"));
61        return entityList;
62     }
63  
64  }