KickJava   Java API By Example, From Geeks To Geeks.

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


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.SyntaxChecker;
22
23 import javax.naming.NamingException JavaDoc;
24
25
26
27 /**
28  * A producer of SyntaxChecker objects for the nis schema. This code has been
29  * automatically generated using schema files in the OpenLDAP format along with
30  * the eve schema plugin for maven. This has been done to facilitate
31  * Eve<->OpenLDAP schema interoperability.
32  *
33  * @author <a HREF="mailto:dev@directory.apache.org">Apache Directory Project</a>
34  * @version $Rev: 169198 $
35  */

36 public class NisSyntaxCheckerProducer extends AbstractBootstrapProducer
37 {
38     public NisSyntaxCheckerProducer()
39     {
40         super( ProducerTypeEnum.SYNTAX_CHECKER_PRODUCER );
41     }
42
43
44     // ------------------------------------------------------------------------
45
// BootstrapProducer Methods
46
// ------------------------------------------------------------------------
47

48
49     /**
50      * @see org.apache.ldap.server.schema.bootstrap.BootstrapProducer#produce(BootstrapRegistries, org.apache.ldap.server.schema.bootstrap.ProducerCallback)
51      */

52     public void produce( BootstrapRegistries registries, ProducerCallback cb )
53         throws NamingException JavaDoc
54     {
55         SyntaxChecker syntaxChecker;
56
57         /*
58          * We are going to need a syntax checker for each and every one of
59          * these syntaxes. However right now we're probably not going to be
60          * turning on syntax checking or are not as interested in it. So we
61          * can put in place simple do nothing syntax checkers - which is really
62          * the binary syntax checker.
63          */

64
65         // 1.3.6.1.1.1.0.0 - RFC2307 NIS Netgroup Triple
66
syntaxChecker = new AcceptAllSyntaxChecker( "1.3.6.1.1.1.0.0" );
67         cb.schemaObjectProduced( this, syntaxChecker.getSyntaxOid(), syntaxChecker );
68
69         // 1.3.6.1.1.1.0.1 - RFC2307 Boot Parameter Syntax
70
syntaxChecker = new AcceptAllSyntaxChecker( "1.3.6.1.1.1.0.1" );
71         cb.schemaObjectProduced( this, syntaxChecker.getSyntaxOid(), syntaxChecker );
72     }
73 }
74
Popular Tags