KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > ldap > server > schema > bootstrap > SystemSyntaxCheckerProducer


1 /*
2  * Copyright 2004 The Apache Software Foundation
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  *
16  */

17 package org.apache.ldap.server.schema.bootstrap;
18
19
20 import org.apache.ldap.common.schema.AcceptAllSyntaxChecker;
21 import org.apache.ldap.common.schema.BinarySyntaxChecker;
22 import org.apache.ldap.common.schema.SyntaxChecker;
23
24 import javax.naming.NamingException JavaDoc;
25
26
27 /**
28  * A producer of SyntaxCheckers for the core schema.
29  *
30  * @todo now we use do nothing checkers for place holder and will add as we go
31  * @author <a HREF="mailto:dev@directory.apache.org">Apache Directory Project</a>
32  * @version $Rev: 169198 $
33  */

34 public class SystemSyntaxCheckerProducer extends AbstractBootstrapProducer
35 {
36     /**
37      * Creates a producer which produces all 58 of the core schema syntax's
38      * SyntaxCheckers.
39      */

40     public SystemSyntaxCheckerProducer()
41     {
42         super( ProducerTypeEnum.SYNTAX_CHECKER_PRODUCER );
43     }
44
45
46     public void produce( BootstrapRegistries registries, ProducerCallback cb )
47             throws NamingException JavaDoc
48     {
49         SyntaxChecker syntaxChecker;
50
51         /*
52          * We are going to need a syntax checker for each and every one of
53          * these syntaxes. However right now we're probably not going to be
54          * turning on syntax checking or are not as interested in it. So we
55          * can put in place simple do nothing syntax checkers - which is really
56          * the binary syntax checker.
57          */

58
59         /*
60          * From RFC 2252 Section 4.3.2. on Syntax Object Identifiers
61          */

62
63         /*
64          * Value being represented H-R OBJECT IDENTIFIER
65          * ==================================================================
66          * 0 ACI Item N 1.3.6.1.4.1.1466.115.121.1.1
67          * 1 Access Point Y 1.3.6.1.4.1.1466.115.121.1.2
68          * 2 Attribute Type Description Y 1.3.6.1.4.1.1466.115.121.1.3
69          * 3 Audio N 1.3.6.1.4.1.1466.115.121.1.4
70          * 4 Binary N 1.3.6.1.4.1.1466.115.121.1.5
71          * 5 Bit String Y 1.3.6.1.4.1.1466.115.121.1.6
72          * 6 Boolean Y 1.3.6.1.4.1.1466.115.121.1.7
73          * 7 Certificate N 1.3.6.1.4.1.1466.115.121.1.8
74          * 8 Certificate List N 1.3.6.1.4.1.1466.115.121.1.9
75          * 9 Certificate Pair N 1.3.6.1.4.1.1466.115.121.1.10
76          */

77         syntaxChecker = new AcceptAllSyntaxChecker( "1.3.6.1.4.1.1466.115.121.1.1" );
78         cb.schemaObjectProduced( this, syntaxChecker.getSyntaxOid(), syntaxChecker );
79
80         syntaxChecker = new AcceptAllSyntaxChecker( "1.3.6.1.4.1.1466.115.121.1.2" );
81         cb.schemaObjectProduced( this, syntaxChecker.getSyntaxOid(), syntaxChecker );
82
83         syntaxChecker = new AcceptAllSyntaxChecker( "1.3.6.1.4.1.1466.115.121.1.3" );
84         cb.schemaObjectProduced( this, syntaxChecker.getSyntaxOid(), syntaxChecker );
85
86         syntaxChecker = new AcceptAllSyntaxChecker( "1.3.6.1.4.1.1466.115.121.1.4" );
87         cb.schemaObjectProduced( this, syntaxChecker.getSyntaxOid(), syntaxChecker );
88
89         syntaxChecker = BinarySyntaxChecker.INSTANCE;
90         cb.schemaObjectProduced( this, syntaxChecker.getSyntaxOid(), syntaxChecker );
91
92         syntaxChecker = new AcceptAllSyntaxChecker( "1.3.6.1.4.1.1466.115.121.1.6" );
93         cb.schemaObjectProduced( this, syntaxChecker.getSyntaxOid(), syntaxChecker );
94
95         syntaxChecker = new AcceptAllSyntaxChecker( "1.3.6.1.4.1.1466.115.121.1.7" );
96         cb.schemaObjectProduced( this, syntaxChecker.getSyntaxOid(), syntaxChecker );
97
98         syntaxChecker = new AcceptAllSyntaxChecker( "1.3.6.1.4.1.1466.115.121.1.8" );
99         cb.schemaObjectProduced( this, syntaxChecker.getSyntaxOid(), syntaxChecker );
100
101         syntaxChecker = new AcceptAllSyntaxChecker( "1.3.6.1.4.1.1466.115.121.1.9" );
102         cb.schemaObjectProduced( this, syntaxChecker.getSyntaxOid(), syntaxChecker );
103
104         syntaxChecker = new AcceptAllSyntaxChecker( "1.3.6.1.4.1.1466.115.121.1.10" );
105         cb.schemaObjectProduced( this, syntaxChecker.getSyntaxOid(), syntaxChecker );
106
107         /*
108          * 10 Country String Y 1.3.6.1.4.1.1466.115.121.1.11
109          * 11 DN Y 1.3.6.1.4.1.1466.115.121.1.12
110          * 12 Data Quality Syntax Y 1.3.6.1.4.1.1466.115.121.1.13
111          * 13 Delivery Method Y 1.3.6.1.4.1.1466.115.121.1.14
112          * 14 Directory String Y 1.3.6.1.4.1.1466.115.121.1.15
113          * 15 DIT Content Rule Description Y 1.3.6.1.4.1.1466.115.121.1.16
114          * 16 DIT Structure Rule Description Y 1.3.6.1.4.1.1466.115.121.1.17
115          * 17 DL Submit Permission Y 1.3.6.1.4.1.1466.115.121.1.18
116          * 18 DSA Quality Syntax Y 1.3.6.1.4.1.1466.115.121.1.19
117          * 19 DSE Type Y 1.3.6.1.4.1.1466.115.121.1.20
118          */

119         syntaxChecker = new AcceptAllSyntaxChecker( "1.3.6.1.4.1.1466.115.121.1.11" );
120         cb.schemaObjectProduced( this, syntaxChecker.getSyntaxOid(), syntaxChecker );
121
122         syntaxChecker = new AcceptAllSyntaxChecker( "1.3.6.1.4.1.1466.115.121.1.12" );
123         cb.schemaObjectProduced( this, syntaxChecker.getSyntaxOid(), syntaxChecker );
124
125         syntaxChecker = new AcceptAllSyntaxChecker( "1.3.6.1.4.1.1466.115.121.1.13" );
126         cb.schemaObjectProduced( this, syntaxChecker.getSyntaxOid(), syntaxChecker );
127
128         syntaxChecker = new AcceptAllSyntaxChecker( "1.3.6.1.4.1.1466.115.121.1.14" );
129         cb.schemaObjectProduced( this, syntaxChecker.getSyntaxOid(), syntaxChecker );
130
131         syntaxChecker = new AcceptAllSyntaxChecker( "1.3.6.1.4.1.1466.115.121.1.15" );
132         cb.schemaObjectProduced( this, syntaxChecker.getSyntaxOid(), syntaxChecker );
133
134         syntaxChecker = new AcceptAllSyntaxChecker( "1.3.6.1.4.1.1466.115.121.1.16" );
135         cb.schemaObjectProduced( this, syntaxChecker.getSyntaxOid(), syntaxChecker );
136
137         syntaxChecker = new AcceptAllSyntaxChecker( "1.3.6.1.4.1.1466.115.121.1.17" );
138         cb.schemaObjectProduced( this, syntaxChecker.getSyntaxOid(), syntaxChecker );
139
140         syntaxChecker = new AcceptAllSyntaxChecker( "1.3.6.1.4.1.1466.115.121.1.18" );
141         cb.schemaObjectProduced( this, syntaxChecker.getSyntaxOid(), syntaxChecker );
142
143         syntaxChecker = new AcceptAllSyntaxChecker( "1.3.6.1.4.1.1466.115.121.1.19" );
144         cb.schemaObjectProduced( this, syntaxChecker.getSyntaxOid(), syntaxChecker );
145
146         syntaxChecker = new AcceptAllSyntaxChecker( "1.3.6.1.4.1.1466.115.121.1.20" );
147         cb.schemaObjectProduced( this, syntaxChecker.getSyntaxOid(), syntaxChecker );
148
149
150         /* 20 Enhanced Guide Y 1.3.6.1.4.1.1466.115.121.1.21
151          * 21 Facsimile Telephone Number Y 1.3.6.1.4.1.1466.115.121.1.22
152          * 22 Fax N 1.3.6.1.4.1.1466.115.121.1.23
153          * 23 Generalized Time Y 1.3.6.1.4.1.1466.115.121.1.24
154          * 24 Guide Y 1.3.6.1.4.1.1466.115.121.1.25
155          * 25 IA5 String Y 1.3.6.1.4.1.1466.115.121.1.26
156          * 26 INTEGER Y 1.3.6.1.4.1.1466.115.121.1.27
157          * 27 JPEG N 1.3.6.1.4.1.1466.115.121.1.28
158          * 28 Master And Shadow Access Points Y 1.3.6.1.4.1.1466.115.121.1.29
159          * 29 Matching Rule Description Y 1.3.6.1.4.1.1466.115.121.1.30
160          */

161         syntaxChecker = new AcceptAllSyntaxChecker( "1.3.6.1.4.1.1466.115.121.1.21" );
162         cb.schemaObjectProduced( this, syntaxChecker.getSyntaxOid(), syntaxChecker );
163
164         syntaxChecker = new AcceptAllSyntaxChecker( "1.3.6.1.4.1.1466.115.121.1.22" );
165         cb.schemaObjectProduced( this, syntaxChecker.getSyntaxOid(), syntaxChecker );
166
167         syntaxChecker = new AcceptAllSyntaxChecker( "1.3.6.1.4.1.1466.115.121.1.23" );
168         cb.schemaObjectProduced( this, syntaxChecker.getSyntaxOid(), syntaxChecker );
169
170         syntaxChecker = new AcceptAllSyntaxChecker( "1.3.6.1.4.1.1466.115.121.1.24" );
171         cb.schemaObjectProduced( this, syntaxChecker.getSyntaxOid(), syntaxChecker );
172
173         syntaxChecker = new AcceptAllSyntaxChecker( "1.3.6.1.4.1.1466.115.121.1.25" );
174         cb.schemaObjectProduced( this, syntaxChecker.getSyntaxOid(), syntaxChecker );
175
176         syntaxChecker = new AcceptAllSyntaxChecker( "1.3.6.1.4.1.1466.115.121.1.26" );
177         cb.schemaObjectProduced( this, syntaxChecker.getSyntaxOid(), syntaxChecker );
178
179         syntaxChecker = new AcceptAllSyntaxChecker( "1.3.6.1.4.1.1466.115.121.1.27" );
180         cb.schemaObjectProduced( this, syntaxChecker.getSyntaxOid(), syntaxChecker );
181
182         syntaxChecker = new AcceptAllSyntaxChecker( "1.3.6.1.4.1.1466.115.121.1.28" );
183         cb.schemaObjectProduced( this, syntaxChecker.getSyntaxOid(), syntaxChecker );
184
185         syntaxChecker = new AcceptAllSyntaxChecker( "1.3.6.1.4.1.1466.115.121.1.29" );
186         cb.schemaObjectProduced( this, syntaxChecker.getSyntaxOid(), syntaxChecker );
187
188         syntaxChecker = new AcceptAllSyntaxChecker( "1.3.6.1.4.1.1466.115.121.1.30" );
189         cb.schemaObjectProduced( this, syntaxChecker.getSyntaxOid(), syntaxChecker );
190
191
192         /* 30 Matching Rule Use Description Y 1.3.6.1.4.1.1466.115.121.1.31
193          * 31 Mail Preference Y 1.3.6.1.4.1.1466.115.121.1.32
194          * 32 MHS OR Address Y 1.3.6.1.4.1.1466.115.121.1.33
195          * 33 Name And Optional UID Y 1.3.6.1.4.1.1466.115.121.1.34
196          * 34 Name Form Description Y 1.3.6.1.4.1.1466.115.121.1.35
197          * 35 Numeric String Y 1.3.6.1.4.1.1466.115.121.1.36
198          * 36 Object Class Description Y 1.3.6.1.4.1.1466.115.121.1.37
199          * 37 OID Y 1.3.6.1.4.1.1466.115.121.1.38
200          * 38 Other Mailbox Y 1.3.6.1.4.1.1466.115.121.1.39
201          * 39 Octet String Y 1.3.6.1.4.1.1466.115.121.1.40
202          */

203         syntaxChecker = new AcceptAllSyntaxChecker( "1.3.6.1.4.1.1466.115.121.1.31" );
204         cb.schemaObjectProduced( this, syntaxChecker.getSyntaxOid(), syntaxChecker );
205
206         syntaxChecker = new AcceptAllSyntaxChecker( "1.3.6.1.4.1.1466.115.121.1.32" );
207         cb.schemaObjectProduced( this, syntaxChecker.getSyntaxOid(), syntaxChecker );
208
209         syntaxChecker = new AcceptAllSyntaxChecker( "1.3.6.1.4.1.1466.115.121.1.33" );
210         cb.schemaObjectProduced( this, syntaxChecker.getSyntaxOid(), syntaxChecker );
211
212         syntaxChecker = new AcceptAllSyntaxChecker( "1.3.6.1.4.1.1466.115.121.1.34" );
213         cb.schemaObjectProduced( this, syntaxChecker.getSyntaxOid(), syntaxChecker );
214
215         syntaxChecker = new AcceptAllSyntaxChecker( "1.3.6.1.4.1.1466.115.121.1.35" );
216         cb.schemaObjectProduced( this, syntaxChecker.getSyntaxOid(), syntaxChecker );
217
218         syntaxChecker = new AcceptAllSyntaxChecker( "1.3.6.1.4.1.1466.115.121.1.36" );
219         cb.schemaObjectProduced( this, syntaxChecker.getSyntaxOid(), syntaxChecker );
220
221         syntaxChecker = new AcceptAllSyntaxChecker( "1.3.6.1.4.1.1466.115.121.1.37" );
222         cb.schemaObjectProduced( this, syntaxChecker.getSyntaxOid(), syntaxChecker );
223
224         syntaxChecker = new AcceptAllSyntaxChecker( "1.3.6.1.4.1.1466.115.121.1.38" );
225         cb.schemaObjectProduced( this, syntaxChecker.getSyntaxOid(), syntaxChecker );
226
227         syntaxChecker = new AcceptAllSyntaxChecker( "1.3.6.1.4.1.1466.115.121.1.39" );
228         cb.schemaObjectProduced( this, syntaxChecker.getSyntaxOid(), syntaxChecker );
229
230         syntaxChecker = new AcceptAllSyntaxChecker( "1.3.6.1.4.1.1466.115.121.1.40" );
231         cb.schemaObjectProduced( this, syntaxChecker.getSyntaxOid(), syntaxChecker );
232
233
234         /*
235          * 40 Postal Address Y 1.3.6.1.4.1.1466.115.121.1.41
236          * 41 Protocol Information Y 1.3.6.1.4.1.1466.115.121.1.42
237          * 42 Presentation Address Y 1.3.6.1.4.1.1466.115.121.1.43
238          * 43 Printable String Y 1.3.6.1.4.1.1466.115.121.1.44
239          * 44 Subtree Specification Y 1.3.6.1.4.1.1466.115.121.1.45
240          * 45 Supplier Information Y 1.3.6.1.4.1.1466.115.121.1.46
241          * 46 Supplier Or Consumer Y 1.3.6.1.4.1.1466.115.121.1.47
242          * 47 Supplier And Consumer Y 1.3.6.1.4.1.1466.115.121.1.48
243          * 48 Supported Algorithm N 1.3.6.1.4.1.1466.115.121.1.49
244          * 49 Telephone Number Y 1.3.6.1.4.1.1466.115.121.1.50
245          */

246         syntaxChecker = new AcceptAllSyntaxChecker( "1.3.6.1.4.1.1466.115.121.1.41" );
247         cb.schemaObjectProduced( this, syntaxChecker.getSyntaxOid(), syntaxChecker );
248
249         syntaxChecker = new AcceptAllSyntaxChecker( "1.3.6.1.4.1.1466.115.121.1.42" );
250         cb.schemaObjectProduced( this, syntaxChecker.getSyntaxOid(), syntaxChecker );
251
252         syntaxChecker = new AcceptAllSyntaxChecker( "1.3.6.1.4.1.1466.115.121.1.43" );
253         cb.schemaObjectProduced( this, syntaxChecker.getSyntaxOid(), syntaxChecker );
254
255         syntaxChecker = new AcceptAllSyntaxChecker( "1.3.6.1.4.1.1466.115.121.1.44" );
256         cb.schemaObjectProduced( this, syntaxChecker.getSyntaxOid(), syntaxChecker );
257
258         syntaxChecker = new AcceptAllSyntaxChecker( "1.3.6.1.4.1.1466.115.121.1.45" );
259         cb.schemaObjectProduced( this, syntaxChecker.getSyntaxOid(), syntaxChecker );
260
261         syntaxChecker = new AcceptAllSyntaxChecker( "1.3.6.1.4.1.1466.115.121.1.46" );
262         cb.schemaObjectProduced( this, syntaxChecker.getSyntaxOid(), syntaxChecker );
263
264         syntaxChecker = new AcceptAllSyntaxChecker( "1.3.6.1.4.1.1466.115.121.1.47" );
265         cb.schemaObjectProduced( this, syntaxChecker.getSyntaxOid(), syntaxChecker );
266
267         syntaxChecker = new AcceptAllSyntaxChecker( "1.3.6.1.4.1.1466.115.121.1.48" );
268         cb.schemaObjectProduced( this, syntaxChecker.getSyntaxOid(), syntaxChecker );
269
270         syntaxChecker = new AcceptAllSyntaxChecker( "1.3.6.1.4.1.1466.115.121.1.49" );
271         cb.schemaObjectProduced( this, syntaxChecker.getSyntaxOid(), syntaxChecker );
272
273         syntaxChecker = new AcceptAllSyntaxChecker( "1.3.6.1.4.1.1466.115.121.1.50" );
274         cb.schemaObjectProduced( this, syntaxChecker.getSyntaxOid(), syntaxChecker );
275
276
277         /*
278          * 50 Teletex Terminal Identifier Y 1.3.6.1.4.1.1466.115.121.1.51
279          * 51 Telex Number Y 1.3.6.1.4.1.1466.115.121.1.52
280          * 52 UTC Time Y 1.3.6.1.4.1.1466.115.121.1.53
281          * 53 LDAP Syntax Description Y 1.3.6.1.4.1.1466.115.121.1.54
282          * 54 Modify Rights Y 1.3.6.1.4.1.1466.115.121.1.55
283          * 55 LDAP BootstrapSchema Definition Y 1.3.6.1.4.1.1466.115.121.1.56
284          * 56 LDAP BootstrapSchema Description Y 1.3.6.1.4.1.1466.115.121.1.57
285          * 57 Substring Assertion Y 1.3.6.1.4.1.1466.115.121.1.58
286          */

287         syntaxChecker = new AcceptAllSyntaxChecker( "1.3.6.1.4.1.1466.115.121.1.51" );
288         cb.schemaObjectProduced( this, syntaxChecker.getSyntaxOid(), syntaxChecker );
289
290         syntaxChecker = new AcceptAllSyntaxChecker( "1.3.6.1.4.1.1466.115.121.1.52" );
291         cb.schemaObjectProduced( this, syntaxChecker.getSyntaxOid(), syntaxChecker );
292
293         syntaxChecker = new AcceptAllSyntaxChecker( "1.3.6.1.4.1.1466.115.121.1.53" );
294         cb.schemaObjectProduced( this, syntaxChecker.getSyntaxOid(), syntaxChecker );
295
296         syntaxChecker = new AcceptAllSyntaxChecker( "1.3.6.1.4.1.1466.115.121.1.54" );
297         cb.schemaObjectProduced( this, syntaxChecker.getSyntaxOid(), syntaxChecker );
298
299         syntaxChecker = new AcceptAllSyntaxChecker( "1.3.6.1.4.1.1466.115.121.1.55" );
300         cb.schemaObjectProduced( this, syntaxChecker.getSyntaxOid(), syntaxChecker );
301
302         syntaxChecker = new AcceptAllSyntaxChecker( "1.3.6.1.4.1.1466.115.121.1.56" );
303         cb.schemaObjectProduced( this, syntaxChecker.getSyntaxOid(), syntaxChecker );
304
305         syntaxChecker = new AcceptAllSyntaxChecker( "1.3.6.1.4.1.1466.115.121.1.57" );
306         cb.schemaObjectProduced( this, syntaxChecker.getSyntaxOid(), syntaxChecker );
307
308         syntaxChecker = new AcceptAllSyntaxChecker( "1.3.6.1.4.1.1466.115.121.1.58" );
309         cb.schemaObjectProduced( this, syntaxChecker.getSyntaxOid(), syntaxChecker );
310     }
311 }
312
Popular Tags