KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > directory > ldapstudio > aciitemeditor > model > UserClassWrapperFactory


1 /*
2  * Licensed to the Apache Software Foundation (ASF) under one
3  * or more contributor license agreements. See the NOTICE file
4  * distributed with this work for additional information
5  * regarding copyright ownership. The ASF licenses this file
6  * to you under the Apache License, Version 2.0 (the
7  * "License"); you may not use this file except in compliance
8  * with the License. You may obtain a copy of the License at
9  *
10  * http://www.apache.org/licenses/LICENSE-2.0
11  *
12  * Unless required by applicable law or agreed to in writing,
13  * software distributed under the License is distributed on an
14  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15  * KIND, either express or implied. See the License for the
16  * specific language governing permissions and limitations
17  * under the License.
18  *
19  */

20 package org.apache.directory.ldapstudio.aciitemeditor.model;
21
22
23 import org.apache.directory.ldapstudio.aciitemeditor.valueeditors.SubtreeValueEditor;
24 import org.apache.directory.ldapstudio.valueeditors.dn.DnValueEditor;
25 import org.apache.directory.shared.ldap.aci.UserClass;
26
27
28 /**
29  * The UserClassWrapperFactory creates the UserClassWrapper, ready to
30  * be used in the user classes table.
31  *
32  * @author <a HREF="mailto:dev@directory.apache.org">Apache Directory Project</a>
33  * @version $Rev$, $Date$
34  */

35 public class UserClassWrapperFactory
36 {
37
38     /**
39      * Creates the user class wrappers.
40      *
41      * @return the user class wrapper[]
42      */

43     public static final UserClassWrapper[] createUserClassWrappers()
44     {
45         UserClassWrapper[] userClassWrappers = new UserClassWrapper[]
46             {
47                 // allUsers
48
new UserClassWrapper( UserClass.AllUsers.class, "", //$NON-NLS-1$
49
"", //$NON-NLS-1$
50
null ),
51
52                 // thisEntry
53
new UserClassWrapper( UserClass.ThisEntry.class, "", //$NON-NLS-1$
54
"", //$NON-NLS-1$
55
null ),
56
57                 // name
58
new UserClassWrapper( UserClass.Name.class, "\"", //$NON-NLS-1$
59
"\"", //$NON-NLS-1$
60
new DnValueEditor() ),
61
62                 // userGroup
63
new UserClassWrapper( UserClass.UserGroup.class, "\"", //$NON-NLS-1$
64
"\"", //$NON-NLS-1$
65
new DnValueEditor() ),
66
67                 // subtree
68
new UserClassWrapper( UserClass.Subtree.class, "", //$NON-NLS-1$
69
"", //$NON-NLS-1$
70
new SubtreeValueEditor( false )
71                 ) };
72
73         return userClassWrappers;
74     }
75
76 }
77
Popular Tags