KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > opencms > widgets > I_CmsWidgetParameter


1 /*
2  * File : $Source: /usr/local/cvs/opencms/src/org/opencms/widgets/I_CmsWidgetParameter.java,v $
3  * Date : $Date: 2005/06/23 11:11:23 $
4  * Version: $Revision: 1.6 $
5  *
6  * This library is part of OpenCms -
7  * the Open Source Content Mananagement System
8  *
9  * Copyright (c) 2005 Alkacon Software GmbH (http://www.alkacon.com)
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 Alkacon Software GmbH, please see the
22  * company website: http://www.alkacon.com
23  *
24  * For further information about OpenCms, please see the
25  * project website: http://www.opencms.org
26  *
27  * You should have received a copy of the GNU Lesser General Public
28  * License along with this library; if not, write to the Free Software
29  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
30  */

31
32 package org.opencms.widgets;
33
34 import org.opencms.file.CmsObject;
35
36 /**
37  * Parameter value wrapper used by the OpenCms workplace widgets.<p>
38  *
39  * @author Alexander Kandzior
40  *
41  * @version $Revision: 1.6 $
42  *
43  * @since 6.0.0
44  */

45 public interface I_CmsWidgetParameter {
46
47     /**
48      * Returns the default value of this parameter.<p>
49      *
50      * If no default value has been provided, <code>null</code> is returned.<p>
51      *
52      * @param cms an initialized instance of an OpenCms user context
53      *
54      * @return the default value of this parameter
55      */

56     String JavaDoc getDefault(CmsObject cms);
57
58     /**
59      * Returns the form id of this parameter.<p>
60      *
61      * @return the form id of this parameter
62      */

63     String JavaDoc getId();
64
65     /**
66      * Returns the index of this widget parameter,
67      * starting with 0.<p>
68      *
69      * This is usefull in case there are more then one parameters
70      * with the same name, for example when creating a list of parameters of the same type.<p>
71      *
72      * @return the index of this widget parameter
73      */

74     int getIndex();
75
76     /**
77      * Returns the localized key identificator of this parameter.<p>
78      *
79      * @return the localized key identificator of this parameter
80      */

81     String JavaDoc getKey();
82
83     /**
84      * Returns the maximum occurences of this parameter.<p>
85      *
86      * @return the maximum occurences of this parameter
87      */

88     int getMaxOccurs();
89
90     /**
91      * Returns the minimum occurences of this parameter.<p>
92      *
93      * @return the minimum occurences of this parameter
94      */

95     int getMinOccurs();
96
97     /**
98      * Returns the name of this parameter.<p>
99      *
100      * @return the name of this parameter
101      */

102     String JavaDoc getName();
103
104     /**
105      * Returns the value of this parameter.<p>
106      *
107      * @param cms an initialized instance of an OpenCms user context
108      *
109      * @return the value of this parameter
110      */

111     String JavaDoc getStringValue(CmsObject cms);
112
113     /**
114      * Returns <code>true</code> if this widgets value contains an error.<p>
115      *
116      * @return <code>true</code> if this widgets value contains an error
117      */

118     boolean hasError();
119
120     /**
121      * Sets an optional localized key prefix identificator of this parameter.<p>
122      *
123      * @param prefix the optional localized key prefix identificator of this parameter
124      */

125     void setKeyPrefix(String JavaDoc prefix);
126
127     /**
128      * Sets the value of this parameter.<p>
129      *
130      * This method does provide processing of the content based on the
131      * users current OpenCms context. This can be used e.g. for link
132      * extraction and replacement in the content.<p>
133      *
134      * @param cms an initialized instance of an OpenCms user context
135      * @param value the value to set
136      */

137     void setStringValue(CmsObject cms, String JavaDoc value);
138 }
Popular Tags