KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > opencms > workplace > CmsXmlWpLabelDefFile


1 /*
2 * File : $Source: /usr/local/cvs/opencms/src-modules/com/opencms/workplace/CmsXmlWpLabelDefFile.java,v $
3 * Date : $Date: 2005/06/27 23:22:07 $
4 * Version: $Revision: 1.2 $
5 *
6 * This library is part of OpenCms -
7 * the Open Source Content Mananagement System
8 *
9 * Copyright (C) 2001 The OpenCms Group
10 *
11 * This library is free software; you can redistribute it and/or
12 * modify it under the terms of the GNU Lesser General Public
13 * License as published by the Free Software Foundation; either
14 * version 2.1 of the License, or (at your option) any later version.
15 *
16 * This library is distributed in the hope that it will be useful,
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
19 * Lesser General Public License for more details.
20 *
21 * For further information about OpenCms, please see the
22 * OpenCms Website: http://www.opencms.org
23 *
24 * You should have received a copy of the GNU Lesser General Public
25 * License along with this library; if not, write to the Free Software
26 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
27 */

28
29
30 package com.opencms.workplace;
31
32 import org.opencms.file.CmsFile;
33 import org.opencms.file.CmsObject;
34 import org.opencms.main.CmsException;
35
36 import com.opencms.template.A_CmsXmlContent;
37
38 /**
39  * Content definition for the workplace label element definition file.
40  *
41  * @author Michael Emmerich
42  * @version $Revision: 1.2 $ $Date: 2005/06/27 23:22:07 $
43  *
44  * @deprecated Will not be supported past the OpenCms 6 release.
45  **/

46
47 public class CmsXmlWpLabelDefFile extends A_CmsXmlContent {
48     
49     /**
50      * Default constructor.
51      */

52     
53     public CmsXmlWpLabelDefFile() throws CmsException {
54         super();
55     }
56     
57     /**
58      * Constructor for creating a new object containing the content
59      * of the given filename.
60      *
61      * @param cms CmsObject object for accessing system resources.
62      * @param filename Name of the body file that shoul be read.
63      */

64     
65     public CmsXmlWpLabelDefFile(CmsObject cms, CmsFile file) throws CmsException {
66         super();
67         init(cms, file);
68     }
69     
70     /**
71      * Constructor for creating a new object containing the content
72      * of the given filename.
73      *
74      * @param cms CmsObject object for accessing system resources.
75      * @param filename Name of the body file that shoul be read.
76      */

77     
78     public CmsXmlWpLabelDefFile(CmsObject cms, String JavaDoc filename) throws CmsException {
79         super();
80         init(cms, filename);
81     }
82     
83     /**
84      * Gets a description of this content type.
85      * @return Content type description.
86      */

87     
88     public String JavaDoc getContentDescription() {
89         return "OpenCms workplace labels";
90     }
91     
92     /**
93      * Gets the processed data for a label.
94      * @param value The value of this label.
95      * @return Processed label.
96      * @throws CmsException
97      */

98     
99     public String JavaDoc getLabel(String JavaDoc value) throws CmsException {
100         setData(CmsWorkplaceDefault.C_LABEL_VALUE, value);
101         return getProcessedDataValue(CmsWorkplaceDefault.C_TAG_LABEL);
102     }
103     
104     /**
105      * Gets the expected tagname for the XML documents of this content type
106      * @return Expected XML tagname.
107      */

108     
109     public String JavaDoc getXmlDocumentTagName() {
110         return "WP_LABELS";
111     }
112 }
113
Popular Tags