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 corba 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 CorbaAttributeTypeProducer extends AbstractBootstrapProducer
040 {
041
042 public CorbaAttributeTypeProducer()
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.14
065 // --------------------------------------------------------------------
066
067 attributeType = newAttributeType( "1.3.6.1.4.1.42.2.27.4.1.14", registries );
068 attributeType.setDescription( "Stringified interoperable object reference of a CORBA object" );
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( "corbaIor" );
080 attributeType.setNames( names.toArray( EMPTY ) );
081 cb.schemaObjectProduced( this, "1.3.6.1.4.1.42.2.27.4.1.14", attributeType );
082
083 // --------------------------------------------------------------------
084 // AttributeType 1.3.6.1.4.1.42.2.27.4.1.15
085 // --------------------------------------------------------------------
086
087 attributeType = newAttributeType( "1.3.6.1.4.1.42.2.27.4.1.15", registries );
088 attributeType.setDescription( "Repository ids of interfaces implemented by a CORBA object" );
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( "caseExactMatch" );
096 attributeType.setSyntaxId( "1.3.6.1.4.1.1466.115.121.1.15" );
097
098 names.clear();
099 names.add( "corbaRepositoryId" );
100 attributeType.setNames( names.toArray( EMPTY ) );
101 cb.schemaObjectProduced( this, "1.3.6.1.4.1.42.2.27.4.1.15", attributeType );
102 }
103 }