Java Doc for ActionMessages.java in  » Web-Framework » struts-1.3.8 » org » apache » struts » action » 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 » Web Framework » struts 1.3.8 » org.apache.struts.action 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.apache.struts.action.ActionMessages

All known Subclasses:   org.apache.struts.action.ActionErrors,
ActionMessages
public class ActionMessages implements Serializable(Code)

A class that encapsulates messages. Messages can be either global or they are specific to a particular bean property.

Each individual message is described by an ActionMessage object, which contains a message key (to be looked up in an appropriate message resources database), and up to four placeholder arguments used for parametric substitution in the resulting message.

IMPLEMENTATION NOTE - It is assumed that these objects are created and manipulated only within the context of a single thread. Therefore, no synchronization is required for access to internal collections.


version:
   $Rev: 471754 $ $Date: 2005-08-26 21:58:39 -0400 (Fri, 26 Aug 2005)
version:
   $
since:
   Struts 1.1

Inner Class :protected class ActionMessageItem implements Serializable

Field Summary
final public static  StringGLOBAL_MESSAGE
    
protected  booleanaccessed
    
protected  intiCount
    

The current number of the property/key being added.

protected  HashMapmessages
    

Constructor Summary
public  ActionMessages()
    
public  ActionMessages(ActionMessages messages)
    

Create an ActionMessages object initialized with the given messages.


Parameters:
  messages - The messages to be initially added to this object.

Method Summary
public  voidadd(String property, ActionMessage message)
    

Add a message to the set of messages for the specified property.

public  voidadd(ActionMessages actionMessages)
    

Adds the messages from the given ActionMessages object to this set of messages.

public  voidclear()
    
public  Iteratorget()
    

Return the set of all recorded messages, without distinction by which property the messages are associated with.

public  Iteratorget(String property)
    

Return the set of messages related to a specific property.

public  booleanisAccessed()
    
public  booleanisEmpty()
    
public  Iteratorproperties()
    

Return the set of property names for which at least one message has been recorded.

public  intsize()
    

Return the number of messages recorded for all properties (including global messages).

public  intsize(String property)
    

Return the number of messages associated with the specified property.

public  StringtoString()
    

Field Detail
GLOBAL_MESSAGE
final public static String GLOBAL_MESSAGE(Code)

The "property name" marker to use for global messages, as opposed to those related to a specific property.




accessed
protected boolean accessed(Code)

Have the messages been retrieved from this object?

The controller uses this property to determine if session-scoped messages can be removed.


since:
   Struts 1.2



iCount
protected int iCount(Code)

The current number of the property/key being added. This is used to maintain the order messages are added.




messages
protected HashMap messages(Code)

The accumulated set of ActionMessage objects (represented as an ArrayList) for each property, keyed by property name.





Constructor Detail
ActionMessages
public ActionMessages()(Code)

Create an empty ActionMessages object.




ActionMessages
public ActionMessages(ActionMessages messages)(Code)

Create an ActionMessages object initialized with the given messages.


Parameters:
  messages - The messages to be initially added to this object. Thisparameter can be null.
since:
   Struts 1.1




Method Detail
add
public void add(String property, ActionMessage message)(Code)

Add a message to the set of messages for the specified property. An order of the property/key is maintained based on the initial addition of the property/key.


Parameters:
  property - Property name (or ActionMessages.GLOBAL_MESSAGE)
Parameters:
  message - The message to be added



add
public void add(ActionMessages actionMessages)(Code)

Adds the messages from the given ActionMessages object to this set of messages. The messages are added in the order they are returned from the properties method. If a message's property is already in the current ActionMessages object, it is added to the end of the list for that property. If a message's property is not in the current list it is added to the end of the properties.


Parameters:
  actionMessages - The ActionMessages object to beadded. This parameter can be null.
since:
   Struts 1.1



clear
public void clear()(Code)

Clear all messages recorded by this object.




get
public Iterator get()(Code)

Return the set of all recorded messages, without distinction by which property the messages are associated with. If there are no messages recorded, an empty enumeration is returned.

An iterator over the messages for all properties.



get
public Iterator get(String property)(Code)

Return the set of messages related to a specific property. If there are no such messages, an empty enumeration is returned.


Parameters:
  property - Property name (or ActionMessages.GLOBAL_MESSAGE) An iterator over the messages for the specified property.



isAccessed
public boolean isAccessed()(Code)

Returns true if the get() or get(String) methods are called.

true if the messages have been accessed one ormore times.
since:
   Struts 1.2



isEmpty
public boolean isEmpty()(Code)

Return true if there are no messages recorded in this collection, or false otherwise.

true if there are no messages recorded in thiscollection; false otherwise.
since:
   Struts 1.1



properties
public Iterator properties()(Code)

Return the set of property names for which at least one message has been recorded. If there are no messages, an empty Iterator is returned. If you have recorded global messages, the String value of ActionMessages.GLOBAL_MESSAGE will be one of the returned property names.

An iterator over the property names for which messages exist.



size
public int size()(Code)

Return the number of messages recorded for all properties (including global messages). NOTE - it is more efficient to call isEmpty if all you care about is whether or not there are any messages at all.

The number of messages associated with all properties.



size
public int size(String property)(Code)

Return the number of messages associated with the specified property.


Parameters:
  property - Property name (or ActionMessages.GLOBAL_MESSAGE) The number of messages associated with the property.



toString
public String toString()(Code)

Returns a String representation of this ActionMessages' property name=message list mapping.

String representation of the messages
See Also:   Object.toString



Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.