001    
002    /*
003     *  Licensed to the Apache Software Foundation (ASF) under one
004     *  or more contributor license agreements.  See the NOTICE file
005     *  distributed with this work for additional information
006     *  regarding copyright ownership.  The ASF licenses this file
007     *  to you under the Apache License, Version 2.0 (the
008     *  "License"); you may not use this file except in compliance
009     *  with the License.  You may obtain a copy of the License at
010     *  
011     *    http://www.apache.org/licenses/LICENSE-2.0
012     *  
013     *  Unless required by applicable law or agreed to in writing,
014     *  software distributed under the License is distributed on an
015     *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
016     *  KIND, either express or implied.  See the License for the
017     *  specific language governing permissions and limitations
018     *  under the License. 
019     *  
020     */
021    package org.apache.directory.server.schema.bootstrap;
022    
023    
024    import java.util.ArrayList;
025    import javax.naming.NamingException;
026    
027    import org.apache.directory.server.schema.registries.Registries;
028    import org.apache.directory.shared.ldap.schema.UsageEnum;
029    
030    
031    /**
032     * A producer of schema attributeType definations for the apachedns schema.  This
033     * code has been automatically generated using schema files in the OpenLDAP
034     * format along with the directory plugin for maven.  This has been done
035     * to facilitate Eve<->OpenLDAP schema interoperability.
036     *
037     * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
038     */
039    public class ApachednsAttributeTypeProducer extends AbstractBootstrapProducer
040    {
041    
042        public ApachednsAttributeTypeProducer()
043        {
044            super( ProducerTypeEnum.ATTRIBUTE_TYPE_PRODUCER );
045        }
046    
047    
048        // ------------------------------------------------------------------------
049        // BootstrapProducer Methods
050        // ------------------------------------------------------------------------
051    
052    
053        /**
054         * @see BootstrapProducer#produce( Registries, ProducerCallback )
055         */
056        public void produce( Registries registries, ProducerCallback cb )
057            throws NamingException
058        {
059            ArrayList<String> names = new ArrayList<String>();
060            BootstrapAttributeType attributeType;
061    
062    
063            // --------------------------------------------------------------------
064            // AttributeType 1.3.6.1.4.1.18060.0.4.2.2.1 
065            // --------------------------------------------------------------------
066    
067            attributeType = newAttributeType( "1.3.6.1.4.1.18060.0.4.2.2.1", registries );
068            attributeType.setDescription( "The class of a resource record" );
069            attributeType.setCanUserModify( ! false );
070            attributeType.setSingleValue( true );
071            attributeType.setCollective( false );
072            attributeType.setObsolete( false );
073            attributeType.setLength( 0 );
074            attributeType.setUsage( UsageEnum.getUsage( "USER_APPLICATIONS" ) );
075            attributeType.setEqualityId( "caseIgnoreIA5Match" );
076            attributeType.setSyntaxId( "1.3.6.1.4.1.1466.115.121.1.26" );
077    
078            names.clear();
079            names.add( "apacheDnsClass" );
080            attributeType.setNames( names.toArray( EMPTY ) );
081            cb.schemaObjectProduced( this, "1.3.6.1.4.1.18060.0.4.2.2.1", attributeType );
082    
083            // --------------------------------------------------------------------
084            // AttributeType 1.3.6.1.4.1.18060.0.4.2.2.2 
085            // --------------------------------------------------------------------
086    
087            attributeType = newAttributeType( "1.3.6.1.4.1.18060.0.4.2.2.2", registries );
088            attributeType.setDescription( "An integer denoting time to live" );
089            attributeType.setCanUserModify( ! false );
090            attributeType.setSingleValue( true );
091            attributeType.setCollective( false );
092            attributeType.setObsolete( false );
093            attributeType.setLength( 0 );
094            attributeType.setUsage( UsageEnum.getUsage( "USER_APPLICATIONS" ) );
095            attributeType.setEqualityId( "integerMatch" );
096            attributeType.setSyntaxId( "1.3.6.1.4.1.1466.115.121.1.27" );
097    
098            names.clear();
099            names.add( "apacheDnsTtl" );
100            attributeType.setNames( names.toArray( EMPTY ) );
101            cb.schemaObjectProduced( this, "1.3.6.1.4.1.18060.0.4.2.2.2", attributeType );
102    
103            // --------------------------------------------------------------------
104            // AttributeType 1.3.6.1.4.1.18060.0.4.2.2.3 
105            // --------------------------------------------------------------------
106    
107            attributeType = newAttributeType( "1.3.6.1.4.1.18060.0.4.2.2.3", registries );
108            attributeType.setDescription( "A domain name represented as a sequence of labels" );
109            attributeType.setCanUserModify( ! false );
110            attributeType.setSingleValue( true );
111            attributeType.setCollective( false );
112            attributeType.setObsolete( false );
113            attributeType.setLength( 256 );
114            attributeType.setUsage( UsageEnum.getUsage( "USER_APPLICATIONS" ) );
115            attributeType.setEqualityId( "caseIgnoreIA5Match" );
116            attributeType.setSyntaxId( "1.3.6.1.4.1.1466.115.121.1.26" );
117    
118            names.clear();
119            names.add( "apacheDnsDomainName" );
120            attributeType.setNames( names.toArray( EMPTY ) );
121            cb.schemaObjectProduced( this, "1.3.6.1.4.1.18060.0.4.2.2.3", attributeType );
122    
123            // --------------------------------------------------------------------
124            // AttributeType 1.3.6.1.4.1.18060.0.4.2.2.4 
125            // --------------------------------------------------------------------
126    
127            attributeType = newAttributeType( "1.3.6.1.4.1.18060.0.4.2.2.4", registries );
128            attributeType.setDescription( "A string up to 256 characters in length" );
129            attributeType.setCanUserModify( ! false );
130            attributeType.setSingleValue( true );
131            attributeType.setCollective( false );
132            attributeType.setObsolete( false );
133            attributeType.setLength( 256 );
134            attributeType.setUsage( UsageEnum.getUsage( "USER_APPLICATIONS" ) );
135            attributeType.setEqualityId( "caseIgnoreIA5Match" );
136            attributeType.setSyntaxId( "1.3.6.1.4.1.1466.115.121.1.26" );
137    
138            names.clear();
139            names.add( "apacheDnsCharacterString" );
140            attributeType.setNames( names.toArray( EMPTY ) );
141            cb.schemaObjectProduced( this, "1.3.6.1.4.1.18060.0.4.2.2.4", attributeType );
142    
143            // --------------------------------------------------------------------
144            // AttributeType 1.3.6.1.4.1.18060.0.4.2.2.5 
145            // --------------------------------------------------------------------
146    
147            attributeType = newAttributeType( "1.3.6.1.4.1.18060.0.4.2.2.5", registries );
148            attributeType.setDescription( "A 4 octet IP address" );
149            attributeType.setCanUserModify( ! false );
150            attributeType.setSingleValue( true );
151            attributeType.setCollective( false );
152            attributeType.setObsolete( false );
153            attributeType.setLength( 128 );
154            attributeType.setUsage( UsageEnum.getUsage( "USER_APPLICATIONS" ) );
155            attributeType.setEqualityId( "caseIgnoreIA5Match" );
156            attributeType.setSyntaxId( "1.3.6.1.4.1.1466.115.121.1.26" );
157    
158            names.clear();
159            names.add( "apacheDnsIpAddress" );
160            attributeType.setNames( names.toArray( EMPTY ) );
161            cb.schemaObjectProduced( this, "1.3.6.1.4.1.18060.0.4.2.2.5", attributeType );
162    
163            // --------------------------------------------------------------------
164            // AttributeType 1.3.6.1.4.1.18060.0.4.2.2.6 
165            // --------------------------------------------------------------------
166    
167            attributeType = newAttributeType( "1.3.6.1.4.1.18060.0.4.2.2.6", registries );
168            attributeType.setDescription( "The domain name of the name server that was the primary source of data for this zone" );
169            attributeType.setCanUserModify( ! false );
170            attributeType.setSingleValue( true );
171            attributeType.setCollective( false );
172            attributeType.setObsolete( false );
173            attributeType.setLength( 0 );
174            attributeType.setUsage( UsageEnum.getUsage( "USER_APPLICATIONS" ) );
175            attributeType.setSuperiorId( "apacheDnsDomainName" );
176    
177            names.clear();
178            names.add( "apacheDnsSoaMName" );
179            attributeType.setNames( names.toArray( EMPTY ) );
180            cb.schemaObjectProduced( this, "1.3.6.1.4.1.18060.0.4.2.2.6", attributeType );
181    
182            // --------------------------------------------------------------------
183            // AttributeType 1.3.6.1.4.1.18060.0.4.2.2.7 
184            // --------------------------------------------------------------------
185    
186            attributeType = newAttributeType( "1.3.6.1.4.1.18060.0.4.2.2.7", registries );
187            attributeType.setDescription( "The domain name which specifies the mailbox of the person responsible for this zone" );
188            attributeType.setCanUserModify( ! false );
189            attributeType.setSingleValue( true );
190            attributeType.setCollective( false );
191            attributeType.setObsolete( false );
192            attributeType.setLength( 0 );
193            attributeType.setUsage( UsageEnum.getUsage( "USER_APPLICATIONS" ) );
194            attributeType.setSuperiorId( "apacheDnsDomainName" );
195    
196            names.clear();
197            names.add( "apacheDnsSoaRName" );
198            attributeType.setNames( names.toArray( EMPTY ) );
199            cb.schemaObjectProduced( this, "1.3.6.1.4.1.18060.0.4.2.2.7", attributeType );
200    
201            // --------------------------------------------------------------------
202            // AttributeType 1.3.6.1.4.1.18060.0.4.2.2.8 
203            // --------------------------------------------------------------------
204    
205            attributeType = newAttributeType( "1.3.6.1.4.1.18060.0.4.2.2.8", registries );
206            attributeType.setDescription( "The unsigned 32 bit version number of the original copy of the zone" );
207            attributeType.setCanUserModify( ! false );
208            attributeType.setSingleValue( true );
209            attributeType.setCollective( false );
210            attributeType.setObsolete( false );
211            attributeType.setLength( 0 );
212            attributeType.setUsage( UsageEnum.getUsage( "USER_APPLICATIONS" ) );
213            attributeType.setEqualityId( "integerMatch" );
214            attributeType.setSyntaxId( "1.3.6.1.4.1.1466.115.121.1.27" );
215    
216            names.clear();
217            names.add( "apacheDnsSoaSerial" );
218            attributeType.setNames( names.toArray( EMPTY ) );
219            cb.schemaObjectProduced( this, "1.3.6.1.4.1.18060.0.4.2.2.8", attributeType );
220    
221            // --------------------------------------------------------------------
222            // AttributeType 1.3.6.1.4.1.18060.0.4.2.2.9 
223            // --------------------------------------------------------------------
224    
225            attributeType = newAttributeType( "1.3.6.1.4.1.18060.0.4.2.2.9", registries );
226            attributeType.setDescription( "A 32 bit time interval before the zone should be refreshed" );
227            attributeType.setCanUserModify( ! false );
228            attributeType.setSingleValue( true );
229            attributeType.setCollective( false );
230            attributeType.setObsolete( false );
231            attributeType.setLength( 0 );
232            attributeType.setUsage( UsageEnum.getUsage( "USER_APPLICATIONS" ) );
233            attributeType.setEqualityId( "integerMatch" );
234            attributeType.setSyntaxId( "1.3.6.1.4.1.1466.115.121.1.27" );
235    
236            names.clear();
237            names.add( "apacheDnsSoaRefresh" );
238            attributeType.setNames( names.toArray( EMPTY ) );
239            cb.schemaObjectProduced( this, "1.3.6.1.4.1.18060.0.4.2.2.9", attributeType );
240    
241            // --------------------------------------------------------------------
242            // AttributeType 1.3.6.1.4.1.18060.0.4.2.2.10 
243            // --------------------------------------------------------------------
244    
245            attributeType = newAttributeType( "1.3.6.1.4.1.18060.0.4.2.2.10", registries );
246            attributeType.setDescription( "A 32 bit time interval that should elapse before a failed refresh should be retired" );
247            attributeType.setCanUserModify( ! false );
248            attributeType.setSingleValue( true );
249            attributeType.setCollective( false );
250            attributeType.setObsolete( false );
251            attributeType.setLength( 0 );
252            attributeType.setUsage( UsageEnum.getUsage( "USER_APPLICATIONS" ) );
253            attributeType.setEqualityId( "integerMatch" );
254            attributeType.setSyntaxId( "1.3.6.1.4.1.1466.115.121.1.27" );
255    
256            names.clear();
257            names.add( "apacheDnsSoaRetry" );
258            attributeType.setNames( names.toArray( EMPTY ) );
259            cb.schemaObjectProduced( this, "1.3.6.1.4.1.18060.0.4.2.2.10", attributeType );
260    
261            // --------------------------------------------------------------------
262            // AttributeType 1.3.6.1.4.1.18060.0.4.2.2.11 
263            // --------------------------------------------------------------------
264    
265            attributeType = newAttributeType( "1.3.6.1.4.1.18060.0.4.2.2.11", registries );
266            attributeType.setDescription( "A 32 bit time value that specifies the upper limit on the time interval that can elapse before the zone is no longer authoritative" );
267            attributeType.setCanUserModify( ! false );
268            attributeType.setSingleValue( true );
269            attributeType.setCollective( false );
270            attributeType.setObsolete( false );
271            attributeType.setLength( 0 );
272            attributeType.setUsage( UsageEnum.getUsage( "USER_APPLICATIONS" ) );
273            attributeType.setEqualityId( "integerMatch" );
274            attributeType.setSyntaxId( "1.3.6.1.4.1.1466.115.121.1.27" );
275    
276            names.clear();
277            names.add( "apacheDnsSoaExpire" );
278            attributeType.setNames( names.toArray( EMPTY ) );
279            cb.schemaObjectProduced( this, "1.3.6.1.4.1.18060.0.4.2.2.11", attributeType );
280    
281            // --------------------------------------------------------------------
282            // AttributeType 1.3.6.1.4.1.18060.0.4.2.2.12 
283            // --------------------------------------------------------------------
284    
285            attributeType = newAttributeType( "1.3.6.1.4.1.18060.0.4.2.2.12", registries );
286            attributeType.setDescription( "The unsigned 32 bit minimum TTL field that should be exported with any RR from this zone." );
287            attributeType.setCanUserModify( ! false );
288            attributeType.setSingleValue( true );
289            attributeType.setCollective( false );
290            attributeType.setObsolete( false );
291            attributeType.setLength( 0 );
292            attributeType.setUsage( UsageEnum.getUsage( "USER_APPLICATIONS" ) );
293            attributeType.setEqualityId( "integerMatch" );
294            attributeType.setSyntaxId( "1.3.6.1.4.1.1466.115.121.1.27" );
295    
296            names.clear();
297            names.add( "apacheDnsSoaMinimum" );
298            attributeType.setNames( names.toArray( EMPTY ) );
299            cb.schemaObjectProduced( this, "1.3.6.1.4.1.18060.0.4.2.2.12", attributeType );
300    
301            // --------------------------------------------------------------------
302            // AttributeType 1.3.6.1.4.1.18060.0.4.2.2.13 
303            // --------------------------------------------------------------------
304    
305            attributeType = newAttributeType( "1.3.6.1.4.1.18060.0.4.2.2.13", registries );
306            attributeType.setDescription( "An integer denoting the mail exchange preference" );
307            attributeType.setCanUserModify( ! false );
308            attributeType.setSingleValue( true );
309            attributeType.setCollective( false );
310            attributeType.setObsolete( false );
311            attributeType.setLength( 0 );
312            attributeType.setUsage( UsageEnum.getUsage( "USER_APPLICATIONS" ) );
313            attributeType.setEqualityId( "integerMatch" );
314            attributeType.setSyntaxId( "1.3.6.1.4.1.1466.115.121.1.27" );
315    
316            names.clear();
317            names.add( "apacheDnsMxPreference" );
318            attributeType.setNames( names.toArray( EMPTY ) );
319            cb.schemaObjectProduced( this, "1.3.6.1.4.1.18060.0.4.2.2.13", attributeType );
320    
321            // --------------------------------------------------------------------
322            // AttributeType 1.3.6.1.4.1.18060.0.4.2.2.14 
323            // --------------------------------------------------------------------
324    
325            attributeType = newAttributeType( "1.3.6.1.4.1.18060.0.4.2.2.14", registries );
326            attributeType.setDescription( "The unsigned 16 bit priority of this target host" );
327            attributeType.setCanUserModify( ! false );
328            attributeType.setSingleValue( true );
329            attributeType.setCollective( false );
330            attributeType.setObsolete( false );
331            attributeType.setLength( 0 );
332            attributeType.setUsage( UsageEnum.getUsage( "USER_APPLICATIONS" ) );
333            attributeType.setEqualityId( "integerMatch" );
334            attributeType.setSyntaxId( "1.3.6.1.4.1.1466.115.121.1.27" );
335    
336            names.clear();
337            names.add( "apacheDnsServicePriority" );
338            attributeType.setNames( names.toArray( EMPTY ) );
339            cb.schemaObjectProduced( this, "1.3.6.1.4.1.18060.0.4.2.2.14", attributeType );
340    
341            // --------------------------------------------------------------------
342            // AttributeType 1.3.6.1.4.1.18060.0.4.2.2.15 
343            // --------------------------------------------------------------------
344    
345            attributeType = newAttributeType( "1.3.6.1.4.1.18060.0.4.2.2.15", registries );
346            attributeType.setDescription( "The unsigned 16 bit weight specifying a relative weight for entries with the same priority" );
347            attributeType.setCanUserModify( ! false );
348            attributeType.setSingleValue( true );
349            attributeType.setCollective( false );
350            attributeType.setObsolete( false );
351            attributeType.setLength( 0 );
352            attributeType.setUsage( UsageEnum.getUsage( "USER_APPLICATIONS" ) );
353            attributeType.setEqualityId( "integerMatch" );
354            attributeType.setSyntaxId( "1.3.6.1.4.1.1466.115.121.1.27" );
355    
356            names.clear();
357            names.add( "apacheDnsServiceWeight" );
358            attributeType.setNames( names.toArray( EMPTY ) );
359            cb.schemaObjectProduced( this, "1.3.6.1.4.1.18060.0.4.2.2.15", attributeType );
360    
361            // --------------------------------------------------------------------
362            // AttributeType 1.3.6.1.4.1.18060.0.4.2.2.16 
363            // --------------------------------------------------------------------
364    
365            attributeType = newAttributeType( "1.3.6.1.4.1.18060.0.4.2.2.16", registries );
366            attributeType.setDescription( "The unsigned 16 bit port on this target host of this service" );
367            attributeType.setCanUserModify( ! false );
368            attributeType.setSingleValue( true );
369            attributeType.setCollective( false );
370            attributeType.setObsolete( false );
371            attributeType.setLength( 0 );
372            attributeType.setUsage( UsageEnum.getUsage( "USER_APPLICATIONS" ) );
373            attributeType.setEqualityId( "integerMatch" );
374            attributeType.setSyntaxId( "1.3.6.1.4.1.1466.115.121.1.27" );
375    
376            names.clear();
377            names.add( "apacheDnsServicePort" );
378            attributeType.setNames( names.toArray( EMPTY ) );
379            cb.schemaObjectProduced( this, "1.3.6.1.4.1.18060.0.4.2.2.16", attributeType );
380        }
381    }