KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > sape > carbon > services > security > management > rdbms > RdbmsUserManagerConfiguration


1 /*
2  * The contents of this file are subject to the Sapient Public License
3  * Version 1.0 (the "License"); you may not use this file except in compliance
4  * with the License. You may obtain a copy of the License at
5  * http://carbon.sf.net/License.html.
6  *
7  * Software distributed under the License is distributed on an "AS IS" basis,
8  * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for
9  * the specific language governing rights and limitations under the License.
10  *
11  * The Original Code is The Carbon Component Framework.
12  *
13  * The Initial Developer of the Original Code is Sapient Corporation
14  *
15  * Copyright (C) 2003 Sapient Corporation. All Rights Reserved.
16  */

17
18 package org.sape.carbon.services.security.management.rdbms;
19
20 import org.sape.carbon.core.component.ComponentConfiguration;
21 import org.sape.carbon.services.sql.StatementFactory;
22 import org.sape.carbon.services.sql.connection.ConnectionFactory;
23
24 /**
25  * Configuration interface for the RdbmsImplementation of the User Manager
26  * Service.
27  *
28  * <P>
29  * The configuration contains a list names for the various queries to be
30  * executed by the RDBMS server as well as a reference to a connection
31  * factory and statement factory the service can use to query
32  * information.
33  * </p>
34  *
35  * @author $Author: dvoet $ $Date: 2003/10/28 19:02:01 $
36  * @version $Revision: 1.8 $
37  *
38  * @stereotype interface
39  * @since carbon 1.2
40  */

