KickJava   Java API By Example, From Geeks To Geeks.

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


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

34 public class NisSyntaxProducer extends AbstractBootstrapProducer
35 {
36     public NisSyntaxProducer()
37     {
38         super( ProducerTypeEnum.SYNTAX_PRODUCER );
39     }
40
41
42     // ------------------------------------------------------------------------
43
// BootstrapProducer Methods
44
// ------------------------------------------------------------------------
45

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

50     public void produce( BootstrapRegistries registries, ProducerCallback cb )
51         throws NamingException JavaDoc
52     {
53         BootstrapSyntax syntax;
54         SyntaxCheckerRegistry syntaxCheckerRegistry = registries.getSyntaxCheckerRegistry();
55
56         // 1.3.6.1.1.1.0.0 - RFC2307 NIS Netgroup Triple
57
syntax = new BootstrapSyntax( "1.3.6.1.1.1.0.0", syntaxCheckerRegistry );
58         syntax.setDescription( "RFC2307 NIS Netgroup Triple" );
59         syntax.setNames( new String JavaDoc[] { "NIS Netgroup Triple" } );
60         syntax.setHumanReadible( true );
61         cb.schemaObjectProduced( this, syntax.getOid(), syntax );
62
63         // 1.3.6.1.1.1.0.1 - RFC2307 Boot Parameter Syntax
64
syntax = new BootstrapSyntax( "1.3.6.1.1.1.0.1", syntaxCheckerRegistry );
65         syntax.setNames( new String JavaDoc[] { "NIS Boot Parameter" } );
66         syntax.setHumanReadible( true );
67         cb.schemaObjectProduced( this, syntax.getOid(), syntax );
68
69     }
70 }
71
Popular Tags