Source Code Cross Referenced for FieldInfo.java in  » Groupware » ivatagroupware » com » ivata » groupware » admin » setting » struts » 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 » Groupware » ivatagroupware » com.ivata.groupware.admin.setting.struts 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /*
002:         * Copyright (c) 2001 - 2005 ivata limited.
003:         * All rights reserved.
004:         * -----------------------------------------------------------------------------
005:         * ivata groupware may be redistributed under the GNU General Public
006:         * License as published by the Free Software Foundation;
007:         * version 2 of the License.
008:         *
009:         * These programs are free software; you can redistribute them and/or
010:         * modify them under the terms of the GNU General Public License
011:         * as published by the Free Software Foundation; version 2 of the License.
012:         *
013:         * These programs are distributed in the hope that they will be useful,
014:         * but WITHOUT ANY WARRANTY; without even the implied warranty of
015:         * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
016:         *
017:         * See the GNU General Public License in the file LICENSE.txt for more
018:         * details.
019:         *
020:         * If you would like a copy of the GNU General Public License write to
021:         *
022:         * Free Software Foundation, Inc.
023:         * 59 Temple Place - Suite 330
024:         * Boston, MA 02111-1307, USA.
025:         *
026:         *
027:         * To arrange commercial support and licensing, contact ivata at
028:         *                  http://www.ivata.com/contact.jsp
029:         * -----------------------------------------------------------------------------
030:         * $Log: FieldInfo.java,v $
031:         * Revision 1.3  2005/10/03 10:21:15  colinmacleod
032:         * Fixed some style and javadoc issues.
033:         *
034:         * Revision 1.2  2005/10/02 14:08:59  colinmacleod
035:         * Added/improved log4j logging.
036:         *
037:         * Revision 1.1  2005/09/29 13:06:05  colinmacleod
038:         * First version of setting subproject.
039:         * Existing classes restructured, new setting user interface created.
040:         * Flexible XML UI configuration makes it easy to reuse the same web pages in
041:         * other projects.
042:         * Web files work as stand-alone webapp for testing.
043:         *
044:         */
045:        package com.ivata.groupware.admin.setting.struts;
046:
047:        import org.apache.log4j.Logger;
048:
049:        import java.util.List;
050:
051:        /**
052:         * Used to set additional information about a setting field's display character.
053:         *
054:         * @since ivata groupware 1.0 (21-Sep-2005)
055:         * @author Colin MacLeod <colin.macleod@ivata.com>
056:         * @version $Revision: 1.3 $
057:         */
058:
059:        public class FieldInfo {
060:            /**
061:             * Logger for this class.
062:             */
063:            private static final Logger logger = Logger
064:                    .getLogger(FieldInfo.class);
065:
066:            /**
067:             * Indiates the field should be generated as a date format. The
068:             * data element will contain a list of <code>String</code>
069:             * instances, with default values.
070:             */
071:            public static String TYPE_DATE_FORMAT = "dateFormat";
072:            /**
073:             * Indiates the field should be generated as a selection of values. The
074:             * data element will contain a list of <code>LabelValueBean</code>
075:             * instances.
076:             */
077:            public static String TYPE_SELECT = "select";
078:            /**
079:             * Indiates the field should be generated as a default text field (default).
080:             */
081:            public static String TYPE_TEXT = "text";
082:            /**
083:             * Indiates the field should be generated as a large text area.
084:             */
085:            public static String TYPE_TEXTAREA = "textarea";
086:            /**
087:             * Indiates the field should be generated as a boolean (checkbox).
088:             */
089:            public static String TYPE_BOOLEAN = "boolean";
090:            /**
091:             * Indiates the field should be generated as a timezone - a list of all
092:             * available timezones is shown.
093:             */
094:            public static String TYPE_TIMEZONE = "timezone";
095:            /**
096:             * Indiates a label from the message resources.
097:             */
098:            public static String TYPE_LABEL = "label";
099:            /**
100:             * For a date field, this stores sample formats; for a select fields, it
101:             * stores LabelValueBean instances for the select options.
102:             */
103:            private List data;
104:            /**
105:             * Indicates the type of field. Set to one of the TYPE... constants.
106:             */
107:            private String type;
108:
109:            /**
110:             * Construct a field info instance with default text type. 
111:             */
112:            public FieldInfo() {
113:                this (TYPE_TEXT);
114:            }
115:
116:            /**
117:             * Construct a field info instance with the given type. 
118:             * @param typeParam
119:             * <copyDoc>Refer to {@link #getType}.</copyDoc>
120:             */
121:            public FieldInfo(final String typeParam) {
122:                this (typeParam, null);
123:            }
124:
125:            /**
126:             * Construct a field info instance with the given type and default data. 
127:             * 
128:             * @param typeParam
129:             * <copyDoc>Refer to {@link #getType}.</copyDoc>
130:             * @param dataParam
131:             * <copyDoc>Refer to {@link #getData}.</copyDoc>
132:             */
133:            public FieldInfo(final String typeParam, final List dataParam) {
134:                this .type = typeParam;
135:                this .data = dataParam;
136:            }
137:
138:            /**
139:             * For a date field, this stores sample formats; for a select fields, it
140:             * stores LabelValueBean instances for the select options.
141:             * @return Returns the data.
142:             */
143:            public List getData() {
144:                if (logger.isDebugEnabled()) {
145:                    logger.debug("getData() - start");
146:                }
147:
148:                if (logger.isDebugEnabled()) {
149:                    logger.debug("getData() - end - return value = " + data);
150:                }
151:                return data;
152:            }
153:
154:            /**
155:             * Indicates the type of field. Set to one of the TYPE... constants.
156:             * @return Returns the type.
157:             */
158:            public String getType() {
159:                if (logger.isDebugEnabled()) {
160:                    logger.debug("getType() - start");
161:                }
162:
163:                if (logger.isDebugEnabled()) {
164:                    logger.debug("getType() - end - return value = " + type);
165:                }
166:                return type;
167:            }
168:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.