1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17 package org.apache.jetspeed.security.ldap;
18
19
20 import java.util.ArrayList;
21 import javax.naming.NamingException;
22 import org.apache.ldap.common.schema.ObjectClassTypeEnum;
23
24 import org.apache.ldap.server.schema.bootstrap.*;
25
26 /***
27 * A producer of schema objectClass definations for the jetspeed schema. This
28 * code has been automatically generated using schema files in the OpenLDAP
29 * format along with the directory plugin for maven. This has been done
30 * to facilitate OpenLDAP schema interoperability.
31 *
32 * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
33 * @version $Rev$
34 */
35 public class JetspeedObjectClassProducer extends AbstractBootstrapProducer
36 {
37
38 public JetspeedObjectClassProducer()
39 {
40 super( ProducerTypeEnum.OBJECT_CLASS_PRODUCER );
41 }
42
43
44
45
46
47
48
49 /***
50 * @see BootstrapProducer#produce(BootstrapRegistries, ProducerCallback)
51 */
52 public void produce( BootstrapRegistries registries, ProducerCallback cb )
53 throws NamingException
54 {
55 ArrayList array = new ArrayList();
56 BootstrapObjectClass objectClass;
57
58
59
60
61
62
63 objectClass = newObjectClass( "1.3.6.1.4.1.8100.1.2.4.2", registries );
64 objectClass.setObsolete( false );
65
66 objectClass.setDescription( "Jetspeed-2 permission" );
67
68 objectClass.setType( ObjectClassTypeEnum.STRUCTURAL );
69
70
71 array.clear();
72 objectClass.setSuperClassIds( ( String[] ) array.toArray( EMPTY ) );
73
74
75 array.clear();
76 array.add( "j2-classname" );
77 array.add( "uid" );
78 objectClass.setMustListIds( ( String[] ) array.toArray( EMPTY ) );
79
80
81 array.clear();
82 array.add( "j2-action" );
83 array.add( "creation-date" );
84 array.add( "modified-date" );
85 objectClass.setMayListIds( ( String[] ) array.toArray( EMPTY ) );
86
87
88 array.clear();
89 array.add( "jetspeed-2-permission" );
90 objectClass.setNames( ( String[] ) array.toArray( EMPTY ) );
91 cb.schemaObjectProduced( this, "1.3.6.1.4.1.8100.1.2.4.2", objectClass );
92
93
94
95
96
97
98 objectClass = newObjectClass( "1.3.6.1.4.1.8100.1.2.4.4", registries );
99 objectClass.setObsolete( false );
100
101 objectClass.setDescription( "Jetspeed-2 user" );
102
103 objectClass.setType( ObjectClassTypeEnum.STRUCTURAL );
104
105
106 array.clear();
107 array.add( "inetOrgPerson" );
108 objectClass.setSuperClassIds( ( String[] ) array.toArray( EMPTY ) );
109
110
111 array.clear();
112 array.add( "cn" );
113 array.add( "uid" );
114 objectClass.setMustListIds( ( String[] ) array.toArray( EMPTY ) );
115
116
117 array.clear();
118 array.add( "j2-role" );
119 array.add( "j2-group" );
120 array.add( "j2-permission" );
121 array.add( "creation-date" );
122 array.add( "modified-date" );
123 objectClass.setMayListIds( ( String[] ) array.toArray( EMPTY ) );
124
125
126 array.clear();
127 array.add( "jetspeed-2-user" );
128 objectClass.setNames( ( String[] ) array.toArray( EMPTY ) );
129 cb.schemaObjectProduced( this, "1.3.6.1.4.1.8100.1.2.4.4", objectClass );
130
131
132
133
134
135
136 objectClass = newObjectClass( "1.3.6.1.4.1.8100.1.2.4.1", registries );
137 objectClass.setObsolete( false );
138
139 objectClass.setDescription( "Jetspeed-2 group" );
140
141 objectClass.setType( ObjectClassTypeEnum.STRUCTURAL );
142
143
144 array.clear();
145 array.add( "groupOfUniqueNames" );
146 objectClass.setSuperClassIds( ( String[] ) array.toArray( EMPTY ) );
147
148
149 array.clear();
150 array.add( "j2-classname" );
151 array.add( "uid" );
152 objectClass.setMustListIds( ( String[] ) array.toArray( EMPTY ) );
153
154
155 array.clear();
156 array.add( "j2-role" );
157 array.add( "creation-date" );
158 array.add( "modified-date" );
159 array.add( "cn" );
160 array.add( "ou" );
161 objectClass.setMayListIds( ( String[] ) array.toArray( EMPTY ) );
162
163
164 array.clear();
165 array.add( "jetspeed-2-group" );
166 objectClass.setNames( ( String[] ) array.toArray( EMPTY ) );
167 cb.schemaObjectProduced( this, "1.3.6.1.4.1.8100.1.2.4.1", objectClass );
168
169
170
171
172
173
174 objectClass = newObjectClass( "1.3.6.1.4.1.8100.1.2.4.3", registries );
175 objectClass.setObsolete( false );
176
177 objectClass.setDescription( "Jetspeed-2 role" );
178
179 objectClass.setType( ObjectClassTypeEnum.STRUCTURAL );
180
181
182 array.clear();
183 array.add( "groupOfUniqueNames" );
184 objectClass.setSuperClassIds( ( String[] ) array.toArray( EMPTY ) );
185
186
187 array.clear();
188 array.add( "j2-classname" );
189 array.add( "uid" );
190 objectClass.setMustListIds( ( String[] ) array.toArray( EMPTY ) );
191
192
193 array.clear();
194 array.add( "creation-date" );
195 array.add( "modified-date" );
196 array.add( "cn" );
197 array.add( "ou" );
198 objectClass.setMayListIds( ( String[] ) array.toArray( EMPTY ) );
199
200
201 array.clear();
202 array.add( "jetspeed-2-role" );
203 objectClass.setNames( ( String[] ) array.toArray( EMPTY ) );
204 cb.schemaObjectProduced( this, "1.3.6.1.4.1.8100.1.2.4.3", objectClass );
205
206 }
207 }