Source Code Cross Referenced for Messages.java in  » Development » JValidate » nl » knowlogy » validation » 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 » Development » JValidate » nl.knowlogy.validation 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /*
002:         * $Header: /cvsroot/jvalidate/jvalidate-framework/jvalidate/src/main/java/nl/knowlogy/validation/Messages.java,v 1.5 2007/04/20 12:53:18 roberthofstra Exp $
003:         * $Revision: 1.5 $
004:         * $Date: 2007/04/20 12:53:18 $
005:         * 
006:         * 
007:         * Copyright   2004 - 2005 Knowlogy, the Netherlands, www.knowlogy.nl
008:         * 
009:         * Licensed under the Apache License, Version 2.0 (the "License");
010:         * you may not use this file except in compliance with the License.
011:         * You may obtain a copy of the License at
012:         * 
013:         *      http://www.apache.org/licenses/LICENSE-2.0
014:         * 
015:         * Unless required by applicable law or agreed to in writing, software
016:         * distributed under the License is distributed on an "AS IS" BASIS,
017:         * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
018:         * See the License for the specific language governing permissions and
019:         * limitations under the License.
020:         */
021:        package nl.knowlogy.validation;
022:
023:        import java.io.Serializable;
024:        import java.util.List;
025:        import java.util.ResourceBundle;
026:
027:        /**
028:         * <p>
029:         * A <code>Messages</code> is a message container,in which messages are 
030:         * stored during validating and is used to provide feedback about the 
031:         * validation. 
032:         * </p>
033:         *  
034:         * 
035:         * @see Message
036:         *  
037:         * @author Robert
038:         */
039:        public interface Messages extends Serializable {
040:
041:            /**
042:             * Stores an message in the messages.
043:             * 
044:             * @param message message to add
045:             */
046:            void addMessage(Message message);
047:
048:            /**
049:             * <p>
050:             * Stores and creates an <code>Message</code> in the messages, based
051:             * on the give params.
052:             * </p>
053:             * <p>
054:             * These messages are not bound to a specific property of the object.
055:             * </p>
056:             * 
057:             * @param messageType type of the message
058:             * @param object the rejected object
059:             * @param messageCode message code, interpretable as message key
060:             */
061:            void addMessage(MessageType messageType, Object object,
062:                    String messageCode);
063:
064:            /**
065:             * Add a message.
066:             * @param messageType type of the message
067:             * @param messageCode message code, interpretable as message key
068:             * @param defaultMessage fallback default message
069:             */
070:            void addMessage(MessageType messageType, Object object,
071:                    String messageCode, String defaultMessage);
072:
073:            /**
074:             * Add a message.
075:             * @param messageType type of the message
076:             * @param messageCode message code, interpretable as message key
077:             * @param messageArgs message arguments, for argument binding via MessageFormat
078:             * (can be null)
079:             * @param defaultMessage fallback default message
080:             */
081:            void addMessage(MessageType messageType, Object object,
082:                    String messageCode, Object[] messageArgs,
083:                    String defaultMessage);
084:
085:            /**
086:             * Add a message for a specific property of the object.
087:             * @param messageType type of the message
088:             * @param propertyName the property name
089:             * @param messageCode message code, interpretable as message key
090:             */
091:            void addPropertyMessage(MessageType messageType, Object object,
092:                    String propertyName, String messageCode);
093:
094:            /**
095:             * Add a message for a specific property of the object.
096:             * @param messageType type of the message
097:             * @param propertyName the field name
098:             * @param messageCode message code, interpretable as message key
099:             * @param defaultMessage fallback default message
100:             */
101:            void addPropertyMessage(MessageType messageType, Object object,
102:                    String propertyName, String messageCode,
103:                    String defaultMessage);
104:
105:            /**
106:             * Add a message for a specific property of the object.
107:             * @param messageType type of the message
108:             * @param propertyName the property name
109:             * @param messageCode message code, interpretable as message key
110:             * @param messageArgs message arguments, for argument binding via MessageFormat
111:             * (can be null)
112:             * @param defaultMessage fallback default message
113:             */
114:            void addPropertyMessage(MessageType messageType, Object object,
115:                    String propertyName, String messageCode,
116:                    Object[] messageArgs, String defaultMessage);
117:
118:            /**
119:             * Returns the number of message's.
120:             * 
121:             * @return
122:             */
123:            int getNumberOfMessages();
124:
125:            int getNumberOfErrorMessages();
126:
127:            /**
128:             * Returns the number of messages with a specific messagetype.
129:             * 
130:             * @param messageType
131:             * @return
132:             */
133:            int getNumberOfMessages(MessageType messageType);
134:
135:            /**
136:             * Returns the first message associated with the given object and propertyName, if such
137:             * a message is present else null.
138:             * 
139:             * @param object object that is associated with the message.
140:             * @param propertyName that is associated with the message.
141:             * 
142:             * @return Returns the first message associated with the given object and propertyName, if such
143:             * a message is present else null.
144:             */
145:            Message getMessage(Object object, String propertyName);
146:
147:            /**
148:             * Returns a list of <code>Message</code> instances associated with the given object and propertyName, if such
149:             * a message is present.
150:             * 
151:             * @param object object that is associated with the message.
152:             * @param propertyName that is associated with the message.
153:             * 
154:             * @return a list of <code>Message</code>instances associated with the given object and propertyName, if such
155:             * a message is present.
156:             */
157:            List getMessages(Object object, String propertyName);
158:
159:            Message getMessage(Object object, boolean objectLevelOnly);
160:
161:            List getMessages(Object object, boolean objectLevelOnly);
162:
163:            List getMessages();
164:
165:            /**
166:             * Adds messages.
167:             * 
168:             * @param messages
169:             */
170:            void addMessages(Messages messages);
171:
172:            /**
173:             * Returns an overal messageMessage.
174:             * 
175:             * @return
176:             */
177:            String getMessage();
178:
179:            void convertMessageCodes(ResourceBundle resourceBundle);
180:
181:            /**
182:             * Clears all messages in the container.
183:             */
184:            void clear();
185:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.