Source Code Cross Referenced for CmsFormDataBean.java in  » Content-Management-System » opencms » com » alkacon » opencms » formgenerator » database » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Content Management System » opencms » com.alkacon.opencms.formgenerator.database 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /*
002:         * File   : $Source: /usr/local/cvs/alkacon/com.alkacon.opencms.formgenerator/src/com/alkacon/opencms/formgenerator/database/CmsFormDataBean.java,v $
003:         * Date   : $Date: 2008-02-28 08:16:45 $
004:         * Version: $Revision: 1.3 $
005:         *
006:         * This file is part of the Alkacon OpenCms Add-On Module Package
007:         *
008:         * Copyright (c) 2007 Alkacon Software GmbH (http://www.alkacon.com)
009:         *
010:         * The Alkacon OpenCms Add-On Module Package is free software: 
011:         * you can redistribute it and/or modify
012:         * it under the terms of the GNU General Public License as published by
013:         * the Free Software Foundation, either version 3 of the License, or
014:         * (at your option) any later version.
015:         * 
016:         * The Alkacon OpenCms Add-On Module Package is distributed 
017:         * in the hope that it will be useful,
018:         * but WITHOUT ANY WARRANTY; without even the implied warranty of
019:         * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
020:         * GNU General Public License for more details.
021:         * 
022:         * You should have received a copy of the GNU General Public License
023:         * along with the Alkacon OpenCms Add-On Module Package.  
024:         * If not, see http://www.gnu.org/licenses/.
025:         *
026:         * For further information about Alkacon Software GmbH, please see the
027:         * company website: http://www.alkacon.com.
028:         *
029:         * For further information about OpenCms, please see the
030:         * project website: http://www.opencms.org.
031:         */
032:
033:        package com.alkacon.opencms.formgenerator.database;
034:
035:        import java.util.Collection;
036:        import java.util.Set;
037:        import java.util.SortedMap;
038:        import java.util.TreeMap;
039:
040:        /**
041:         * Represents a single set / record of data that has been entered by a single 
042:         * user that filled out a form. <p>
043:         * 
044:         * @author Achim Westermann
045:         * @author Michael Moossen
046:         * 
047:         * @version $Revision: 1.3 $
048:         * 
049:         * @since 7.0.4
050:         */
051:        public class CmsFormDataBean {
052:
053:            /** The creation date. */
054:            private long m_dateCreated;
055:
056:            /** The <code>SortedMap&lt;{@link String}, {@link java.util.Map.Entry}&gt;</code> with all field entries. */
057:            private SortedMap m_fieldEntries;
058:
059:            /** The resource path. */
060:            private String m_resourcePath;
061:
062:            /**
063:             * Default constructor.<p>
064:             */
065:            protected CmsFormDataBean() {
066:
067:                m_fieldEntries = new TreeMap();
068:            }
069:
070:            /**
071:             * Returns a set of all field labels in this form.<p>
072:             * 
073:             * @return a set of all field labels
074:             * 
075:             * @see java.util.Map#keySet()
076:             */
077:            public Set getAllFieldLabels() {
078:
079:                return m_fieldEntries.keySet();
080:            }
081:
082:            /**
083:             * Returns a set of {@link java.util.Map.Entry} objects, where the key is
084:             * the field name and the value the field value, with all fields
085:             * in the form.<p>
086:             * 
087:             * @return all fields in the form
088:             * 
089:             * @see java.util.Map#entrySet()
090:             */
091:            public Set getAllFields() {
092:
093:                return m_fieldEntries.entrySet();
094:            }
095:
096:            /**
097:             * Returns a collection of all field values in this form.<p>
098:             * 
099:             * @return a collection of all field values
100:             * 
101:             * @see java.util.Map#values()
102:             */
103:            public Collection getAllFieldValues() {
104:
105:                return m_fieldEntries.values();
106:            }
107:
108:            /**
109:             * Returns the creation date.<p>
110:             *
111:             * @return the creation date
112:             */
113:            public long getDateCreated() {
114:
115:                return m_dateCreated;
116:            }
117:
118:            /**
119:             * Returns the value of the given field, or <code>null</code> 
120:             * if no field with the given name exists.<p>
121:             * 
122:             * @param fieldLabel the field label to get the value for
123:             * 
124:             * @return the value of the given field
125:             * 
126:             * @see java.util.Map#get(java.lang.Object)
127:             */
128:            public String getFieldValue(String fieldLabel) {
129:
130:                return (String) m_fieldEntries.get(fieldLabel);
131:            }
132:
133:            /**
134:             * Returns the resource Path.<p>
135:             *
136:             * @return the resource Path
137:             */
138:            public String getResourcePath() {
139:
140:                return m_resourcePath;
141:            }
142:
143:            /**
144:             * Checks if the form has the given field.<p>
145:             * 
146:             * @param fieldLabel the field label to look for
147:             * 
148:             * @return <code>true</code> if the form has the given field
149:             *  
150:             * @see java.util.Map#containsKey(java.lang.Object)
151:             */
152:            public boolean hasField(String fieldLabel) {
153:
154:                return m_fieldEntries.containsKey(fieldLabel);
155:            }
156:
157:            /**
158:             * Checks if the form has the given field value.<p>
159:             * 
160:             * @param fieldValue the field value to look for
161:             * 
162:             * @return <code>true</code> if the form has the given field value
163:             *  
164:             * @see java.util.Map#containsValue(java.lang.Object)
165:             */
166:            public boolean hasValue(String fieldValue) {
167:
168:                return m_fieldEntries.containsValue(fieldValue);
169:            }
170:
171:            /**
172:             * Returns the total number of fields in this form.<p>
173:             * 
174:             * @return the total number of fields
175:             * 
176:             * @see java.util.Map#size()
177:             */
178:            public int size() {
179:
180:                return m_fieldEntries.size();
181:            }
182:
183:            /**
184:             * Adds a new field to this form.<p>
185:             * 
186:             * @param fieldLabel the label of the field
187:             * @param fieldValue the value of the field
188:             * 
189:             * @see java.util.Map#put(java.lang.Object, java.lang.Object)
190:             */
191:            protected void addField(String fieldLabel, String fieldValue) {
192:
193:                m_fieldEntries.put(fieldLabel, fieldValue);
194:            }
195:
196:            /**
197:             * Sets the creation date.<p>
198:             *
199:             * @param dateCreated the creation date to set
200:             */
201:            protected void setDateCreated(long dateCreated) {
202:
203:                m_dateCreated = dateCreated;
204:            }
205:
206:            /**
207:             * Sets the resource Path.<p>
208:             *
209:             * @param resourcePath the resource Path to set
210:             */
211:            protected void setResourcePath(String resourcePath) {
212:
213:                m_resourcePath = resourcePath;
214:            }
215:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.