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

Quick Search    Search Deep

Source code: com/xpn/xwiki/api/Property.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   * User: ludovic
19   * Date: 18 mars 2004
20   * Time: 13:53:50
21   */
22  
23  package com.xpn.xwiki.api;
24  
25  import com.xpn.xwiki.XWikiContext;
26  import com.xpn.xwiki.objects.BaseProperty;
27  
28  public class Property extends Element {
29  
30      public Property(BaseProperty property, XWikiContext context) {
31         super(property, context);
32      }
33  
34      protected BaseProperty getBaseProperty() {
35          return (BaseProperty)element;
36      }
37  
38      public String getName() {
39          return element.getName();
40      }
41  
42      public BaseProperty getProperty() {
43          if (checkProgrammingRights())
44              return (BaseProperty) element;
45          else
46              return null;
47      }
48  
49      public java.lang.Object getValue() {
50         return ((BaseProperty)element).getValue();
51      }
52  }