Source code: com/xpn/xwiki/objects/meta/ListMetaClass.java
1 /**
2 * ===================================================================
3 *
4 * Copyright (c) 2003,2004 Ludovic Dubost, All rights reserved.
5 *
6 * This program is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU General Public License
8 * as published by the Free Software Foundation; either version 2
9 * of the License, or (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details, published at
15 * http://www.gnu.org/copyleft/gpl.html or in gpl.txt in the
16 * root folder of this distribution.
17
18 * Created by
19 * User: Ludovic Dubost
20 * Date: 3 févr. 2004
21 * Time: 19:14:30
22 */
23 package com.xpn.xwiki.objects.meta;
24
25 import com.xpn.xwiki.objects.classes.BooleanClass;
26 import com.xpn.xwiki.objects.classes.ListClass;
27 import com.xpn.xwiki.objects.classes.NumberClass;
28 import com.xpn.xwiki.objects.classes.StaticListClass;
29
30 public class ListMetaClass extends PropertyMetaClass {
31
32 public ListMetaClass() {
33 super();
34 setPrettyName("List Class");
35 setName(ListClass.class.getName());
36
37 StaticListClass type_class = new StaticListClass(this);
38 type_class.setName("displayType");
39 type_class.setPrettyName("Display Type");
40 type_class.setValues("input|select|radio|checkbox");
41 safeput("displayType", type_class);
42
43 BooleanClass multi_class = new BooleanClass(this);
44 multi_class.setName("multiSelect");
45 multi_class.setPrettyName("Multiple Select");
46 multi_class.setDisplayType("yesno");
47 multi_class.setUnmodifiable(true);
48 safeput("multiSelect", multi_class);
49
50 BooleanClass relational_class = new BooleanClass(this);
51 relational_class.setName("relationalStorage");
52 relational_class.setPrettyName("Relational Storage");
53 relational_class.setDisplayType("yesno");
54 relational_class.setUnmodifiable(true);
55 safeput("relationalStorage", relational_class);
56
57 NumberClass size_class = new NumberClass(this);
58 size_class.setName("size");
59 size_class.setPrettyName("Size");
60 size_class.setSize(5);
61 size_class.setNumberType("integer");
62 safeput("size", size_class);
63 }
64 }