Java Doc for TapestryInternalUtils.java in  » Library » Tapestry » org » apache » tapestry » internal » 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 » Library » Tapestry » org.apache.tapestry.internal 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.apache.tapestry.internal.TapestryInternalUtils

TapestryInternalUtils
public class TapestryInternalUtils (Code)
Shared utility methods used by various implementation classes.




Method Summary
final public static  voidclose(Closeable stream)
    
public static  StringdefaultLabel(String id, Messages messages, String propertyExpression)
     Looks for a label within the messages based on the id.
public static  intdefaultOrder(PropertyConduit conduit)
    
public static  StringextractIdFromPropertyExpression(String expression)
     Used to convert a property expression into a key that can be used to locate various resources (Blocks, messages, etc.).
public static  StringgetLabelForEnum(Messages messages, String prefix, Enum value)
    
public static  StringgetLabelForEnum(Messages messages, Enum value)
    
public static  booleanisEqual(T left, T right)
     Determines if the two values are equal.
public static  StringlastTerm(String input)
     Strips a dotted sequence (such as a property expression, or a qualified class name) down to the last term of that expression, by locating the last period ('.') in the string.
public static  Map<String, String>mapFromKeysAndValues(String... keysAndValues)
    
public static  List<String>orderProperties(ClassPropertyAdapter classAdapter, ClassFactory classFactory, List<String> propertyNames)
     Sorts the property names into presentation order.
public static  KeyValueparseKeyValue(String input)
     Parses a key/value pair where the key and the value are seperated by an equals sign.
public static  OptionModeltoOptionModel(String input)
     Converts a string to an OptionModel .
public static  OptionModeltoOptionModel(Map.Entry input)
     Converts a map entry to an OptionModel .
public static  OptionModeltoOptionModel(Object input)
     Converts an object to an OptionModel .
public static  List<OptionModel>toOptionModels(String input)
     Parses a string input into a series of value=label pairs compatible with TapestryInternalUtils.toOptionModel(String) .
public static  List<OptionModel>toOptionModels(Map<K, V> input)
     Processes a map input into a series of map entries compatible with TapestryInternalUtils.toOptionModel(Map.Entry) .
public static  List<OptionModel>toOptionModels(List<E> input)
     Processes a list input into a series of objects compatible with TapestryInternalUtils.toOptionModel(Object) .
public static  SelectModeltoSelectModel(String input)
     Wraps the result of TapestryInternalUtils.toOptionModels(String) as a SelectModel (with no option groups).
public static  SelectModeltoSelectModel(Map<K, V> input)
     Wraps the result of TapestryInternalUtils.toOptionModels(Map) as a SelectModel (with no option groups).
public static  SelectModeltoSelectModel(List<E> input)
     Wraps the result of TapestryInternalUtils.toOptionModels(List) as a SelectModel (with no option groups).
public static  StringtoUserPresentable(String id)
     Capitalizes the string, and inserts a space before each upper case character (or sequence of upper case characters).
public static  StringurlDecode(String input)
    
public static  StringurlEncode(String input)
    



Method Detail
close
final public static void close(Closeable stream)(Code)



defaultLabel
public static String defaultLabel(String id, Messages messages, String propertyExpression)(Code)
Looks for a label within the messages based on the id. If found, it is used, otherwise the name is converted to a user presentable form.



defaultOrder
public static int defaultOrder(PropertyConduit conduit)(Code)



extractIdFromPropertyExpression
public static String extractIdFromPropertyExpression(String expression)(Code)
Used to convert a property expression into a key that can be used to locate various resources (Blocks, messages, etc.). Strips out any punctuation characters, leaving just words characters (letters, number and the underscore).
Parameters:
  expression -



getLabelForEnum
public static String getLabelForEnum(Messages messages, String prefix, Enum value)(Code)

Parameters:
  messages - the messages to search for the label
Parameters:
  prefix -
Parameters:
  value - to get a label for the label



getLabelForEnum
public static String getLabelForEnum(Messages messages, Enum value)(Code)



isEqual
public static boolean isEqual(T left, T right)(Code)
Determines if the two values are equal. They are equal if they are the exact same value (including if they are both null). Otherwise standard equals() comparison is used. <
Parameters:
  T - >
Parameters:
  left -
Parameters:
  right -



lastTerm
public static String lastTerm(String input)(Code)
Strips a dotted sequence (such as a property expression, or a qualified class name) down to the last term of that expression, by locating the last period ('.') in the string.



mapFromKeysAndValues
public static Map<String, String> mapFromKeysAndValues(String... keysAndValues)(Code)



orderProperties
public static List<String> orderProperties(ClassPropertyAdapter classAdapter, ClassFactory classFactory, List<String> propertyNames)(Code)
Sorts the property names into presentation order. Filters out any properties that have an explicit Order , leaving the remainder. Estimates each propertie's position based on the relative position of the property's getter. The code assumes that all methods are readable (have a getter method).
Parameters:
  classAdapter - defines the bean that contains the properties
Parameters:
  classFactory - used to access method line number information
Parameters:
  propertyNames - the initial set of property names propertyNames filtered and sorted



parseKeyValue
public static KeyValue parseKeyValue(String input)(Code)
Parses a key/value pair where the key and the value are seperated by an equals sign. The key and value are trimmed of leading and trailing whitespace, and returned as a KeyValue .
Parameters:
  input -



toOptionModel
public static OptionModel toOptionModel(String input)(Code)
Converts a string to an OptionModel . The string is of the form "value=label". If the equals sign is omitted, then the same value is used for both value and label.
Parameters:
  input -



toOptionModel
public static OptionModel toOptionModel(Map.Entry input)(Code)
Converts a map entry to an OptionModel .
Parameters:
  input -



toOptionModel
public static OptionModel toOptionModel(Object input)(Code)
Converts an object to an OptionModel .
Parameters:
  input -



toOptionModels
public static List<OptionModel> toOptionModels(String input)(Code)
Parses a string input into a series of value=label pairs compatible with TapestryInternalUtils.toOptionModel(String) . Splits on commas. Ignores whitespace around commas.
Parameters:
  input - comma seperated list of terms list of option models



toOptionModels
public static List<OptionModel> toOptionModels(Map<K, V> input)(Code)
Processes a map input into a series of map entries compatible with TapestryInternalUtils.toOptionModel(Map.Entry) .
Parameters:
  input - map of elements list of option models



toOptionModels
public static List<OptionModel> toOptionModels(List<E> input)(Code)
Processes a list input into a series of objects compatible with TapestryInternalUtils.toOptionModel(Object) .
Parameters:
  input - list of elements list of option models



toSelectModel
public static SelectModel toSelectModel(String input)(Code)
Wraps the result of TapestryInternalUtils.toOptionModels(String) as a SelectModel (with no option groups).
Parameters:
  input -



toSelectModel
public static SelectModel toSelectModel(Map<K, V> input)(Code)
Wraps the result of TapestryInternalUtils.toOptionModels(Map) as a SelectModel (with no option groups).
Parameters:
  input -



toSelectModel
public static SelectModel toSelectModel(List<E> input)(Code)
Wraps the result of TapestryInternalUtils.toOptionModels(List) as a SelectModel (with no option groups).
Parameters:
  input -



toUserPresentable
public static String toUserPresentable(String id)(Code)
Capitalizes the string, and inserts a space before each upper case character (or sequence of upper case characters). Thus "userId" becomes "User Id", etc. Also, converts underscore into space (and capitalizes the following word), thus "user_id" also becomes "User Id".



urlDecode
public static String urlDecode(String input)(Code)



urlEncode
public static String urlEncode(String input)(Code)



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.