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 mozilla 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 MozillaAttributeTypeProducer extends AbstractBootstrapProducer
040    {
041    
042        public MozillaAttributeTypeProducer()
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.13769.2.1.1 
065            // --------------------------------------------------------------------
066    
067            attributeType = newAttributeType( "1.3.6.1.4.1.13769.2.1.1", registries );
068            attributeType.setCanUserModify( ! false );
069            attributeType.setSingleValue( false );
070            attributeType.setCollective( false );
071            attributeType.setObsolete( false );
072            attributeType.setLength( 0 );
073            attributeType.setUsage( UsageEnum.getUsage( "USER_APPLICATIONS" ) );
074            attributeType.setSuperiorId( "name" );
075    
076            names.clear();
077            names.add( "xmozillanickname" );
078            names.add( "mozillaNickname" );
079            attributeType.setNames( names.toArray( EMPTY ) );
080            cb.schemaObjectProduced( this, "1.3.6.1.4.1.13769.2.1.1", attributeType );
081    
082            // --------------------------------------------------------------------
083            // AttributeType 1.3.6.1.4.1.13769.2.1.2 
084            // --------------------------------------------------------------------
085    
086            attributeType = newAttributeType( "1.3.6.1.4.1.13769.2.1.2", registries );
087            attributeType.setCanUserModify( ! false );
088            attributeType.setSingleValue( true );
089            attributeType.setCollective( false );
090            attributeType.setObsolete( false );
091            attributeType.setLength( 0 );
092            attributeType.setUsage( UsageEnum.getUsage( "USER_APPLICATIONS" ) );
093            attributeType.setSyntaxId( "1.3.6.1.4.1.1466.115.121.1.7" );
094    
095            names.clear();
096            names.add( "xmozillausehtmlmail" );
097            names.add( "mozillaUseHtmlMail" );
098            attributeType.setNames( names.toArray( EMPTY ) );
099            cb.schemaObjectProduced( this, "1.3.6.1.4.1.13769.2.1.2", attributeType );
100    
101            // --------------------------------------------------------------------
102            // AttributeType 1.3.6.1.4.1.13769.2.1.3 
103            // --------------------------------------------------------------------
104    
105            attributeType = newAttributeType( "1.3.6.1.4.1.13769.2.1.3", registries );
106            attributeType.setCanUserModify( ! false );
107            attributeType.setSingleValue( false );
108            attributeType.setCollective( false );
109            attributeType.setObsolete( false );
110            attributeType.setLength( 256 );
111            attributeType.setUsage( UsageEnum.getUsage( "USER_APPLICATIONS" ) );
112            attributeType.setEqualityId( "caseIgnoreIA5Match" );
113            attributeType.setSubstrId( "caseIgnoreIA5SubstringsMatch" );
114            attributeType.setSyntaxId( "1.3.6.1.4.1.1466.115.121.1.26" );
115    
116            names.clear();
117            names.add( "mozillaSecondEmail" );
118            attributeType.setNames( names.toArray( EMPTY ) );
119            cb.schemaObjectProduced( this, "1.3.6.1.4.1.13769.2.1.3", attributeType );
120    
121            // --------------------------------------------------------------------
122            // AttributeType 1.3.6.1.4.1.13769.2.1.4 
123            // --------------------------------------------------------------------
124    
125            attributeType = newAttributeType( "1.3.6.1.4.1.13769.2.1.4", registries );
126            attributeType.setCanUserModify( ! false );
127            attributeType.setSingleValue( false );
128            attributeType.setCollective( false );
129            attributeType.setObsolete( false );
130            attributeType.setLength( 128 );
131            attributeType.setUsage( UsageEnum.getUsage( "USER_APPLICATIONS" ) );
132            attributeType.setEqualityId( "caseIgnoreMatch" );
133            attributeType.setSubstrId( "caseIgnoreSubstringsMatch" );
134            attributeType.setSyntaxId( "1.3.6.1.4.1.1466.115.121.1.15" );
135    
136            names.clear();
137            names.add( "mozillaHomeLocalityName" );
138            attributeType.setNames( names.toArray( EMPTY ) );
139            cb.schemaObjectProduced( this, "1.3.6.1.4.1.13769.2.1.4", attributeType );
140    
141            // --------------------------------------------------------------------
142            // AttributeType 1.3.6.1.4.1.13769.2.1.5 
143            // --------------------------------------------------------------------
144    
145            attributeType = newAttributeType( "1.3.6.1.4.1.13769.2.1.5", registries );
146            attributeType.setCanUserModify( ! false );
147            attributeType.setSingleValue( false );
148            attributeType.setCollective( false );
149            attributeType.setObsolete( false );
150            attributeType.setLength( 0 );
151            attributeType.setUsage( UsageEnum.getUsage( "USER_APPLICATIONS" ) );
152            attributeType.setEqualityId( "caseIgnoreListMatch" );
153            attributeType.setSubstrId( "caseIgnoreListSubstringsMatch" );
154            attributeType.setSyntaxId( "1.3.6.1.4.1.1466.115.121.1.41" );
155    
156            names.clear();
157            names.add( "mozillaPostalAddress2" );
158            attributeType.setNames( names.toArray( EMPTY ) );
159            cb.schemaObjectProduced( this, "1.3.6.1.4.1.13769.2.1.5", attributeType );
160    
161            // --------------------------------------------------------------------
162            // AttributeType 1.3.6.1.4.1.13769.2.1.6 
163            // --------------------------------------------------------------------
164    
165            attributeType = newAttributeType( "1.3.6.1.4.1.13769.2.1.6", registries );
166            attributeType.setCanUserModify( ! false );
167            attributeType.setSingleValue( false );
168            attributeType.setCollective( false );
169            attributeType.setObsolete( false );
170            attributeType.setLength( 0 );
171            attributeType.setUsage( UsageEnum.getUsage( "USER_APPLICATIONS" ) );
172            attributeType.setEqualityId( "caseIgnoreListMatch" );
173            attributeType.setSubstrId( "caseIgnoreListSubstringsMatch" );
174            attributeType.setSyntaxId( "1.3.6.1.4.1.1466.115.121.1.41" );
175    
176            names.clear();
177            names.add( "mozillaHomePostalAddress2" );
178            attributeType.setNames( names.toArray( EMPTY ) );
179            cb.schemaObjectProduced( this, "1.3.6.1.4.1.13769.2.1.6", attributeType );
180    
181            // --------------------------------------------------------------------
182            // AttributeType 1.3.6.1.4.1.13769.2.1.7 
183            // --------------------------------------------------------------------
184    
185            attributeType = newAttributeType( "1.3.6.1.4.1.13769.2.1.7", registries );
186            attributeType.setCanUserModify( ! false );
187            attributeType.setSingleValue( false );
188            attributeType.setCollective( false );
189            attributeType.setObsolete( false );
190            attributeType.setLength( 0 );
191            attributeType.setUsage( UsageEnum.getUsage( "USER_APPLICATIONS" ) );
192            attributeType.setSuperiorId( "name" );
193    
194            names.clear();
195            names.add( "mozillaHomeState" );
196            attributeType.setNames( names.toArray( EMPTY ) );
197            cb.schemaObjectProduced( this, "1.3.6.1.4.1.13769.2.1.7", attributeType );
198    
199            // --------------------------------------------------------------------
200            // AttributeType 1.3.6.1.4.1.13769.2.1.8 
201            // --------------------------------------------------------------------
202    
203            attributeType = newAttributeType( "1.3.6.1.4.1.13769.2.1.8", registries );
204            attributeType.setCanUserModify( ! false );
205            attributeType.setSingleValue( false );
206            attributeType.setCollective( false );
207            attributeType.setObsolete( false );
208            attributeType.setLength( 40 );
209            attributeType.setUsage( UsageEnum.getUsage( "USER_APPLICATIONS" ) );
210            attributeType.setEqualityId( "caseIgnoreMatch" );
211            attributeType.setSubstrId( "caseIgnoreSubstringsMatch" );
212            attributeType.setSyntaxId( "1.3.6.1.4.1.1466.115.121.1.15" );
213    
214            names.clear();
215            names.add( "mozillaHomePostalCode" );
216            attributeType.setNames( names.toArray( EMPTY ) );
217            cb.schemaObjectProduced( this, "1.3.6.1.4.1.13769.2.1.8", attributeType );
218    
219            // --------------------------------------------------------------------
220            // AttributeType 1.3.6.1.4.1.13769.2.1.9 
221            // --------------------------------------------------------------------
222    
223            attributeType = newAttributeType( "1.3.6.1.4.1.13769.2.1.9", registries );
224            attributeType.setCanUserModify( ! false );
225            attributeType.setSingleValue( true );
226            attributeType.setCollective( false );
227            attributeType.setObsolete( false );
228            attributeType.setLength( 0 );
229            attributeType.setUsage( UsageEnum.getUsage( "USER_APPLICATIONS" ) );
230            attributeType.setSuperiorId( "name" );
231    
232            names.clear();
233            names.add( "mozillaHomeCountryName" );
234            attributeType.setNames( names.toArray( EMPTY ) );
235            cb.schemaObjectProduced( this, "1.3.6.1.4.1.13769.2.1.9", attributeType );
236    
237            // --------------------------------------------------------------------
238            // AttributeType 1.3.6.1.4.1.13769.2.1.10 
239            // --------------------------------------------------------------------
240    
241            attributeType = newAttributeType( "1.3.6.1.4.1.13769.2.1.10", registries );
242            attributeType.setCanUserModify( ! false );
243            attributeType.setSingleValue( false );
244            attributeType.setCollective( false );
245            attributeType.setObsolete( false );
246            attributeType.setLength( 0 );
247            attributeType.setUsage( UsageEnum.getUsage( "USER_APPLICATIONS" ) );
248            attributeType.setEqualityId( "caseIgnoreMatch" );
249            attributeType.setSubstrId( "caseIgnoreSubstringsMatch" );
250            attributeType.setSyntaxId( "1.3.6.1.4.1.1466.115.121.1.15" );
251    
252            names.clear();
253            names.add( "mozillaHomeFriendlyCountryName" );
254            attributeType.setNames( names.toArray( EMPTY ) );
255            cb.schemaObjectProduced( this, "1.3.6.1.4.1.13769.2.1.10", attributeType );
256    
257            // --------------------------------------------------------------------
258            // AttributeType 1.3.6.1.4.1.13769.2.1.11 
259            // --------------------------------------------------------------------
260    
261            attributeType = newAttributeType( "1.3.6.1.4.1.13769.2.1.11", registries );
262            attributeType.setCanUserModify( ! false );
263            attributeType.setSingleValue( false );
264            attributeType.setCollective( false );
265            attributeType.setObsolete( false );
266            attributeType.setLength( 256 );
267            attributeType.setUsage( UsageEnum.getUsage( "USER_APPLICATIONS" ) );
268            attributeType.setEqualityId( "caseIgnoreIA5Match" );
269            attributeType.setSubstrId( "caseIgnoreIA5SubstringsMatch" );
270            attributeType.setSyntaxId( "1.3.6.1.4.1.1466.115.121.1.26" );
271    
272            names.clear();
273            names.add( "homeurl" );
274            names.add( "mozillaHomeUrl" );
275            attributeType.setNames( names.toArray( EMPTY ) );
276            cb.schemaObjectProduced( this, "1.3.6.1.4.1.13769.2.1.11", attributeType );
277    
278            // --------------------------------------------------------------------
279            // AttributeType 1.3.6.1.4.1.13769.2.1.12 
280            // --------------------------------------------------------------------
281    
282            attributeType = newAttributeType( "1.3.6.1.4.1.13769.2.1.12", registries );
283            attributeType.setCanUserModify( ! false );
284            attributeType.setSingleValue( false );
285            attributeType.setCollective( false );
286            attributeType.setObsolete( false );
287            attributeType.setLength( 256 );
288            attributeType.setUsage( UsageEnum.getUsage( "USER_APPLICATIONS" ) );
289            attributeType.setEqualityId( "caseIgnoreIA5Match" );
290            attributeType.setSubstrId( "caseIgnoreIA5SubstringsMatch" );
291            attributeType.setSyntaxId( "1.3.6.1.4.1.1466.115.121.1.26" );
292    
293            names.clear();
294            names.add( "workurl" );
295            names.add( "mozillaWorkUrl" );
296            attributeType.setNames( names.toArray( EMPTY ) );
297            cb.schemaObjectProduced( this, "1.3.6.1.4.1.13769.2.1.12", attributeType );
298    
299            // --------------------------------------------------------------------
300            // AttributeType 1.3.6.1.4.1.13769.2.1.13 
301            // --------------------------------------------------------------------
302    
303            attributeType = newAttributeType( "1.3.6.1.4.1.13769.2.1.13", registries );
304            attributeType.setDescription( "AOL Instant Messenger (AIM) Identity" );
305            attributeType.setCanUserModify( ! false );
306            attributeType.setSingleValue( false );
307            attributeType.setCollective( false );
308            attributeType.setObsolete( false );
309            attributeType.setLength( 0 );
310            attributeType.setUsage( UsageEnum.getUsage( "USER_APPLICATIONS" ) );
311            attributeType.setEqualityId( "telephoneNumberMatch" );
312            attributeType.setSubstrId( "telephoneNumberSubstringsMatch" );
313            attributeType.setSyntaxId( "1.3.6.1.4.1.1466.115.121.1.50" );
314    
315            names.clear();
316            names.add( "nsAIMid" );
317            attributeType.setNames( names.toArray( EMPTY ) );
318            cb.schemaObjectProduced( this, "1.3.6.1.4.1.13769.2.1.13", attributeType );
319    
320            // --------------------------------------------------------------------
321            // AttributeType 1.3.6.1.4.1.13769.2.1.96 
322            // --------------------------------------------------------------------
323    
324            attributeType = newAttributeType( "1.3.6.1.4.1.13769.2.1.96", registries );
325            attributeType.setCanUserModify( ! false );
326            attributeType.setSingleValue( true );
327            attributeType.setCollective( false );
328            attributeType.setObsolete( false );
329            attributeType.setLength( 0 );
330            attributeType.setUsage( UsageEnum.getUsage( "USER_APPLICATIONS" ) );
331            attributeType.setSyntaxId( "1.3.6.1.4.1.1466.115.121.1.26" );
332    
333            names.clear();
334            names.add( "custom1" );
335            names.add( "mozillaCustom1" );
336            attributeType.setNames( names.toArray( EMPTY ) );
337            cb.schemaObjectProduced( this, "1.3.6.1.4.1.13769.2.1.96", attributeType );
338    
339            // --------------------------------------------------------------------
340            // AttributeType 1.3.6.1.4.1.13769.2.1.97 
341            // --------------------------------------------------------------------
342    
343            attributeType = newAttributeType( "1.3.6.1.4.1.13769.2.1.97", registries );
344            attributeType.setCanUserModify( ! false );
345            attributeType.setSingleValue( true );
346            attributeType.setCollective( false );
347            attributeType.setObsolete( false );
348            attributeType.setLength( 0 );
349            attributeType.setUsage( UsageEnum.getUsage( "USER_APPLICATIONS" ) );
350            attributeType.setSyntaxId( "1.3.6.1.4.1.1466.115.121.1.26" );
351    
352            names.clear();
353            names.add( "custom2" );
354            names.add( "mozillaCustom2" );
355            attributeType.setNames( names.toArray( EMPTY ) );
356            cb.schemaObjectProduced( this, "1.3.6.1.4.1.13769.2.1.97", attributeType );
357    
358            // --------------------------------------------------------------------
359            // AttributeType 1.3.6.1.4.1.13769.2.1.98 
360            // --------------------------------------------------------------------
361    
362            attributeType = newAttributeType( "1.3.6.1.4.1.13769.2.1.98", registries );
363            attributeType.setCanUserModify( ! false );
364            attributeType.setSingleValue( true );
365            attributeType.setCollective( false );
366            attributeType.setObsolete( false );
367            attributeType.setLength( 0 );
368            attributeType.setUsage( UsageEnum.getUsage( "USER_APPLICATIONS" ) );
369            attributeType.setSyntaxId( "1.3.6.1.4.1.1466.115.121.1.26" );
370    
371            names.clear();
372            names.add( "custom3" );
373            names.add( "mozillaCustom3" );
374            attributeType.setNames( names.toArray( EMPTY ) );
375            cb.schemaObjectProduced( this, "1.3.6.1.4.1.13769.2.1.98", attributeType );
376    
377            // --------------------------------------------------------------------
378            // AttributeType 1.3.6.1.4.1.13769.2.1.99 
379            // --------------------------------------------------------------------
380    
381            attributeType = newAttributeType( "1.3.6.1.4.1.13769.2.1.99", registries );
382            attributeType.setCanUserModify( ! false );
383            attributeType.setSingleValue( true );
384            attributeType.setCollective( false );
385            attributeType.setObsolete( false );
386            attributeType.setLength( 0 );
387            attributeType.setUsage( UsageEnum.getUsage( "USER_APPLICATIONS" ) );
388            attributeType.setSyntaxId( "1.3.6.1.4.1.1466.115.121.1.26" );
389    
390            names.clear();
391            names.add( "custom4" );
392            names.add( "mozillaCustom4" );
393            attributeType.setNames( names.toArray( EMPTY ) );
394            cb.schemaObjectProduced( this, "1.3.6.1.4.1.13769.2.1.99", attributeType );
395        }
396    }