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 collective 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 CollectiveAttributeTypeProducer extends AbstractBootstrapProducer
040    {
041    
042        public CollectiveAttributeTypeProducer()
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 2.5.4.7.1 
065            // --------------------------------------------------------------------
066    
067            attributeType = newAttributeType( "2.5.4.7.1", registries );
068            attributeType.setCanUserModify( ! false );
069            attributeType.setSingleValue( false );
070            attributeType.setCollective( true );
071            attributeType.setObsolete( false );
072            attributeType.setLength( 0 );
073            attributeType.setUsage( UsageEnum.getUsage( "USER_APPLICATIONS" ) );
074            attributeType.setSuperiorId( "l" );
075    
076            names.clear();
077            names.add( "c-l" );
078            attributeType.setNames( names.toArray( EMPTY ) );
079            cb.schemaObjectProduced( this, "2.5.4.7.1", attributeType );
080    
081            // --------------------------------------------------------------------
082            // AttributeType 2.5.4.8.1 
083            // --------------------------------------------------------------------
084    
085            attributeType = newAttributeType( "2.5.4.8.1", registries );
086            attributeType.setCanUserModify( ! false );
087            attributeType.setSingleValue( false );
088            attributeType.setCollective( true );
089            attributeType.setObsolete( false );
090            attributeType.setLength( 0 );
091            attributeType.setUsage( UsageEnum.getUsage( "USER_APPLICATIONS" ) );
092            attributeType.setSuperiorId( "st" );
093    
094            names.clear();
095            names.add( "c-st" );
096            attributeType.setNames( names.toArray( EMPTY ) );
097            cb.schemaObjectProduced( this, "2.5.4.8.1", attributeType );
098    
099            // --------------------------------------------------------------------
100            // AttributeType 2.5.4.9.1 
101            // --------------------------------------------------------------------
102    
103            attributeType = newAttributeType( "2.5.4.9.1", registries );
104            attributeType.setCanUserModify( ! false );
105            attributeType.setSingleValue( false );
106            attributeType.setCollective( true );
107            attributeType.setObsolete( false );
108            attributeType.setLength( 0 );
109            attributeType.setUsage( UsageEnum.getUsage( "USER_APPLICATIONS" ) );
110            attributeType.setSuperiorId( "street" );
111    
112            names.clear();
113            names.add( "c-street" );
114            attributeType.setNames( names.toArray( EMPTY ) );
115            cb.schemaObjectProduced( this, "2.5.4.9.1", attributeType );
116    
117            // --------------------------------------------------------------------
118            // AttributeType 2.5.4.10.1 
119            // --------------------------------------------------------------------
120    
121            attributeType = newAttributeType( "2.5.4.10.1", registries );
122            attributeType.setCanUserModify( ! false );
123            attributeType.setSingleValue( false );
124            attributeType.setCollective( true );
125            attributeType.setObsolete( false );
126            attributeType.setLength( 0 );
127            attributeType.setUsage( UsageEnum.getUsage( "USER_APPLICATIONS" ) );
128            attributeType.setSuperiorId( "o" );
129    
130            names.clear();
131            names.add( "c-o" );
132            attributeType.setNames( names.toArray( EMPTY ) );
133            cb.schemaObjectProduced( this, "2.5.4.10.1", attributeType );
134    
135            // --------------------------------------------------------------------
136            // AttributeType 2.5.4.11.1 
137            // --------------------------------------------------------------------
138    
139            attributeType = newAttributeType( "2.5.4.11.1", registries );
140            attributeType.setCanUserModify( ! false );
141            attributeType.setSingleValue( false );
142            attributeType.setCollective( true );
143            attributeType.setObsolete( false );
144            attributeType.setLength( 0 );
145            attributeType.setUsage( UsageEnum.getUsage( "USER_APPLICATIONS" ) );
146            attributeType.setSuperiorId( "ou" );
147    
148            names.clear();
149            names.add( "c-ou" );
150            attributeType.setNames( names.toArray( EMPTY ) );
151            cb.schemaObjectProduced( this, "2.5.4.11.1", attributeType );
152    
153            // --------------------------------------------------------------------
154            // AttributeType 2.5.4.16.1 
155            // --------------------------------------------------------------------
156    
157            attributeType = newAttributeType( "2.5.4.16.1", registries );
158            attributeType.setCanUserModify( ! false );
159            attributeType.setSingleValue( false );
160            attributeType.setCollective( true );
161            attributeType.setObsolete( false );
162            attributeType.setLength( 0 );
163            attributeType.setUsage( UsageEnum.getUsage( "USER_APPLICATIONS" ) );
164            attributeType.setSuperiorId( "postalAddress" );
165    
166            names.clear();
167            names.add( "c-PostalAddress" );
168            attributeType.setNames( names.toArray( EMPTY ) );
169            cb.schemaObjectProduced( this, "2.5.4.16.1", attributeType );
170    
171            // --------------------------------------------------------------------
172            // AttributeType 2.5.4.17.1 
173            // --------------------------------------------------------------------
174    
175            attributeType = newAttributeType( "2.5.4.17.1", registries );
176            attributeType.setCanUserModify( ! false );
177            attributeType.setSingleValue( false );
178            attributeType.setCollective( true );
179            attributeType.setObsolete( false );
180            attributeType.setLength( 0 );
181            attributeType.setUsage( UsageEnum.getUsage( "USER_APPLICATIONS" ) );
182            attributeType.setSuperiorId( "postalCode" );
183    
184            names.clear();
185            names.add( "c-PostalCode" );
186            attributeType.setNames( names.toArray( EMPTY ) );
187            cb.schemaObjectProduced( this, "2.5.4.17.1", attributeType );
188    
189            // --------------------------------------------------------------------
190            // AttributeType 2.5.4.18.1 
191            // --------------------------------------------------------------------
192    
193            attributeType = newAttributeType( "2.5.4.18.1", registries );
194            attributeType.setCanUserModify( ! false );
195            attributeType.setSingleValue( false );
196            attributeType.setCollective( true );
197            attributeType.setObsolete( false );
198            attributeType.setLength( 0 );
199            attributeType.setUsage( UsageEnum.getUsage( "USER_APPLICATIONS" ) );
200            attributeType.setSuperiorId( "postOfficeBox" );
201    
202            names.clear();
203            names.add( "c-PostOfficeBox" );
204            attributeType.setNames( names.toArray( EMPTY ) );
205            cb.schemaObjectProduced( this, "2.5.4.18.1", attributeType );
206    
207            // --------------------------------------------------------------------
208            // AttributeType 2.5.4.19.1 
209            // --------------------------------------------------------------------
210    
211            attributeType = newAttributeType( "2.5.4.19.1", registries );
212            attributeType.setCanUserModify( ! false );
213            attributeType.setSingleValue( false );
214            attributeType.setCollective( true );
215            attributeType.setObsolete( false );
216            attributeType.setLength( 0 );
217            attributeType.setUsage( UsageEnum.getUsage( "USER_APPLICATIONS" ) );
218            attributeType.setSuperiorId( "physicalDeliveryOfficeName" );
219    
220            names.clear();
221            names.add( "c-PhysicalDeliveryOfficeName" );
222            attributeType.setNames( names.toArray( EMPTY ) );
223            cb.schemaObjectProduced( this, "2.5.4.19.1", attributeType );
224    
225            // --------------------------------------------------------------------
226            // AttributeType 2.5.4.20.1 
227            // --------------------------------------------------------------------
228    
229            attributeType = newAttributeType( "2.5.4.20.1", registries );
230            attributeType.setCanUserModify( ! false );
231            attributeType.setSingleValue( false );
232            attributeType.setCollective( true );
233            attributeType.setObsolete( false );
234            attributeType.setLength( 0 );
235            attributeType.setUsage( UsageEnum.getUsage( "USER_APPLICATIONS" ) );
236            attributeType.setSuperiorId( "telephoneNumber" );
237    
238            names.clear();
239            names.add( "c-TelephoneNumber" );
240            attributeType.setNames( names.toArray( EMPTY ) );
241            cb.schemaObjectProduced( this, "2.5.4.20.1", attributeType );
242    
243            // --------------------------------------------------------------------
244            // AttributeType 2.5.4.21.1 
245            // --------------------------------------------------------------------
246    
247            attributeType = newAttributeType( "2.5.4.21.1", registries );
248            attributeType.setCanUserModify( ! false );
249            attributeType.setSingleValue( false );
250            attributeType.setCollective( true );
251            attributeType.setObsolete( false );
252            attributeType.setLength( 0 );
253            attributeType.setUsage( UsageEnum.getUsage( "USER_APPLICATIONS" ) );
254            attributeType.setSuperiorId( "telexNumber" );
255    
256            names.clear();
257            names.add( "c-TelexNumber" );
258            attributeType.setNames( names.toArray( EMPTY ) );
259            cb.schemaObjectProduced( this, "2.5.4.21.1", attributeType );
260    
261            // --------------------------------------------------------------------
262            // AttributeType 2.5.4.23.1 
263            // --------------------------------------------------------------------
264    
265            attributeType = newAttributeType( "2.5.4.23.1", registries );
266            attributeType.setCanUserModify( ! false );
267            attributeType.setSingleValue( false );
268            attributeType.setCollective( true );
269            attributeType.setObsolete( false );
270            attributeType.setLength( 0 );
271            attributeType.setUsage( UsageEnum.getUsage( "USER_APPLICATIONS" ) );
272            attributeType.setSuperiorId( "facsimileTelephoneNumber" );
273    
274            names.clear();
275            names.add( "c-FacsimileTelephoneNumber" );
276            attributeType.setNames( names.toArray( EMPTY ) );
277            cb.schemaObjectProduced( this, "2.5.4.23.1", attributeType );
278    
279            // --------------------------------------------------------------------
280            // AttributeType 2.5.4.25.1 
281            // --------------------------------------------------------------------
282    
283            attributeType = newAttributeType( "2.5.4.25.1", registries );
284            attributeType.setCanUserModify( ! false );
285            attributeType.setSingleValue( false );
286            attributeType.setCollective( true );
287            attributeType.setObsolete( false );
288            attributeType.setLength( 0 );
289            attributeType.setUsage( UsageEnum.getUsage( "USER_APPLICATIONS" ) );
290            attributeType.setSuperiorId( "internationalISDNNumber" );
291    
292            names.clear();
293            names.add( "c-InternationalISDNNumber" );
294            attributeType.setNames( names.toArray( EMPTY ) );
295            cb.schemaObjectProduced( this, "2.5.4.25.1", attributeType );
296        }
297    }