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 java 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 JavaAttributeTypeProducer extends AbstractBootstrapProducer
040    {
041    
042        public JavaAttributeTypeProducer()
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.42.2.27.4.1.6 
065            // --------------------------------------------------------------------
066    
067            attributeType = newAttributeType( "1.3.6.1.4.1.42.2.27.4.1.6", registries );
068            attributeType.setDescription( "Fully qualified name of distinguished Java class or interface" );
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( "caseExactMatch" );
076            attributeType.setSyntaxId( "1.3.6.1.4.1.1466.115.121.1.15" );
077    
078            names.clear();
079            names.add( "javaClassName" );
080            attributeType.setNames( names.toArray( EMPTY ) );
081            cb.schemaObjectProduced( this, "1.3.6.1.4.1.42.2.27.4.1.6", attributeType );
082    
083            // --------------------------------------------------------------------
084            // AttributeType 1.3.6.1.4.1.42.2.27.4.1.7 
085            // --------------------------------------------------------------------
086    
087            attributeType = newAttributeType( "1.3.6.1.4.1.42.2.27.4.1.7", registries );
088            attributeType.setDescription( "URL(s) specifying the location of class definition" );
089            attributeType.setCanUserModify( ! false );
090            attributeType.setSingleValue( false );
091            attributeType.setCollective( false );
092            attributeType.setObsolete( false );
093            attributeType.setLength( 0 );
094            attributeType.setUsage( UsageEnum.getUsage( "USER_APPLICATIONS" ) );
095            attributeType.setEqualityId( "caseExactIA5Match" );
096            attributeType.setSyntaxId( "1.3.6.1.4.1.1466.115.121.1.26" );
097    
098            names.clear();
099            names.add( "javaCodebase" );
100            attributeType.setNames( names.toArray( EMPTY ) );
101            cb.schemaObjectProduced( this, "1.3.6.1.4.1.42.2.27.4.1.7", attributeType );
102    
103            // --------------------------------------------------------------------
104            // AttributeType 1.3.6.1.4.1.42.2.27.4.1.13 
105            // --------------------------------------------------------------------
106    
107            attributeType = newAttributeType( "1.3.6.1.4.1.42.2.27.4.1.13", registries );
108            attributeType.setDescription( "Fully qualified Java class or interface name" );
109            attributeType.setCanUserModify( ! false );
110            attributeType.setSingleValue( false );
111            attributeType.setCollective( false );
112            attributeType.setObsolete( false );
113            attributeType.setLength( 0 );
114            attributeType.setUsage( UsageEnum.getUsage( "USER_APPLICATIONS" ) );
115            attributeType.setEqualityId( "caseExactMatch" );
116            attributeType.setSyntaxId( "1.3.6.1.4.1.1466.115.121.1.15" );
117    
118            names.clear();
119            names.add( "javaClassNames" );
120            attributeType.setNames( names.toArray( EMPTY ) );
121            cb.schemaObjectProduced( this, "1.3.6.1.4.1.42.2.27.4.1.13", attributeType );
122    
123            // --------------------------------------------------------------------
124            // AttributeType 1.3.6.1.4.1.42.2.27.4.1.8 
125            // --------------------------------------------------------------------
126    
127            attributeType = newAttributeType( "1.3.6.1.4.1.42.2.27.4.1.8", registries );
128            attributeType.setDescription( "Serialized form of a Java object" );
129            attributeType.setCanUserModify( ! false );
130            attributeType.setSingleValue( true );
131            attributeType.setCollective( false );
132            attributeType.setObsolete( false );
133            attributeType.setLength( 0 );
134            attributeType.setUsage( UsageEnum.getUsage( "USER_APPLICATIONS" ) );
135            attributeType.setSyntaxId( "1.3.6.1.4.1.1466.115.121.1.40" );
136    
137            names.clear();
138            names.add( "javaSerializedData" );
139            attributeType.setNames( names.toArray( EMPTY ) );
140            cb.schemaObjectProduced( this, "1.3.6.1.4.1.42.2.27.4.1.8", attributeType );
141    
142            // --------------------------------------------------------------------
143            // AttributeType 1.3.6.1.4.1.42.2.27.4.1.10 
144            // --------------------------------------------------------------------
145    
146            attributeType = newAttributeType( "1.3.6.1.4.1.42.2.27.4.1.10", registries );
147            attributeType.setDescription( "Fully qualified Java class name of a JNDI object factory" );
148            attributeType.setCanUserModify( ! false );
149            attributeType.setSingleValue( true );
150            attributeType.setCollective( false );
151            attributeType.setObsolete( false );
152            attributeType.setLength( 0 );
153            attributeType.setUsage( UsageEnum.getUsage( "USER_APPLICATIONS" ) );
154            attributeType.setEqualityId( "caseExactMatch" );
155            attributeType.setSyntaxId( "1.3.6.1.4.1.1466.115.121.1.15" );
156    
157            names.clear();
158            names.add( "javaFactory" );
159            attributeType.setNames( names.toArray( EMPTY ) );
160            cb.schemaObjectProduced( this, "1.3.6.1.4.1.42.2.27.4.1.10", attributeType );
161    
162            // --------------------------------------------------------------------
163            // AttributeType 1.3.6.1.4.1.42.2.27.4.1.11 
164            // --------------------------------------------------------------------
165    
166            attributeType = newAttributeType( "1.3.6.1.4.1.42.2.27.4.1.11", registries );
167            attributeType.setDescription( "Addresses associated with a JNDI Reference" );
168            attributeType.setCanUserModify( ! false );
169            attributeType.setSingleValue( false );
170            attributeType.setCollective( false );
171            attributeType.setObsolete( false );
172            attributeType.setLength( 0 );
173            attributeType.setUsage( UsageEnum.getUsage( "USER_APPLICATIONS" ) );
174            attributeType.setEqualityId( "caseExactMatch" );
175            attributeType.setSyntaxId( "1.3.6.1.4.1.1466.115.121.1.15" );
176    
177            names.clear();
178            names.add( "javaReferenceAddress" );
179            attributeType.setNames( names.toArray( EMPTY ) );
180            cb.schemaObjectProduced( this, "1.3.6.1.4.1.42.2.27.4.1.11", attributeType );
181    
182            // --------------------------------------------------------------------
183            // AttributeType 1.3.6.1.4.1.42.2.27.4.1.12 
184            // --------------------------------------------------------------------
185    
186            attributeType = newAttributeType( "1.3.6.1.4.1.42.2.27.4.1.12", registries );
187            attributeType.setDescription( "The Java documentation for the class" );
188            attributeType.setCanUserModify( ! false );
189            attributeType.setSingleValue( false );
190            attributeType.setCollective( false );
191            attributeType.setObsolete( false );
192            attributeType.setLength( 0 );
193            attributeType.setUsage( UsageEnum.getUsage( "USER_APPLICATIONS" ) );
194            attributeType.setEqualityId( "caseExactIA5Match" );
195            attributeType.setSyntaxId( "1.3.6.1.4.1.1466.115.121.1.26" );
196    
197            names.clear();
198            names.add( "javaDoc" );
199            attributeType.setNames( names.toArray( EMPTY ) );
200            cb.schemaObjectProduced( this, "1.3.6.1.4.1.42.2.27.4.1.12", attributeType );
201        }
202    }