Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

Source code: com/xpn/xwiki/objects/meta/PropertyMetaClass.java


1   /**
2    * ===================================================================
3    *
4    * Copyright (c) 2003 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: 22 déc. 2003
21   * Time: 10:24:00
22   */
23  package com.xpn.xwiki.objects.meta;
24  
25  import com.xpn.xwiki.objects.BaseCollection;
26  import com.xpn.xwiki.objects.PropertyInterface;
27  import com.xpn.xwiki.objects.classes.BaseClass;
28  import com.xpn.xwiki.objects.classes.BooleanClass;
29  import com.xpn.xwiki.objects.classes.NumberClass;
30  import com.xpn.xwiki.objects.classes.StringClass;
31  
32  public class PropertyMetaClass extends BaseClass implements PropertyInterface {
33  
34      public PropertyMetaClass() {
35          super();
36          StringClass type_class = new StringClass(this);
37          type_class.setName("classType");
38          type_class.setPrettyName("Class Type");
39          type_class.setSize(40);
40          type_class.setUnmodifiable(true);
41          // This should not be touched
42          // safeput("classType", type_class);
43          StringClass name_class = new StringClass(this);
44          name_class.setName("name");
45          name_class.setPrettyName("Name");
46          name_class.setUnmodifiable(true);
47          name_class.setSize(40);
48          safeput("name", name_class);
49          StringClass prettyname_class = new StringClass(this);
50          prettyname_class.setName("prettyName");
51          prettyname_class.setPrettyName("Pretty Name");
52          prettyname_class.setSize(40);
53          safeput("prettyName", prettyname_class);
54  
55          BooleanClass unmodif_class = new BooleanClass(this);
56          unmodif_class.setName("unmodifiable");
57          unmodif_class.setPrettyName("Unmodifiable");
58          unmodif_class.setDisplayType("yesno");
59          safeput("unmodifiable", unmodif_class);
60  
61          NumberClass number_class = new NumberClass(this);
62          number_class.setName("number");
63          number_class.setPrettyName("Number");
64          number_class.setNumberType("integer");
65          safeput("number", number_class);
66      }
67  
68      public BaseCollection getObject() {
69          return null;
70      }
71  
72      public void setObject(BaseCollection object) {
73      }
74  
75      public String toFormString() {
76          return null;
77      }
78  }