Classes in this File | Line Coverage | Branch Coverage | Complexity | ||||
IRegistrationManager |
|
| 1.0;1 |
1 | /** | |
2 | * - Digitalis Internal Framework v2.0 - (C) 2007, Digitalis Informatica. Distribuicao e Gestao de Informatica, Lda. | |
3 | * Estrada de Paco de Arcos num.9 - Piso -1 2780-666 Paco de Arcos Telefone: (351) 21 4408990 Fax: (351) 21 4408999 | |
4 | * http://www.digitalis.pt | |
5 | */ | |
6 | package pt.digitalis.dif.dem.managers; | |
7 | ||
8 | import pt.digitalis.dif.dem.Entity; | |
9 | import pt.digitalis.dif.dem.interfaces.IStage; | |
10 | import pt.digitalis.dif.dem.objects.LicenseEditionType; | |
11 | import pt.digitalis.dif.exception.manager.RegistrationManagerException; | |
12 | ||
13 | /** | |
14 | * This interface manages the DEM entities registration process. | |
15 | * | |
16 | * @author Pedro Viegas <a href="mailto:pviegas@digitalis.pt">pviegas@digitalis.pt</a> | |
17 | * @created Oct 3, 2007 | |
18 | */ | |
19 | public interface IRegistrationManager { | |
20 | ||
21 | /** | |
22 | * Adds a new record to the registry. User registrations will be automatically picked up by the Registry | |
23 | * | |
24 | * @param type | |
25 | * the Entity type | |
26 | * @param entityID | |
27 | * the entity ID | |
28 | * @param name | |
29 | * the name to register to (null if not registered by default) | |
30 | * @param registrable | |
31 | * if the Entity is registrable | |
32 | */ | |
33 | public void addToRegistry(Entity type, String entityID, String name, boolean registrable); | |
34 | ||
35 | /** | |
36 | * Inspects the Application Edition | |
37 | * | |
38 | * @param applicationID | |
39 | * the application ID | |
40 | * @return {@link LicenseEditionType} | |
41 | */ | |
42 | public LicenseEditionType getApplicationEdition(String applicationID); | |
43 | ||
44 | /** | |
45 | * Inspects the Provider Edition | |
46 | * | |
47 | * @param providerID | |
48 | * the provider ID | |
49 | * @return {@link LicenseEditionType} | |
50 | */ | |
51 | public LicenseEditionType getProviderEdition(String providerID); | |
52 | ||
53 | /** | |
54 | * Inspects the Service Edition | |
55 | * | |
56 | * @param serviceID | |
57 | * the service ID | |
58 | * @return {@link LicenseEditionType} | |
59 | */ | |
60 | public LicenseEditionType getServiceEdition(String serviceID); | |
61 | ||
62 | /** | |
63 | * Inspects the Stage Client Name | |
64 | * | |
65 | * @param stageID | |
66 | * the stage ID | |
67 | * @return the stage client name | |
68 | */ | |
69 | public String getStageClientName(IStage stageID); | |
70 | ||
71 | /** | |
72 | * Inspects the Stage Edition | |
73 | * | |
74 | * @param stageID | |
75 | * the stage ID | |
76 | * @return {@link LicenseEditionType} | |
77 | */ | |
78 | public LicenseEditionType getStageEdition(String stageID); | |
79 | ||
80 | /** | |
81 | * Inspects the registration state of a given application | |
82 | * | |
83 | * @param applicationID | |
84 | * the provider ID | |
85 | * @return T if the application is registered, F otherwise | |
86 | */ | |
87 | public boolean isApplicationRegistered(String applicationID); | |
88 | ||
89 | /** | |
90 | * Inspects the registration possibility of a given application | |
91 | * | |
92 | * @param applicationID | |
93 | * the provider ID | |
94 | * @return T if the application is registrable, F otherwise | |
95 | */ | |
96 | public boolean isApplicationRegistrable(String applicationID); | |
97 | ||
98 | /** | |
99 | * Inspects the registration state of a given provider | |
100 | * | |
101 | * @param providerID | |
102 | * the provider ID | |
103 | * @return T if the provider is registered, F otherwise | |
104 | */ | |
105 | public boolean isProviderRegistered(String providerID); | |
106 | ||
107 | /** | |
108 | * Inspects the registration possibility of a given provider | |
109 | * | |
110 | * @param providerID | |
111 | * the provider ID | |
112 | * @return T if the provider is registrable, F otherwise | |
113 | */ | |
114 | public boolean isProviderRegistrable(String providerID); | |
115 | ||
116 | /** | |
117 | * Inspects the registration state of a given service | |
118 | * | |
119 | * @param serviceID | |
120 | * the service ID | |
121 | * @return T if the service is registered, F otherwise | |
122 | */ | |
123 | public boolean isServiceRegistered(String serviceID); | |
124 | ||
125 | /** | |
126 | * Inspects the registration possibility of a given service | |
127 | * | |
128 | * @param serviceID | |
129 | * the service ID | |
130 | * @return T if the service is registrable, F otherwise | |
131 | */ | |
132 | public boolean isServiceRegistrable(String serviceID); | |
133 | ||
134 | /** | |
135 | * Inspects the registration state of a given stage | |
136 | * | |
137 | * @param stageId | |
138 | * the stage ID | |
139 | * @return T if the stage is registered, F otherwise | |
140 | */ | |
141 | public boolean isStageRegistered(String stageId); | |
142 | ||
143 | /** | |
144 | * Inspects the registration possibility of a given stage | |
145 | * | |
146 | * @param stageId | |
147 | * the stage ID | |
148 | * @return T if the stage is registrable, F otherwise | |
149 | */ | |
150 | public boolean isStageRegistrable(String stageId); | |
151 | ||
152 | /** | |
153 | * Registers a given application if it's not already registered. | |
154 | * | |
155 | * @param applicationID | |
156 | * the application ID | |
157 | * @param name | |
158 | * the name to register to | |
159 | * @param key | |
160 | * the key to register | |
161 | * @throws RegistrationManagerException | |
162 | * if a error occurrs in registration manager | |
163 | * @return T if the registration was successful | |
164 | */ | |
165 | public boolean registerApplication(String applicationID, String name, String key) | |
166 | throws RegistrationManagerException; | |
167 | ||
168 | /** | |
169 | * Registers a given provider if it's not already registered. | |
170 | * | |
171 | * @param providerID | |
172 | * the provider ID | |
173 | * @param name | |
174 | * the name to register to | |
175 | * @param key | |
176 | * the key to register | |
177 | * @return T if the registration was successful | |
178 | * @throws RegistrationManagerException | |
179 | * if a error occurrs in registration manager | |
180 | */ | |
181 | public boolean registerProvider(String providerID, String name, String key) throws RegistrationManagerException; | |
182 | ||
183 | /** | |
184 | * Registers a given service if it's not already registered. | |
185 | * | |
186 | * @param serviceID | |
187 | * the service ID | |
188 | * @param name | |
189 | * the name to register to | |
190 | * @param key | |
191 | * the key to register | |
192 | * @throws RegistrationManagerException | |
193 | * if a error occurrs in registration manager | |
194 | * @return T if the registration was successful | |
195 | */ | |
196 | public boolean registerService(String serviceID, String name, String key) throws RegistrationManagerException; | |
197 | ||
198 | /** | |
199 | * Registers a given stage if it's not already registered. | |
200 | * | |
201 | * @param stageId | |
202 | * the stage ID | |
203 | * @param name | |
204 | * the name to register to | |
205 | * @param key | |
206 | * the key to register | |
207 | * @throws RegistrationManagerException | |
208 | * if a error occurrs in registration manager | |
209 | * @return T if the registration was successful | |
210 | */ | |
211 | public boolean registerStage(String stageId, String name, String key) throws RegistrationManagerException; | |
212 | ||
213 | /** | |
214 | * Unregisters a given application if it's registered. | |
215 | * | |
216 | * @param applicationID | |
217 | * the application ID | |
218 | */ | |
219 | public void unregisterApplication(String applicationID); | |
220 | ||
221 | /** | |
222 | * Unregisters a given provider if it's registered. | |
223 | * | |
224 | * @param providerID | |
225 | * the provider ID | |
226 | */ | |
227 | public void unregisterProvider(String providerID); | |
228 | ||
229 | /** | |
230 | * Unregisters a given service if it's registered. | |
231 | * | |
232 | * @param serviceID | |
233 | * the service ID | |
234 | */ | |
235 | public void unregisterService(String serviceID); | |
236 | ||
237 | /** | |
238 | * Unregisters a given stage if it's registered. | |
239 | * | |
240 | * @param stageId | |
241 | * the stage ID | |
242 | */ | |
243 | public void unregisterStage(String stageId); | |
244 | } |