Source code: com/xpn/xwiki/objects/classes/StaticListClass.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: 1 févr. 2004
21 * Time: 21:51:06
22 */
23 package com.xpn.xwiki.objects.classes;
24
25 import com.xpn.xwiki.XWikiContext;
26 import com.xpn.xwiki.objects.meta.PropertyMetaClass;
27
28 import java.util.List;
29
30 public class StaticListClass extends ListClass {
31
32 public StaticListClass(PropertyMetaClass wclass) {
33 super(<font color=red>"staticlist"font>, <font color=red>"Static List"font>, wclass);
34 }
35
36 public StaticListClass() {
37 this(null);
38 }
39
40 public String getValues() {
41 return getStringValue(<font color=red>"values"font>);
42 }
43
44 public void setValues(String values) {
45 setStringValue(<font color=red>"values"font>, values);
46 }
47
48 public List getList(XWikiContext context) {
49 String values = (String) getValues();
50 return getListFromString(values);
51 }
52 }