Source Code Cross Referenced for BindingResult.java in  » J2EE » spring-framework-2.0.6 » org » springframework » 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 » J2EE » spring framework 2.0.6 » org.springframework.validation 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /*
002:         * Copyright 2002-2006 the original author or authors.
003:         *
004:         * Licensed under the Apache License, Version 2.0 (the "License");
005:         * you may not use this file except in compliance with the License.
006:         * You may obtain a copy of the License at
007:         *
008:         *      http://www.apache.org/licenses/LICENSE-2.0
009:         *
010:         * Unless required by applicable law or agreed to in writing, software
011:         * distributed under the License is distributed on an "AS IS" BASIS,
012:         * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
013:         * See the License for the specific language governing permissions and
014:         * limitations under the License.
015:         */
016:
017:        package org.springframework.validation;
018:
019:        import java.util.Map;
020:
021:        import org.springframework.beans.PropertyEditorRegistry;
022:
023:        /**
024:         * General interface that represents binding results. Extends the
025:         * {@link Errors interface} for error registration capabilities,
026:         * allowing for a {@link Validator} to be applied, and adds
027:         * binding-specific analysis and model building.
028:         *
029:         * <p>Serves as result holder for a {@link DataBinder}, obtained via
030:         * the {@link DataBinder#getBindingResult()} method. BindingResult
031:         * implementations can also be used directly, for example to invoke
032:         * a {@link Validator} on it (e.g. as part of a unit test).
033:         *
034:         * @author Juergen Hoeller
035:         * @since 2.0
036:         * @see DataBinder
037:         * @see Errors
038:         * @see Validator
039:         * @see BeanPropertyBindingResult
040:         * @see DirectFieldBindingResult
041:         * @see MapBindingResult
042:         */
043:        public interface BindingResult extends Errors {
044:
045:            /**
046:             * Prefix for the name of the BindingResult instance in a model,
047:             * followed by the object name.
048:             */
049:            String MODEL_KEY_PREFIX = BindingResult.class.getName() + ".";
050:
051:            /**
052:             * Return the wrapped target object, which may be a bean, an object with
053:             * public fields, a Map - depending on the concrete binding strategy.
054:             */
055:            Object getTarget();
056:
057:            /**
058:             * Return a model Map for the obtained state, exposing a BindingResult
059:             * instance as '{@link #MODEL_KEY_PREFIX MODEL_KEY_PREFIX} + objectName'
060:             * and the object itself as 'objectName'.
061:             * <p>Note that the Map is constructed every time you're calling this method.
062:             * Adding things to the map and then re-calling this method will not work.
063:             * <p>The attributes in the model Map returned by this method are usually
064:             * included in the {@link org.springframework.web.servlet.ModelAndView}
065:             * for a form view that uses Spring's <code>bind</code> tag in a JSP,
066:             * which needs access to the BindingResult instance. Spring's pre-built
067:             * form controllers will do this for you when rendering a form view.
068:             * When building the ModelAndView instance yourself, you need to include
069:             * the attributes from the model Map returned by this method.
070:             * @see #getObjectName()
071:             * @see #MODEL_KEY_PREFIX
072:             * @see org.springframework.web.servlet.ModelAndView
073:             * @see org.springframework.web.servlet.tags.BindTag
074:             * @see org.springframework.web.servlet.mvc.SimpleFormController
075:             */
076:            Map getModel();
077:
078:            /**
079:             * Return the underlying PropertyEditorRegistry.
080:             * @throws UnsupportedOperationException if the BindingResult
081:             * does not support a PropertyEditorRegistry
082:             */
083:            PropertyEditorRegistry getPropertyEditorRegistry();
084:
085:            /**
086:             * Mark the specified disallowed field as suppressed.
087:             * <p>The data binder invokes this for each field value that was
088:             * detected to target a disallowed field.
089:             * @see DataBinder#setAllowedFields
090:             */
091:            void recordSuppressedField(String fieldName);
092:
093:            /**
094:             * Return the list of fields that were suppressed during the bind process.
095:             * <p>Can be used to determine whether any field values were targeting
096:             * disallowed fields.
097:             * @see DataBinder#setAllowedFields
098:             */
099:            String[] getSuppressedFields();
100:
101:            /**
102:             * Add a custom {@link ObjectError} or {@link FieldError} to the errors list.
103:             * <p>Intended to be used by cooperating strategies such as {@link BindingErrorProcessor}.
104:             * @see ObjectError
105:             * @see FieldError
106:             * @see BindingErrorProcessor
107:             */
108:            void addError(ObjectError error);
109:
110:            /**
111:             * Resolve the given error code into message codes for the given field.
112:             * <p>Calls the configured {@link MessageCodesResolver} with appropriate parameters.
113:             * @param errorCode the error code to resolve into message codes
114:             * @param field the field to resolve message codes for
115:             * @return the resolved message codes
116:             */
117:            String[] resolveMessageCodes(String errorCode, String field);
118:
119:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.