1
2
3
4
5
6
7
8
9
10
11 package org.astrogrid.applications.description.base;
12
13 import org.astrogrid.applications.manager.AppAuthorityIDResolver;
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,
34 ProtocolLibrary lib,
35 AppAuthorityIDResolver resolver) {
36 super();
37 this.id =id;
38 this.lib = lib;
39 this.authIDresolver = resolver;
40 }
41 protected final IdGen id;
42 protected final ProtocolLibrary lib;
43 protected final AppAuthorityIDResolver authIDresolver;
44
45
46 /***Access the unique id generator
47 * @return the IdGen for this server
48 * @see org.astrogrid.applications.manager.idgen
49 */
50 public IdGen getIdGen() {
51 return this.id;
52 }
53
54 /*** Access the library of protcols that paramters can be indirected through
55 * @return the protocol library.
56 * @see org.astrogrid.applications.param.indirect
57 */
58 public ProtocolLibrary getProtocolLib() {
59 return this.lib;
60 }
61
62 /***Access the resolver that will return the appropriate authorityID that applications can be registered under.
63 * @return the resolver
64 */
65 public AppAuthorityIDResolver getAuthIDResolver()
66 {
67 return this.authIDresolver;
68 }
69
70 /***
71 * @see org.astrogrid.component.descriptor.ComponentDescriptor#getName()
72 */
73 public String getName() {
74 return "ApplicationDescriptionEnvironment";
75 }
76
77 /***
78 * @see org.astrogrid.component.descriptor.ComponentDescriptor#getDescription()
79 */
80 public String getDescription() {
81 return "Container for components used by applications";
82 }
83
84 /***
85 * @see org.astrogrid.component.descriptor.ComponentDescriptor#getInstallationTest()
86 */
87 public Test getInstallationTest() {
88 return null;
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
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146