Java Doc for MaskMessageResources.java in  » Development » ivatamasks » com » ivata » mask » web » struts » util » 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 » ivatamasks » com.ivata.mask.web.struts.util 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   com.ivata.mask.web.struts.util.MaskMessageResources

MaskMessageResources
public class MaskMessageResources (Code)
Methods in this class wrap/extend the message resource system of Struts.
since:
   ivata masks 0.5 (2005-01-20)
author:
   Colin MacLeod
author:
   colin.macleod@ivata.com
version:
   $Revision: 1.4 $


Field Summary
final public static  StringFIELD_PREFIX
     This is prepended to fields to get their message resource string.
final public static  StringNULL_BUNDLE
     Name of the null bundle in the map.
final public static  StringSUBMIT_PREFIX
     This is prepended to submit buttons to get their message resource string.
final public static  StringTITLE_SUFFIX
     This string is appended to field names to find their titles in the message resource bundle.
final public static  StringVALUE_SUFFIX
     This string is appended to field names to find their values in the message resource bundle.

Constructor Summary
public  MaskMessageResources(Locale localeParam, String bundleParam, String resourceFieldPathParam)
     Create message resources for a mask.

Method Summary
public  StringgetDefaultLabel(String fieldName, String labelKey, List labelArgs, String labelKeySuffix, boolean button, boolean mandatory)
     Get the default label for this field.
public  StringgetDefaultTitle(String fieldName, String titleKey, List titleArgs, boolean button, boolean mandatory)
     Get the default title for this field.
public  StringgetDefaultValue(String fieldName, String valueKey, List valueArgs, boolean button, boolean mandatory)
     Get the default value for this field.
public  StringgetMessage(String key)
     Refer to MaskMessageResources.getMessage(String,List) ..
public  StringgetMessage(String key, List argsList)
     This first tries using the bundle you provided.
public  StringgetMessage(String key, Object[] args)
     This first tries using the bundle you provided.
public static  MessageResourcesgetMessages(String bundleParam)
     Get a bundle with the given name.
Parameters:
  bundleParam - message resources identifier -see Struts docu.
public static synchronized  voidregisterMessages(String bundleParam, String fullPath)
     Register resources for a given bundle.

Field Detail
FIELD_PREFIX
final public static String FIELD_PREFIX(Code)
This is prepended to fields to get their message resource string.



NULL_BUNDLE
final public static String NULL_BUNDLE(Code)
Name of the null bundle in the map.



SUBMIT_PREFIX
final public static String SUBMIT_PREFIX(Code)
This is prepended to submit buttons to get their message resource string.



TITLE_SUFFIX
final public static String TITLE_SUFFIX(Code)
This string is appended to field names to find their titles in the message resource bundle.



VALUE_SUFFIX
final public static String VALUE_SUFFIX(Code)
This string is appended to field names to find their values in the message resource bundle.




Constructor Detail
MaskMessageResources
public MaskMessageResources(Locale localeParam, String bundleParam, String resourceFieldPathParam)(Code)
Create message resources for a mask.
Parameters:
  localeParam - The current user's locale - used to localize messages.
Parameters:
  bundleParam - Identifies the message resources to use.
Parameters:
  resourceFieldPathParam - Identifies the prefix of the resourcesto search for first.




Method Detail
getDefaultLabel
public String getDefaultLabel(String fieldName, String labelKey, List labelArgs, String labelKeySuffix, boolean button, boolean mandatory) throws SystemException(Code)
Get the default label for this field. If no label key is specifically set, the combination of labelFieldPath + ".label" is tried in the application resources. Failing that, the same is attempted using the default path (defaultPath + ".label").
Parameters:
  fieldName - name of the field for which to return the title.
Parameters:
  labelKey - key used to access the title in the resources. If thisis null, a default key is tried.
Parameters:
  labelArgs - arguments used in conjunction with the key, in themessage resources.
