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.bootstrap.AbstractBootstrapProducer;
26 import org.apache.directory.server.schema.bootstrap.ProducerCallback;
27 import org.apache.directory.server.schema.bootstrap.ProducerTypeEnum;
28 import org.apache.directory.server.schema.registries.Registries;
29 import org.apache.directory.server.schema.registries.SyntaxCheckerRegistry;
30
31
32 /**
33 * A producer of Syntax objects for the nis schema.
34 * Modified by hand from generated code
35 *
36 * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
37 * @version $Rev: 549897 $
38 */
39 public class NisSyntaxProducer extends AbstractBootstrapProducer
40 {
41 public NisSyntaxProducer()
42 {
43 super( ProducerTypeEnum.SYNTAX_PRODUCER );
44 }
45
46
47 // ------------------------------------------------------------------------
48 // BootstrapProducer Methods
49 // ------------------------------------------------------------------------
50
51 /**
52 * @see org.apache.directory.server.schema.bootstrap.BootstrapProducer#produce(org.apache.directory.server.schema.registries.Registries, org.apache.directory.server.schema.bootstrap.ProducerCallback)
53 */
54 public void produce( Registries registries, ProducerCallback cb ) throws NamingException
55 {
56 BootstrapSyntax syntax;
57 SyntaxCheckerRegistry syntaxCheckerRegistry = registries.getSyntaxCheckerRegistry();
58
59 // 1.3.6.1.1.1.0.0 - RFC2307 NIS Netgroup Triple
60 syntax = new BootstrapSyntax( "1.3.6.1.1.1.0.0", syntaxCheckerRegistry );
61 syntax.setDescription( "RFC2307 NIS Netgroup Triple" );
62 syntax.setNames( new String[]
63 { "NIS Netgroup Triple" } );
64 syntax.setHumanReadable( true );
65 cb.schemaObjectProduced( this, syntax.getOid(), syntax );
66
67 // 1.3.6.1.1.1.0.1 - RFC2307 Boot Parameter Syntax
68 syntax = new BootstrapSyntax( "1.3.6.1.1.1.0.1", syntaxCheckerRegistry );
69 syntax.setNames( new String[]
70 { "NIS Boot Parameter" } );
71 syntax.setHumanReadable( true );
72 cb.schemaObjectProduced( this, syntax.getOid(), syntax );
73
74 }
75 }