41 public interface RdbmsUserManagerConfiguration
42     extends ComponentConfiguration {
43     /** Default - retreiveUserQuery. */
44     String JavaDoc RetreiveUserQueryName = "retreiveUserQuery";
45
46     /** Default - retreiveUserQuery. */
47     String JavaDoc AuthenticateUserQueryName = "authenticateUserQuery";
48
49     /** Default - retreiveGroupQuery. */
50     String JavaDoc RetreiveGroupQueryName = "retreiveGroupQuery";
51
52     /** Default - retreiveGroupsForUserQuery. */
53     String JavaDoc RetreiveGroupsForUserQueryName = "retreiveGroupsForUserQuery";
54
55     /** Default - retreiveGroupsForGroupsQuery. */
56     String JavaDoc RetreiveGroupsForGroupsQueryName =
57         "retreiveGroupsForGroupsQuery";
58
59     /** Default - createUserQuery. */
60     String JavaDoc CreateUserQueryName = "createUserQuery";
61
62     /** Default - removeUserQuery. */
63     String JavaDoc RemoveUserQueryName = "removeUserQuery";
64
65     /** Default - updateCredentialQuery. */
66     String JavaDoc UpdateCredentialQueryName = "updateCredentialQuery";
67
68     /** Default - createGroupQuery. */
69     String JavaDoc CreateGroupQueryName = "createGroupQuery";
70
71     /** Default - removeGroupQuery. */
72     String JavaDoc RemoveGroupQueryName = "removeGroupQuery";
73
74     /** Default - addPrincipalToGroupQuery. */
75     String JavaDoc AddPrincipalToGroupQueryName = "addPrincipalToGroupQuery";
76
77     /** Default - removePrincipalFromGroupQuery. */
78     String JavaDoc RemovePrincipalFromGroupQueryName =
79         "removePrincipalFromGroupQuery";
80
81     /** Default - retreiveMemebersQuery. */
82     String JavaDoc RetreiveMemebersQueryName = "retreiveMemebersQuery";
83
84     /** Default - removeAllRelationshipsQuery */
85     String JavaDoc RemoveAllRelationshipsQueryName = "removeAllRelationshipsQuery";
86
87     /** Default - retreiveAllUsersQuery. */
88     String JavaDoc RetreiveAllUsersQuery = "retreiveAllUsersQuery";
89
90     /** Default - retreiveAllGroupsQuery. */
91     String JavaDoc RetreiveAllGroupsQuery = "retreiveAllGroupsQuery";
92
93     /** Default - createCredentialQuery. */
94     String JavaDoc CreateCredentialQueryName = "createCredentialQuery";
95
96     /** Default - retreiveUserPrimaryKeyQuery. */
97     String JavaDoc RetreiveUserPrimaryKeyQueryName = "retreiveUserPrimaryKeyQuery";
98
99     /** Default - retreiveGroupPrimaryKeyQuery. */
100     String JavaDoc RetreiveGroupPrimaryKeyQueryName =
101         "retreiveGroupPrimaryKeyQuery";
102
103     /** Default - removeCredentialQuery. */
104     String JavaDoc RemoveCredentialQueryName = "removeCredentialQuery";
105     
106     String JavaDoc[] CreateUserBindParameters = new String JavaDoc[] { "Credentials" };
107
108     /**
109      * Returns the ConnectionFactory used to execute queries against. This
110      * is needed for executing transactions against the connection and
111      * allows for a great optimization of the queries.
112      *
113      * @return connection factory for this manager
114      */

115     ConnectionFactory getConnectionFactory();
116
117     /**
118      * Returns the StatementFactory used to execute queries against the
119      * database for the management of a user store.
120      *
121      * @return statement factory with all the statements
122      */

123     StatementFactory getStatementFactory();
124
125     /**
126      * (Optional) Returns the name of the query to execute to find a user.
127      *
128      * <p>
129      * The bind parameters on the query are:
130      * </p>
131      *
132      * <ol>
133      * <li>
134      * The userName parameter
135      * </li>
136      * </ol>
137      *
138      *
139      * @return name of the query
140      */

141     String JavaDoc getRetreiveUserQueryName();
142
143     /**
144      * (Optional) Returns the name of the query to execute to authenticate
145      * a user.
146      *
147      * <p>
148      * The bind parameters on the query are:
149      * </p>
150      *
151      * <ol>
152      * <li>
153      * The userName parameter
154      * </li>
155      * <li>
156      * The credential parameter
157      * </li>
158      * </ol>
159      *
160      *
161      * @return name of the query
162      */

163     String JavaDoc getAuthenticateUserQueryName();
164
165     /**
166      * (Optional) Returns the name of the query to execute to find a
167      * group.
168      *
169      * <p>
170      * The bind parameters on the query are:
171      * </p>
172      *
173      * <ol>
174      * <li>
175      * The groupName parameter
176      * </li>
177      * </ol>
178      *
179      *
180      * @return name of the query
181      */

182     String JavaDoc getRetreiveGroupQueryName();
183
184     /**
185      * (Optional) Returns the name of the query to execute to find a
186      * group.
187      *
188      * <p>
189      * The bind parameters on the query are:
190      * </p>
191      *
192      * <ol>
193      * <li>
194      * The username parameter
195      * </li>
196      * </ol>
197      *
198      *
199      * @return name of the query
200      */

201     String JavaDoc getRetreiveGroupsForUserQueryName();
202
203     /**
204      * (Optional) Returns the name of the query to execute to find a
205      * group.
206      *
207      * <p>
208      * The bind parameters on the query are:
209      * </p>
210      *
211      * <ol>
212      * <li>
213      * The groupname parameter
214      * </li>
215      * </ol>
216      *
217      *
218      * @return name of the query
219      */

220     String JavaDoc getRetreiveGroupsForGroupsQueryName();
221
222     /**
223      * (Optional) Returns the name of the query to execute to add a user.
224      *
225      * <p>
226      * The bind parameters on the query are:
227      * </p>
228      *
229      * <ol>
230      * <li>
231      * The userName parameter
232      * </li>
233      * </ol>
234      *
235      *
236      * @return name of the query
237      */

238     String JavaDoc getCreateUserQueryName();
239
240     /**
241      * (Optional) Returns the name of the query to execute to remove a
242      * user.
243      *
244      * <p>
245      * The bind parameters on the query are:
246      * </p>
247      *
248      * <ol>
249      * <li>
250      * The primary key for the user parameter
251      * </li>
252      * </ol>
253      *
254      *
255      * @return name of the query
256      */

257     String JavaDoc getRemoveUserQueryName();
258
259     /**
260      * (Optional) Returns the name of the query to execute to update a
261      * user's credential.
262      *
263      * <p>
264      * The bind parameters on the query are:
265      * </p>
266      *
267      * <ol>
268      * <li>
269      * The credential parameter
270      * </li>
271      * <li>
272      * The primary key of the user
273      * </li>
274      * </ol>
275      *
276      *
277      * @return name of the query
278      */

279     String JavaDoc getUpdateCredentialQueryName();
280
281     /**
282      * (Optional) Returns the name of the query to execute to add a group.
283      *
284      * <p>
285      * The bind parameters on the query are:
286      * </p>
287      *
288      * <ol>
289      * <li>
290      * The groupName parameter
291      * </li>
292      * </ol>
293      *
294      *
295      * @return name of the query
296      */

297     String JavaDoc getCreateGroupQueryName();
298
299     /**
300      * (Optional) Returns the name of the query to execute to remove a
301      * group.
302      *
303      * <p>
304      * The bind parameters on the query are:
305      * </p>
306      *
307      * <ol>
308      * <li>
309      * The primary key for the group
310      * </li>
311      * </ol>
312      *
313      *
314      * @return name of the query
315      */

316     String JavaDoc getRemoveGroupQueryName();
317
318     /**
319      * (Optional) Returns the name of the query to execute to add a user
320      * to a group.
321      *
322      * <p>
323      * The bind parameters on the query are:
324      * </p>
325      *
326      * <ol>
327      * <li>
328      * The primary key of the principal
329      * </li>
330      * <li>
331      * The primary key of the group
332      * </li>
333      * </ol>
334      *
335      *
336      * @return name of the query
337      */

338     String JavaDoc getAddPrincipalToGroupQueryName();
339
340     /**
341      * (Optional) Returns the name of the query to execute to retreive the
342      * members of a group.
343      *
344      * <p>
345      * The bind parameters on the query are:
346      * </p>
347      *
348      * <ol>
349      * <li>
350      * The group name parameter
351      * </li>
352      * </ol>
353      *
354      *
355      * @return name of the query
356      */

357     String JavaDoc getRetreiveMemebersQueryName();
358
359     /**
360      * (Optional) Returns the name of the query to execute to remove a
361      * user from a group.
362      *
363      * <p>
364      * The bind parameters on the query are:
365      * </p>
366      *
367      * <ol>
368      * <li>
369      * The primary key of the principal
370      * </li>
371      * <li>
372      * The primary key of the group
373      * </li>
374      * </ol>
375      *
376      *
377      * @return name of the query
378      */

379     String JavaDoc getRemovePrincipalFromGroupQueryName();
380
381     /**
382      * (Optional) Returns the name of the query to execute to remove all
383      * relationships a principal participates in.
384      *
385      * <p>
386      * The bind parameters on the query are:
387      * </p>
388      *
389      * <ol>
390      * <li>
391      * The primary key of the principal
392      * </li>
393      * <li>
394      * The primary key of the principal
395      * </li>
396      * </ol>
397      *
398      *
399      * @return name of the query
400      */

401     String JavaDoc getRemoveAllRelationshipsQueryName();
402
403     /**
404      * (Optional) Returns the name of the query to execute to retreive all
405      * users from the database.
406      *
407      * <p>
408      * There are no bind parameters for this query:
409      * </p>
410      *
411      * @return name of the query
412      */

413     String JavaDoc getRetreiveAllUsersQuery();
414
415     /**
416      * (Optional) Returns the name of the query to execute to retreive all
417      * groups from the database.
418      *
419      * <p>
420      * There are no bind parameters for this query:
421      * </p>
422      *
423      * @return name of the query
424      */

425     String JavaDoc getRetreiveAllGroupsQuery();
426
427     /**
428      * (Optional) Returns the name of the query to execute to create a
429      * credential for a user.
430      *
431      * <p>
432      * The bind parameters on the query are:
433      * </p>
434      *
435      * <ol>
436      * <li>
437      * The primary key of the principal
438      * </li>
439      * <li>
440      * The credential
441      * </li>
442      * </ol>
443      *
444      *
445      * @return name of the query
446      */

447     String JavaDoc getCreateCredentialQueryName();
448
449     /**
450      * (Optional) Returns the name of the query to execute to get back a
451      * user's primary key
452      *
453      * <p>
454      * The bind parameters on the query are:
455      * </p>
456      *
457      * <ol>
458      * <li>
459      * The name of principal to get the surrogate key for
460      * </li>
461      * </ol>
462      *
463      *
464      * @return name of the query
465      */

466     String JavaDoc getRetreiveUserPrimaryKeyQueryName();
467
468     /**
469      * (Optional) Returns the name of the query to execute to get back a
470      * group's primary key
471      *
472      * <p>
473      * The bind parameters on the query are:
474      * </p>
475      *
476      * <ol>
477      * <li>
478      * The name of group to get the surrogate key for
479      * </li>
480      * </ol>
481      *
482      *
483      * @return name of the query
484      */

485     String JavaDoc getRetreiveGroupPrimaryKeyQueryName();
486
487     /**
488      * (Optional) Returns the name of the query to execute to remove a
489      * users credential information.
490      *
491      * <p>
492      * The bind parameters on the query are:
493      * </p>
494      *
495      * <ol>
496      * <li>
497      * The primary key of the user to remove the credential from
498      * </li>
499      * </ol>
500      *
501      *
502      * @return name of the query
503      */

504     String JavaDoc getRemoveCredentialQueryName();
505     
506     String JavaDoc[] getCreateUserBindParameters();
507     
508     
509 }
510
Popular Tags