Parameters:
  labelKeySuffix - Some fields have multiple label keys. Thissuffix is appended to the key when retrieving the localized text from theapplication resources file.
Parameters:
  button - buttons have a different default path to field.true if this field represents a button.
Parameters:
  mandatory - if true an exception is thrown if novalue is found for this combination. title, if this tag has one, otherwise null.
throws:
  SystemException - if the text cannot be retrieved because of asystem failure, or if the field is mandatory and cannot be found.



getDefaultTitle
public String getDefaultTitle(String fieldName, String titleKey, List titleArgs, boolean button, boolean mandatory) throws SystemException(Code)
Get the default title for this field. If no title key is specifically set, the combination of labelFieldPath + ".title" is tried in the application resources. Failing that, the same is attempted using the default path (defaultPath + ".title").
Parameters:
  fieldName - name of the field for which to return the title.
Parameters:
  titleKey - key used to access the title in the resources. If thisis null, a default key is tried.
Parameters:
  titleArgs - arguments used in conjunction with the key, in themessage resources.
Parameters:
  button - buttons have a different default path to field.true if this field represents a button.
Parameters:
  mandatory - if true an exception is thrown if novalue is found for this combination. title, if this tag has one, otherwise null.
throws:
  SystemException - if the text cannot be retrieved because of asystem failure, or if the field is mandatory and cannot be found.



getDefaultValue
public String getDefaultValue(String fieldName, String valueKey, List valueArgs, boolean button, boolean mandatory) throws SystemException(Code)
Get the default value for this field. If no value key is specifically set, the combination of labelFieldPath + ".value" is tried in the application resources. Failing that, the same is attempted using the default path (defaultPath + ".value").
Parameters:
  fieldName - name of the field for which to return the title.
Parameters:
  valueKey - key used to access the title in the resources. If thisis null, a default key is tried.
Parameters:
  valueArgs - arguments used in conjunction with the key, in themessage resources.
Parameters:
  button - buttons have a different default path to field.true if this field represents a button.
Parameters:
  mandatory - if true an exception is thrown if novalue is found for this combination. title, if this tag has one, otherwise null.
throws:
  SystemException - if the text cannot be retrieved because of asystem failure, or if the field is mandatory and cannot be found.



getMessage
public String getMessage(String key) throws SystemException(Code)
Refer to MaskMessageResources.getMessage(String,List) ..
Parameters:
  key - Refer to MaskMessageResources.getMessage(String,List)..Refer to MaskMessageResources.getMessage(String,List)..
throws:
  SystemException - Refer to MaskMessageResources.getMessage(String,List)..



getMessage
public String getMessage(String key, List argsList) throws SystemException(Code)
This first tries using the bundle you provided. If that returns null, it tries again without a bundle.
Parameters:
  key - Refer to MessageResources.getMessage.
Parameters:
  argsList - Will be converted to an array of objects. Refer toMessageResources.getMessage. Refer to MessageResources.getMessage.
throws:
  SystemException - Refer to MessageResources.getMessage.



getMessage
public String getMessage(String key, Object[] args) throws SystemException(Code)
This first tries using the bundle you provided. If that returns null, it tries again without a bundle.
Parameters:
  key - Refer to MessageResources.getMessage.
Parameters:
  args - Refer to MessageResources.getMessage. Refer to MessageResources.getMessage.
throws:
  SystemException - Refer to MessageResources.getMessage.



getMessages
public static MessageResources getMessages(String bundleParam) throws SystemException(Code)
Get a bundle with the given name.
Parameters:
  bundleParam - message resources identifier -see Struts docu. resources message resources instance.
throws:
  SystemException - if the message resources are undefined.



registerMessages
public static synchronized void registerMessages(String bundleParam, String fullPath)(Code)
Register resources for a given bundle.
Parameters:
  bundleParam - message resources identifier - see Strutsdocu.
Parameters:
  fullPath - full path to the resources



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.