1
2
3
4
5
6
7
8
9
10
11 package org.astrogrid.applications.description.base;
12
13 import org.astrogrid.applications.description.BaseApplicationDescriptionLibrary;
14 import org.astrogrid.applications.manager.idgen.IdGen;
15 import org.astrogrid.applications.parameter.protocol.ProtocolLibrary;
16 import org.astrogrid.component.descriptor.ComponentDescriptor;
17
18 import junit.framework.Test;
19
20 /*** A container for some components generally used within {@link org.astrogrid.applications.description.ApplicationDescription} implementations.
21 * <p>
22 * The components are bundled into this container to make it simpler to add further ones later
23 * <p />
24 * At present, this class containts a unique-id-generator, and library of indirection handlers.
25 * @todo could add hash map, so providers can stuff their own things in here? -becomes a kind of context object. unsure whether this is a good idea - extension may be better.
26 * @author Noel Winstanley nw@jb.man.ac.uk 16-Jun-2004
27 *
28 */
29 public class ApplicationDescriptionEnvironment implements ComponentDescriptor {
30 /*** Construct a new ApplicationDescriptionEnvironment
31 *
32 */
33 public ApplicationDescriptionEnvironment(IdGen id,ProtocolLibrary lib, BaseApplicationDescriptionLibrary.AppAuthorityIDResolver appAuthorityIDResolver) {
34 super();
35 this.id =id;
36 this.lib = lib;
37 this.authIDresolver = appAuthorityIDResolver;
38 }
39 protected final IdGen id;
40 protected final ProtocolLibrary lib;
41 protected final BaseApplicationDescriptionLibrary.AppAuthorityIDResolver authIDresolver;
42
43
44 /***Access the unique id generator
45 * @return the IdGen for this server
46 * @see org.astrogrid.applications.manager.idgen
47 */
48 public IdGen getIdGen() {
49 return this.id;
50 }
51
52 /*** Access the library of protcols that paramters can be indirected through
53 * @return the protocol library.
54 * @see org.astrogrid.applications.param.indirect
55 */
56 public ProtocolLibrary getProtocolLib() {
57 return this.lib;
58 }
59
60 /***Access the resolver that will return the appropriate authorityID that applications can be registered under.
61 * @return the resolver
62 */
63 public BaseApplicationDescriptionLibrary.AppAuthorityIDResolver getAuthIDResolver()
64 {
65 return this.authIDresolver;
66 }
67
68 /***
69 * @see org.astrogrid.component.descriptor.ComponentDescriptor#getName()
70 */
71 public String getName() {
72 return "ApplicationDescriptionEnvironment";
73 }
74
75 /***
76 * @see org.astrogrid.component.descriptor.ComponentDescriptor#getDescription()
77 */
78 public String getDescription() {
79 return "Container for components used by applications";
80 }
81
82 /***
83 * @see org.astrogrid.component.descriptor.ComponentDescriptor#getInstallationTest()
84 */
85 public Test getInstallationTest() {
86 return null;
87 }
88
89
90
91 }
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120