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    import org.apache.directory.shared.ldap.schema.ObjectClassTypeEnum;
027    import org.apache.directory.server.schema.registries.Registries;
028    
029    
030    /**
031     * A producer of schema objectClass definations for the apache schema.  This
032     * code has been automatically generated using schema files in the OpenLDAP
033     * format along with the directory plugin for maven.  This has been done
034     * to facilitate OpenLDAP schema interoperability.
035     *
036     * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
037     */
038    public class ApacheObjectClassProducer extends AbstractBootstrapProducer
039    {
040    
041        public ApacheObjectClassProducer()
042        {
043            super( ProducerTypeEnum.OBJECT_CLASS_PRODUCER );
044        }
045    
046    
047        // ------------------------------------------------------------------------
048        // BootstrapProducer Methods
049        // ------------------------------------------------------------------------
050    
051    
052        /**
053         * @see BootstrapProducer#produce(Registries, ProducerCallback)
054         */
055        public void produce( Registries registries, ProducerCallback cb )
056            throws NamingException
057        {
058            ArrayList<String> array = new ArrayList<String>();
059            BootstrapObjectClass objectClass;
060    
061            // --------------------------------------------------------------------
062            // ObjectClass 1.3.6.1.4.1.18060.0.4.1.3.1 
063            // --------------------------------------------------------------------
064    
065            objectClass = newObjectClass( "1.3.6.1.4.1.18060.0.4.1.3.1", registries );
066            objectClass.setObsolete( false );
067    
068            // set the objectclass type
069            objectClass.setType( ObjectClassTypeEnum.STRUCTURAL );
070    
071            // set superior objectClasses
072            array.clear();
073            array.add( "top" );
074            objectClass.setSuperClassIds( array.toArray( EMPTY ) );
075    
076            // set must list
077            array.clear();
078            array.add( "prefNodeName" );
079            objectClass.setMustListIds( array.toArray( EMPTY ) );
080    
081            // set may list
082            array.clear();
083            objectClass.setMayListIds( array.toArray( EMPTY ) );
084    
085            // set names
086            array.clear();
087            array.add( "prefNode" );
088            objectClass.setNames( array.toArray( EMPTY ) );
089            cb.schemaObjectProduced( this, "1.3.6.1.4.1.18060.0.4.1.3.1", objectClass );
090            // --------------------------------------------------------------------
091            // ObjectClass 2.5.17.1 
092            // --------------------------------------------------------------------
093    
094            objectClass = newObjectClass( "2.5.17.1", registries );
095            objectClass.setObsolete( false );
096    
097            // set the objectclass type
098            objectClass.setType( ObjectClassTypeEnum.AUXILIARY );
099    
100            // set superior objectClasses
101            array.clear();
102            objectClass.setSuperClassIds( array.toArray( EMPTY ) );
103    
104            // set must list
105            array.clear();
106            array.add( "prescriptiveACI" );
107            objectClass.setMustListIds( array.toArray( EMPTY ) );
108    
109            // set may list
110            array.clear();
111            objectClass.setMayListIds( array.toArray( EMPTY ) );
112    
113            // set names
114            array.clear();
115            array.add( "accessControlSubentry" );
116            objectClass.setNames( array.toArray( EMPTY ) );
117            cb.schemaObjectProduced( this, "2.5.17.1", objectClass );
118            // --------------------------------------------------------------------
119            // ObjectClass 1.3.6.1.4.1.18060.0.4.1.3.3 
120            // --------------------------------------------------------------------
121    
122            objectClass = newObjectClass( "1.3.6.1.4.1.18060.0.4.1.3.3", registries );
123            objectClass.setObsolete( false );
124    
125            // set the objectclass type
126            objectClass.setType( ObjectClassTypeEnum.STRUCTURAL );
127    
128            // set superior objectClasses
129            array.clear();
130            array.add( "top" );
131            objectClass.setSuperClassIds( array.toArray( EMPTY ) );
132    
133            // set must list
134            array.clear();
135            array.add( "cn" );
136            array.add( "apacheServicePid" );
137            objectClass.setMustListIds( array.toArray( EMPTY ) );
138    
139            // set may list
140            array.clear();
141            array.add( "apacheServiceFactoryPid" );
142            objectClass.setMayListIds( array.toArray( EMPTY ) );
143    
144            // set names
145            array.clear();
146            array.add( "apacheServiceConfiguration" );
147            objectClass.setNames( array.toArray( EMPTY ) );
148            cb.schemaObjectProduced( this, "1.3.6.1.4.1.18060.0.4.1.3.3", objectClass );
149            // --------------------------------------------------------------------
150            // ObjectClass 1.3.6.1.4.1.18060.0.4.1.3.4 
151            // --------------------------------------------------------------------
152    
153            objectClass = newObjectClass( "1.3.6.1.4.1.18060.0.4.1.3.4", registries );
154            objectClass.setObsolete( false );
155    
156            // set the objectclass type
157            objectClass.setType( ObjectClassTypeEnum.STRUCTURAL );
158    
159            // set superior objectClasses
160            array.clear();
161            array.add( "top" );
162            objectClass.setSuperClassIds( array.toArray( EMPTY ) );
163    
164            // set must list
165            array.clear();
166            array.add( "cn" );
167            array.add( "apacheServicePid" );
168            objectClass.setMustListIds( array.toArray( EMPTY ) );
169    
170            // set may list
171            array.clear();
172            objectClass.setMayListIds( array.toArray( EMPTY ) );
173    
174            // set names
175            array.clear();
176            array.add( "apacheFactoryConfiguration" );
177            objectClass.setNames( array.toArray( EMPTY ) );
178            cb.schemaObjectProduced( this, "1.3.6.1.4.1.18060.0.4.1.3.4", objectClass );
179            // --------------------------------------------------------------------
180            // ObjectClass 1.3.6.1.4.1.18060.0.4.1.3.5 
181            // --------------------------------------------------------------------
182    
183            objectClass = newObjectClass( "1.3.6.1.4.1.18060.0.4.1.3.5", registries );
184            objectClass.setObsolete( false );
185    
186            // set the objectclass type
187            objectClass.setType( ObjectClassTypeEnum.STRUCTURAL );
188    
189            // set superior objectClasses
190            array.clear();
191            array.add( "top" );
192            objectClass.setSuperClassIds( array.toArray( EMPTY ) );
193    
194            // set must list
195            array.clear();
196            array.add( "cn" );
197            array.add( "apacheCatalogEntryBaseDn" );
198            objectClass.setMustListIds( array.toArray( EMPTY ) );
199    
200            // set may list
201            array.clear();
202            array.add( "apacheCatalogEntryName" );
203            objectClass.setMayListIds( array.toArray( EMPTY ) );
204    
205            // set names
206            array.clear();
207            array.add( "apacheCatalogEntry" );
208            objectClass.setNames( array.toArray( EMPTY ) );
209            cb.schemaObjectProduced( this, "1.3.6.1.4.1.18060.0.4.1.3.5", objectClass );
210            // --------------------------------------------------------------------
211            // ObjectClass 1.3.6.1.4.1.18060.0.4.1.3.6 
212            // --------------------------------------------------------------------
213    
214            objectClass = newObjectClass( "1.3.6.1.4.1.18060.0.4.1.3.6", registries );
215            objectClass.setObsolete( false );
216    
217            // set the objectclass type
218            objectClass.setType( ObjectClassTypeEnum.STRUCTURAL );
219    
220            // set superior objectClasses
221            array.clear();
222            array.add( "top" );
223            objectClass.setSuperClassIds( array.toArray( EMPTY ) );
224    
225            // set must list
226            array.clear();
227            array.add( "windowsFilePath" );
228            objectClass.setMustListIds( array.toArray( EMPTY ) );
229    
230            // set may list
231            array.clear();
232            objectClass.setMayListIds( array.toArray( EMPTY ) );
233    
234            // set names
235            array.clear();
236            array.add( "windowsFile" );
237            objectClass.setNames( array.toArray( EMPTY ) );
238            cb.schemaObjectProduced( this, "1.3.6.1.4.1.18060.0.4.1.3.6", objectClass );
239            // --------------------------------------------------------------------
240            // ObjectClass 1.3.6.1.4.1.18060.0.4.1.3.7 
241            // --------------------------------------------------------------------
242    
243            objectClass = newObjectClass( "1.3.6.1.4.1.18060.0.4.1.3.7", registries );
244            objectClass.setObsolete( false );
245    
246            // set the objectclass type
247            objectClass.setType( ObjectClassTypeEnum.STRUCTURAL );
248    
249            // set superior objectClasses
250            array.clear();
251            array.add( "top" );
252            objectClass.setSuperClassIds( array.toArray( EMPTY ) );
253    
254            // set must list
255            array.clear();
256            array.add( "unixFilePath" );
257            objectClass.setMustListIds( array.toArray( EMPTY ) );
258    
259            // set may list
260            array.clear();
261            objectClass.setMayListIds( array.toArray( EMPTY ) );
262    
263            // set names
264            array.clear();
265            array.add( "unixFile" );
266            objectClass.setNames( array.toArray( EMPTY ) );
267            cb.schemaObjectProduced( this, "1.3.6.1.4.1.18060.0.4.1.3.7", objectClass );
268            // --------------------------------------------------------------------
269            // ObjectClass 1.3.6.1.4.1.18060.0.4.1.3.8 
270            // --------------------------------------------------------------------
271    
272            objectClass = newObjectClass( "1.3.6.1.4.1.18060.0.4.1.3.8", registries );
273            objectClass.setObsolete( false );
274    
275            // set the objectclass type
276            objectClass.setType( ObjectClassTypeEnum.STRUCTURAL );
277    
278            // set superior objectClasses
279            array.clear();
280            array.add( "top" );
281            objectClass.setSuperClassIds( array.toArray( EMPTY ) );
282    
283            // set must list
284            array.clear();
285            array.add( "fullyQualifiedJavaClassName" );
286            array.add( "javaClassByteCode" );
287            objectClass.setMustListIds( array.toArray( EMPTY ) );
288    
289            // set may list
290            array.clear();
291            objectClass.setMayListIds( array.toArray( EMPTY ) );
292    
293            // set names
294            array.clear();
295            array.add( "javaClass" );
296            objectClass.setNames( array.toArray( EMPTY ) );
297            cb.schemaObjectProduced( this, "1.3.6.1.4.1.18060.0.4.1.3.8", objectClass );
298            // --------------------------------------------------------------------
299            // ObjectClass 1.3.6.1.4.1.18060.0.4.1.5.3 
300            // --------------------------------------------------------------------
301    
302            objectClass = newObjectClass( "1.3.6.1.4.1.18060.0.4.1.5.3", registries );
303            objectClass.setObsolete( false );
304    
305            // set the objectclass type
306            objectClass.setType( ObjectClassTypeEnum.ABSTRACT );
307    
308            // set superior objectClasses
309            array.clear();
310            array.add( "top" );
311            objectClass.setSuperClassIds( array.toArray( EMPTY ) );
312    
313            // set must list
314            array.clear();
315            array.add( "storedProcLangId" );
316            array.add( "storedProcUnitName" );
317            objectClass.setMustListIds( array.toArray( EMPTY ) );
318    
319            // set may list
320            array.clear();
321            objectClass.setMayListIds( array.toArray( EMPTY ) );
322    
323            // set names
324            array.clear();
325            array.add( "storedProcUnit" );
326            objectClass.setNames( array.toArray( EMPTY ) );
327            cb.schemaObjectProduced( this, "1.3.6.1.4.1.18060.0.4.1.5.3", objectClass );
328            // --------------------------------------------------------------------
329            // ObjectClass 1.3.6.1.4.1.18060.0.4.1.5.5 
330            // --------------------------------------------------------------------
331    
332            objectClass = newObjectClass( "1.3.6.1.4.1.18060.0.4.1.5.5", registries );
333            objectClass.setObsolete( false );
334    
335            // set the objectclass type
336            objectClass.setType( ObjectClassTypeEnum.STRUCTURAL );
337    
338            // set superior objectClasses
339            array.clear();
340            array.add( "storedProcUnit" );
341            objectClass.setSuperClassIds( array.toArray( EMPTY ) );
342    
343            // set must list
344            array.clear();
345            array.add( "javaByteCode" );
346            objectClass.setMustListIds( array.toArray( EMPTY ) );
347    
348            // set may list
349            array.clear();
350            objectClass.setMayListIds( array.toArray( EMPTY ) );
351    
352            // set names
353            array.clear();
354            array.add( "javaStoredProcUnit" );
355            objectClass.setNames( array.toArray( EMPTY ) );
356            cb.schemaObjectProduced( this, "1.3.6.1.4.1.18060.0.4.1.5.5", objectClass );
357            // --------------------------------------------------------------------
358            // ObjectClass 1.3.6.1.4.1.18060.0.4.1.5.8 
359            // --------------------------------------------------------------------
360    
361            objectClass = newObjectClass( "1.3.6.1.4.1.18060.0.4.1.5.8", registries );
362            objectClass.setObsolete( false );
363    
364            // set the objectclass type
365            objectClass.setType( ObjectClassTypeEnum.STRUCTURAL );
366    
367            // set superior objectClasses
368            array.clear();
369            array.add( "storedProcUnit" );
370            objectClass.setSuperClassIds( array.toArray( EMPTY ) );
371    
372            // set must list
373            array.clear();
374            array.add( "javaxScriptLangId" );
375            array.add( "javaxScriptCode" );
376            objectClass.setMustListIds( array.toArray( EMPTY ) );
377    
378            // set may list
379            array.clear();
380            objectClass.setMayListIds( array.toArray( EMPTY ) );
381    
382            // set names
383            array.clear();
384            array.add( "javaxScriptStoredProcUnit" );
385            objectClass.setNames( array.toArray( EMPTY ) );
386            cb.schemaObjectProduced( this, "1.3.6.1.4.1.18060.0.4.1.5.8", objectClass );
387            // --------------------------------------------------------------------
388            // ObjectClass 1.3.6.1.4.1.18060.0.4.1.2.28 
389            // --------------------------------------------------------------------
390    
391            objectClass = newObjectClass( "1.3.6.1.4.1.18060.0.4.1.2.28", registries );
392            objectClass.setObsolete( false );
393    
394            objectClass.setDescription( "Used to track a subentry associated with trigger areas" );
395            // set the objectclass type
396            objectClass.setType( ObjectClassTypeEnum.AUXILIARY );
397    
398            // set superior objectClasses
399            array.clear();
400            objectClass.setSuperClassIds( array.toArray( EMPTY ) );
401    
402            // set must list
403            array.clear();
404            array.add( "prescriptiveTriggerSpecification" );
405            objectClass.setMustListIds( array.toArray( EMPTY ) );
406    
407            // set may list
408            array.clear();
409            objectClass.setMayListIds( array.toArray( EMPTY ) );
410    
411            // set names
412            array.clear();
413            array.add( "triggerExecutionSubentry" );
414            objectClass.setNames( array.toArray( EMPTY ) );
415            cb.schemaObjectProduced( this, "1.3.6.1.4.1.18060.0.4.1.2.28", objectClass );
416            // --------------------------------------------------------------------
417            // ObjectClass 1.3.6.1.4.1.18060.0.4.1.3.9 
418            // --------------------------------------------------------------------
419    
420            objectClass = newObjectClass( "1.3.6.1.4.1.18060.0.4.1.3.9", registries );
421            objectClass.setObsolete( false );
422    
423            objectClass.setDescription( "RFC2252 extension for controlling subschema (sub)entry in ApacheDS" );
424            // set the objectclass type
425            objectClass.setType( ObjectClassTypeEnum.AUXILIARY );
426    
427            // set superior objectClasses
428            array.clear();
429            array.add( "subschema" );
430            objectClass.setSuperClassIds( array.toArray( EMPTY ) );
431    
432            // set must list
433            array.clear();
434            objectClass.setMustListIds( array.toArray( EMPTY ) );
435    
436            // set may list
437            array.clear();
438            array.add( "comparators" );
439            array.add( "normalizers" );
440            array.add( "syntaxCheckers" );
441            objectClass.setMayListIds( array.toArray( EMPTY ) );
442    
443            // set names
444            array.clear();
445            array.add( "apacheSubschema" );
446            objectClass.setNames( array.toArray( EMPTY ) );
447            cb.schemaObjectProduced( this, "1.3.6.1.4.1.18060.0.4.1.3.9", objectClass );
448            // --------------------------------------------------------------------
449            // ObjectClass 1.3.6.1.4.1.18060.0.4.1.3.10 
450            // --------------------------------------------------------------------
451    
452            objectClass = newObjectClass( "1.3.6.1.4.1.18060.0.4.1.3.10", registries );
453            objectClass.setObsolete( false );
454    
455            objectClass.setDescription( "a special entry tracking schema modification attributes" );
456            // set the objectclass type
457            objectClass.setType( ObjectClassTypeEnum.STRUCTURAL );
458    
459            // set superior objectClasses
460            array.clear();
461            array.add( "top" );
462            objectClass.setSuperClassIds( array.toArray( EMPTY ) );
463    
464            // set must list
465            array.clear();
466            array.add( "cn" );
467            array.add( "subschemaSubentryName" );
468            array.add( "schemaModifyTimestamp" );
469            array.add( "schemaModifiersName" );
470            objectClass.setMustListIds( array.toArray( EMPTY ) );
471    
472            // set may list
473            array.clear();
474            objectClass.setMayListIds( array.toArray( EMPTY ) );
475    
476            // set names
477            array.clear();
478            array.add( "schemaModificationAttributes" );
479            objectClass.setNames( array.toArray( EMPTY ) );
480            cb.schemaObjectProduced( this, "1.3.6.1.4.1.18060.0.4.1.3.10", objectClass );
481            // --------------------------------------------------------------------
482            // ObjectClass 1.3.6.1.4.1.18060.0.4.1.3.11 
483            // --------------------------------------------------------------------
484    
485            objectClass = newObjectClass( "1.3.6.1.4.1.18060.0.4.1.3.11", registries );
486            objectClass.setObsolete( false );
487    
488            // set the objectclass type
489            objectClass.setType( ObjectClassTypeEnum.AUXILIARY );
490    
491            // set superior objectClasses
492            array.clear();
493            array.add( "top" );
494            objectClass.setSuperClassIds( array.toArray( EMPTY ) );
495    
496            // set must list
497            array.clear();
498            array.add( "privateKeyFormat" );
499            array.add( "keyAlgorithm" );
500            array.add( "privateKey" );
501            array.add( "publicKeyFormat" );
502            array.add( "publicKey" );
503            objectClass.setMustListIds( array.toArray( EMPTY ) );
504    
505            // set may list
506            array.clear();
507            objectClass.setMayListIds( array.toArray( EMPTY ) );
508    
509            // set names
510            array.clear();
511            array.add( "tlsKeyInfo" );
512            objectClass.setNames( array.toArray( EMPTY ) );
513            cb.schemaObjectProduced( this, "1.3.6.1.4.1.18060.0.4.1.3.11", objectClass );
514            // --------------------------------------------------------------------
515            // ObjectClass 1.3.6.1.4.1.18060.0.4.1.3.12 
516            // --------------------------------------------------------------------
517    
518            objectClass = newObjectClass( "1.3.6.1.4.1.18060.0.4.1.3.12", registries );
519            objectClass.setObsolete( false );
520    
521            objectClass.setDescription( "represents change events" );
522            // set the objectclass type
523            objectClass.setType( ObjectClassTypeEnum.STRUCTURAL );
524    
525            // set superior objectClasses
526            array.clear();
527            objectClass.setSuperClassIds( array.toArray( EMPTY ) );
528    
529            // set must list
530            array.clear();
531            array.add( "changeTime" );
532            array.add( "changeType" );
533            array.add( "rev" );
534            array.add( "committer" );
535            objectClass.setMustListIds( array.toArray( EMPTY ) );
536    
537            // set may list
538            array.clear();
539            objectClass.setMayListIds( array.toArray( EMPTY ) );
540    
541            // set names
542            array.clear();
543            array.add( "changeLogEvent" );
544            objectClass.setNames( array.toArray( EMPTY ) );
545            cb.schemaObjectProduced( this, "1.3.6.1.4.1.18060.0.4.1.3.12", objectClass );
546            // --------------------------------------------------------------------
547            // ObjectClass 1.3.6.1.4.1.18060.0.4.1.3.13 
548            // --------------------------------------------------------------------
549    
550            objectClass = newObjectClass( "1.3.6.1.4.1.18060.0.4.1.3.13", registries );
551            objectClass.setObsolete( false );
552    
553            objectClass.setDescription( "represents a Tag in change log" );
554            // set the objectclass type
555            objectClass.setType( ObjectClassTypeEnum.STRUCTURAL );
556    
557            // set superior objectClasses
558            array.clear();
559            objectClass.setSuperClassIds( array.toArray( EMPTY ) );
560    
561            // set must list
562            array.clear();
563            array.add( "rev" );
564            objectClass.setMustListIds( array.toArray( EMPTY ) );
565    
566            // set may list
567            array.clear();
568            array.add( "description" );
569            objectClass.setMayListIds( array.toArray( EMPTY ) );
570    
571            // set names
572            array.clear();
573            array.add( "tag" );
574            objectClass.setNames( array.toArray( EMPTY ) );
575            cb.schemaObjectProduced( this, "1.3.6.1.4.1.18060.0.4.1.3.13", objectClass );
576        }
577    }