View Javadoc

1   /*
2    *   Copyright 2004 The Apache Software Foundation
3    *
4    *   Licensed under the Apache License, Version 2.0 (the "License");
5    *   you may not use this file except in compliance with the License.
6    *   You may obtain a copy of the License at
7    *
8    *       http://www.apache.org/licenses/LICENSE-2.0
9    *
10   *   Unless required by applicable law or agreed to in writing, software
11   *   distributed under the License is distributed on an "AS IS" BASIS,
12   *   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13   *   See the License for the specific language governing permissions and
14   *   limitations under the License.
15   *
16   */
17  package org.apache.jetspeed.security.ldap;
18  
19  
20  import java.util.ArrayList;
21  import javax.naming.NamingException;
22  
23  import org.apache.ldap.common.schema.*;
24  
25  import org.apache.ldap.server.schema.bootstrap.*;
26  
27  /***
28   * A producer of schema attributeType definations for the jetspeed schema.  This
29   * code has been automatically generated using schema files in the OpenLDAP
30   * format along with the directory plugin for maven.  This has been done
31   * to facilitate Eve<->OpenLDAP schema interoperability.
32   *
33   * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
34   * @version $Rev$
35   */
36  public class JetspeedAttributeTypeProducer extends AbstractBootstrapProducer
37  {
38  
39      public JetspeedAttributeTypeProducer()
40      {
41          super( ProducerTypeEnum.ATTRIBUTE_TYPE_PRODUCER );
42      }
43  
44  
45      // ------------------------------------------------------------------------
46      // BootstrapProducer Methods
47      // ------------------------------------------------------------------------
48  
49  
50      /***
51       * @see BootstrapProducer#produce(BootstrapRegistries, ProducerCallback)
52       */
53      public void produce( BootstrapRegistries registries, ProducerCallback cb )
54          throws NamingException
55      {
56          ArrayList names = new ArrayList();
57          BootstrapAttributeType attributeType;
58  
59          
60          // --------------------------------------------------------------------
61          // AttributeType 1.3.6.1.4.1.8100.1.2.3.5 
62          // --------------------------------------------------------------------
63  
64          attributeType = newAttributeType( "1.3.6.1.4.1.8100.1.2.3.5", registries );
65          attributeType.setDescription( "The UID of an associated Permission" );
66          attributeType.setCanUserModify( ! false );
67          attributeType.setSingleValue( false );
68          attributeType.setCollective( false );
69          attributeType.setObsolete( false );
70          attributeType.setLength( -1 );
71          attributeType.setUsage( UsageEnum.getUsage( "userApplications" ) );
72          attributeType.setEqualityId( "caseExactIA5Match" );
73          attributeType.setSyntaxId( "1.3.6.1.4.1.1466.115.121.1.26" );
74          names.clear();
75          names.add( "j2-permission" );
76          attributeType.setNames( ( String[] ) names.toArray( EMPTY ) );
77          cb.schemaObjectProduced( this, "1.3.6.1.4.1.8100.1.2.3.5", attributeType );
78  
79   
80          // --------------------------------------------------------------------
81          // AttributeType 1.3.6.1.4.1.8100.1.2.3.3 
82          // --------------------------------------------------------------------
83  
84          attributeType = newAttributeType( "1.3.6.1.4.1.8100.1.2.3.3", registries );
85          attributeType.setDescription( "The UID of an associated Role. This is a multi-valued attribute." );
86          attributeType.setCanUserModify( ! false );
87          attributeType.setSingleValue( false );
88          attributeType.setCollective( false );
89          attributeType.setObsolete( false );
90          attributeType.setLength( -1 );
91          attributeType.setUsage( UsageEnum.getUsage( "userApplications" ) );
92          attributeType.setEqualityId( "caseExactIA5Match" );
93          attributeType.setSyntaxId( "1.3.6.1.4.1.1466.115.121.1.26" );
94          names.clear();
95          names.add( "j2-role" );
96          attributeType.setNames( ( String[] ) names.toArray( EMPTY ) );
97          cb.schemaObjectProduced( this, "1.3.6.1.4.1.8100.1.2.3.3", attributeType );
98  
99   
100         // --------------------------------------------------------------------
101         // AttributeType 1.3.6.1.4.1.8100.1.2.3.7 
102         // --------------------------------------------------------------------
103 
104         attributeType = newAttributeType( "1.3.6.1.4.1.8100.1.2.3.7", registries );
105         attributeType.setDescription( "modified date" );
106         attributeType.setCanUserModify( ! false );
107         attributeType.setSingleValue( true );
108         attributeType.setCollective( false );
109         attributeType.setObsolete( false );
110         attributeType.setLength( -1 );
111         attributeType.setUsage( UsageEnum.getUsage( "userApplications" ) );
112         attributeType.setEqualityId( "caseIgnoreIA5Match" );
113         attributeType.setSyntaxId( "1.3.6.1.4.1.1466.115.121.1.26" );
114         names.clear();
115         names.add( "modified-date" );
116         attributeType.setNames( ( String[] ) names.toArray( EMPTY ) );
117         cb.schemaObjectProduced( this, "1.3.6.1.4.1.8100.1.2.3.7", attributeType );
118 
119  
120         // --------------------------------------------------------------------
121         // AttributeType 1.3.6.1.4.1.8100.1.2.3.1 
122         // --------------------------------------------------------------------
123 
124         attributeType = newAttributeType( "1.3.6.1.4.1.8100.1.2.3.1", registries );
125         attributeType.setDescription( "The java class name of the object." );
126         attributeType.setCanUserModify( ! false );
127         attributeType.setSingleValue( true );
128         attributeType.setCollective( false );
129         attributeType.setObsolete( false );
130         attributeType.setLength( -1 );
131         attributeType.setUsage( UsageEnum.getUsage( "userApplications" ) );
132         attributeType.setEqualityId( "caseIgnoreIA5Match" );
133         attributeType.setSyntaxId( "1.3.6.1.4.1.1466.115.121.1.26" );
134         names.clear();
135         names.add( "j2-classname" );
136         attributeType.setNames( ( String[] ) names.toArray( EMPTY ) );
137         cb.schemaObjectProduced( this, "1.3.6.1.4.1.8100.1.2.3.1", attributeType );
138 
139  
140         // --------------------------------------------------------------------
141         // AttributeType 1.3.6.1.4.1.8100.1.2.3.4 
142         // --------------------------------------------------------------------
143 
144         attributeType = newAttributeType( "1.3.6.1.4.1.8100.1.2.3.4", registries );
145         attributeType.setDescription( "The UID of an associated Group. This is a multi-valued attribute." );
146         attributeType.setCanUserModify( ! false );
147         attributeType.setSingleValue( false );
148         attributeType.setCollective( false );
149         attributeType.setObsolete( false );
150         attributeType.setLength( -1 );
151         attributeType.setUsage( UsageEnum.getUsage( "userApplications" ) );
152         attributeType.setEqualityId( "caseExactIA5Match" );
153         attributeType.setSyntaxId( "1.3.6.1.4.1.1466.115.121.1.26" );
154         names.clear();
155         names.add( "j2-group" );
156         attributeType.setNames( ( String[] ) names.toArray( EMPTY ) );
157         cb.schemaObjectProduced( this, "1.3.6.1.4.1.8100.1.2.3.4", attributeType );
158 
159  
160         // --------------------------------------------------------------------
161         // AttributeType 1.3.6.1.4.1.8100.1.2.3.6 
162         // --------------------------------------------------------------------
163 
164         attributeType = newAttributeType( "1.3.6.1.4.1.8100.1.2.3.6", registries );
165         attributeType.setDescription( "create date" );
166         attributeType.setCanUserModify( ! false );
167         attributeType.setSingleValue( true );
168         attributeType.setCollective( false );
169         attributeType.setObsolete( false );
170         attributeType.setLength( -1 );
171         attributeType.setUsage( UsageEnum.getUsage( "userApplications" ) );
172         attributeType.setEqualityId( "caseIgnoreIA5Match" );
173         attributeType.setSyntaxId( "1.3.6.1.4.1.1466.115.121.1.26" );
174         names.clear();
175         names.add( "creation-date" );
176         attributeType.setNames( ( String[] ) names.toArray( EMPTY ) );
177         cb.schemaObjectProduced( this, "1.3.6.1.4.1.8100.1.2.3.6", attributeType );
178 
179  
180         // --------------------------------------------------------------------
181         // AttributeType 1.3.6.1.4.1.8100.1.2.3.2 
182         // --------------------------------------------------------------------
183 
184         attributeType = newAttributeType( "1.3.6.1.4.1.8100.1.2.3.2", registries );
185         attributeType.setDescription( "An action associated with a permission. This is a multi-valued attribute." );
186         attributeType.setCanUserModify( ! false );
187         attributeType.setSingleValue( false );
188         attributeType.setCollective( false );
189         attributeType.setObsolete( false );
190         attributeType.setLength( -1 );
191         attributeType.setUsage( UsageEnum.getUsage( "userApplications" ) );
192         attributeType.setEqualityId( "caseIgnoreIA5Match" );
193         attributeType.setSyntaxId( "1.3.6.1.4.1.1466.115.121.1.26" );
194         names.clear();
195         names.add( "j2-action" );
196         attributeType.setNames( ( String[] ) names.toArray( EMPTY ) );
197         cb.schemaObjectProduced( this, "1.3.6.1.4.1.8100.1.2.3.2", attributeType );
198 
199     }
200 }