1 /*
2 * Licensed to the Apache Software Foundation (ASF) under one
3 * or more contributor license agreements. See the NOTICE file
4 * distributed with this work for additional information
5 * regarding copyright ownership. The ASF licenses this file
6 * to you under the Apache License, Version 2.0 (the
7 * "License"); you may not use this file except in compliance
8 * with the License. You may obtain a copy of the License at
9 *
10 * http://www.apache.org/licenses/LICENSE-2.0
11 *
12 * Unless required by applicable law or agreed to in writing,
13 * software distributed under the License is distributed on an
14 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 * KIND, either express or implied. See the License for the
16 * specific language governing permissions and limitations
17 * under the License.
18 *
19 */
20 package org.apache.directory.server.schema.bootstrap;
21
22
23 import javax.naming.NamingException;
24
25 import org.apache.directory.server.schema.registries.Registries;
26 import org.apache.directory.shared.ldap.schema.syntax.NumberSyntaxChecker;
27 import org.apache.directory.shared.ldap.schema.syntax.NumericOidSyntaxChecker;
28 import org.apache.directory.shared.ldap.schema.syntax.ObjectClassTypeSyntaxChecker;
29 import org.apache.directory.shared.ldap.schema.syntax.ObjectNameSyntaxChecker;
30 import org.apache.directory.shared.ldap.schema.syntax.SyntaxChecker;
31
32
33
34 /**
35 * A producer of SyntaxChecker objects for the apachemeta schema.
36 * Modified by hand from generated code
37 *
38 * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
39 * @version $Rev$
40 */
41 public class ApachemetaSyntaxCheckerProducer extends AbstractBootstrapProducer
42 {
43 public ApachemetaSyntaxCheckerProducer()
44 {
45 super( ProducerTypeEnum.SYNTAX_CHECKER_PRODUCER );
46 }
47
48
49 // ------------------------------------------------------------------------
50 // BootstrapProducer Methods
51 // ------------------------------------------------------------------------
52
53
54 /**
55 * @see BootstrapProducer#produce(Registries, ProducerCallback)
56 */
57 public void produce( Registries registries, ProducerCallback cb )
58 throws NamingException
59 {
60 SyntaxChecker checker = null;
61
62 checker = new NumericOidSyntaxChecker();
63 cb.schemaObjectProduced( this, checker.getSyntaxOid(), checker );
64
65 checker = new ObjectClassTypeSyntaxChecker();
66 cb.schemaObjectProduced( this, checker.getSyntaxOid(), checker );
67
68 checker = new NumberSyntaxChecker();
69 cb.schemaObjectProduced( this, checker.getSyntaxOid(), checker );
70
71 checker = new ObjectNameSyntaxChecker();
72 cb.schemaObjectProduced( this, checker.getSyntaxOid(), checker );
73 }
74 }