Java Doc for OgnlUtil.java in  » J2EE » webwork-2.2.6 » com » opensymphony » xwork » 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 » J2EE » webwork 2.2.6 » com.opensymphony.xwork.util 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   com.opensymphony.xwork.util.OgnlUtil

OgnlUtil
public class OgnlUtil (Code)
Utility class that provides common access to the Ognl APIs for setting and getting properties from objects (usually Actions).
author:
   Jason Carreira
author:
   tmjee
version:
   $Date: 2007-07-15 05:56:02 +0200 (Sun, 15 Jul 2007) $ $Id: OgnlUtil.java 1542 2007-07-15 03:56:02Z tm_jee $




Method Summary
public static  Objectcompile(String expression)
    
public static  voidcopy(Object from, Object to, Map context, Collection exclusions, Collection inclusions)
     Copies the properties in the object "from" and sets them in the object "to" using specified type converter, or com.opensymphony.xwork.util.XWorkConverter if none is specified.
public static  voidcopy(Object from, Object to, Map context)
     Copies the properties in the object "from" and sets them in the object "to" using specified type converter, or com.opensymphony.xwork.util.XWorkConverter if none is specified.
public static  BeanInfogetBeanInfo(Object from)
     Get's the java bean info for the given source.
Parameters:
  from - the source object.
public static  MapgetBeanMap(Object source)
     Creates a Map with read properties for the given source object.

If the source object does not have a read property (i.e.

public static  PropertyDescriptor[]getPropertyDescriptors(Object source)
     Get's the java beans property descriptors for the given source.
Parameters:
  source - the source object.
public static  ObjectgetRealTarget(String property, Map context, Object root)
     Looks for the real target with the specified property given a root Object which may be a CompoundRoot.
public static  ObjectgetValue(String name, Map context, Object root)
    
public static  ObjectgetValue(String name, Map context, Object root, Class resultType)
    
static  voidinternalSetProperty(String name, Object value, Object o, Map context, boolean throwPropertyExceptions)
    
public static  voidsetProperties(Map props, Object o, Map context)
     Sets the object's properties using the default type converter, defaulting to not throw exceptions for problems setting the properties.
public static  voidsetProperties(Map props, Object o, Map context, boolean throwPropertyExceptions)
     Sets the object's properties using the default type converter.
public static  voidsetProperties(Map properties, Object o)
     Sets the properties on the object using the default context, defaulting to not throwing exceptions for problems setting the properties.
public static  voidsetProperties(Map properties, Object o, boolean throwPropertyExceptions)
     Sets the properties on the object using the default context.
public static  voidsetProperty(String name, Object value, Object o, Map context)
     Sets the named property to the supplied value on the Object, defaults to not throwing property exceptions.
public static  voidsetProperty(String name, Object value, Object o, Map context, boolean throwPropertyExceptions)
     Sets the named property to the supplied value on the Object.
public static  voidsetValue(String name, Map context, Object root, Object value)
     Wrapper around Ognl.setValue() to handle type conversion for collection elements.



Method Detail
compile
public static Object compile(String expression) throws OgnlException(Code)



copy
public static void copy(Object from, Object to, Map context, Collection exclusions, Collection inclusions)(Code)
Copies the properties in the object "from" and sets them in the object "to" using specified type converter, or com.opensymphony.xwork.util.XWorkConverter if none is specified.
Parameters:
  from - the source object
Parameters:
  to - the target object
Parameters:
  context - the action context we're running under
Parameters:
  exclusions - collection of method names to excluded from copying ( can be null)
Parameters:
  inclusions - collection of method names to included copying (can be null)note if exclusions AND inclusions are supplied and not null nothing will get copied.



copy
public static void copy(Object from, Object to, Map context)(Code)
Copies the properties in the object "from" and sets them in the object "to" using specified type converter, or com.opensymphony.xwork.util.XWorkConverter if none is specified.
Parameters:
  from - the source object
Parameters:
  to - the target object
Parameters:
  context - the action context we're running under



getBeanInfo
public static BeanInfo getBeanInfo(Object from) throws IntrospectionException(Code)
Get's the java bean info for the given source.
Parameters:
  from - the source object. java bean info.
throws:
  IntrospectionException - is thrown if an exception occurs during introspection.



getBeanMap
public static Map getBeanMap(Object source) throws IntrospectionException, OgnlException(Code)
Creates a Map with read properties for the given source object.

If the source object does not have a read property (i.e. write-only) then the property is added to the map with the value here is no read method for property-name.
Parameters:
  source - the source object. a Map with (key = read property name, value = value of read property).
throws:
  IntrospectionException - is thrown if an exception occurs during introspection.
throws:
  OgnlException - is thrown by OGNL if the property value could not be retrieved




getPropertyDescriptors
public static PropertyDescriptor[] getPropertyDescriptors(Object source) throws IntrospectionException(Code)
Get's the java beans property descriptors for the given source.
Parameters:
  source - the source object. property descriptors.
throws:
  IntrospectionException - is thrown if an exception occurs during introspection.



getRealTarget
public static Object getRealTarget(String property, Map context, Object root) throws OgnlException(Code)
Looks for the real target with the specified property given a root Object which may be a CompoundRoot. the real target or null if no object can be found with the specified property



getValue
public static Object getValue(String name, Map context, Object root) throws OgnlException(Code)



getValue
public static Object getValue(String name, Map context, Object root, Class resultType) throws OgnlException(Code)



internalSetProperty
static void internalSetProperty(String name, Object value, Object o, Map context, boolean throwPropertyExceptions)(Code)



setProperties
public static void setProperties(Map props, Object o, Map context)(Code)
Sets the object's properties using the default type converter, defaulting to not throw exceptions for problems setting the properties.
Parameters:
  props - the properties being set
Parameters:
  o - the object
Parameters:
  context - the action context



setProperties
public static void setProperties(Map props, Object o, Map context, boolean throwPropertyExceptions)(Code)
Sets the object's properties using the default type converter.
Parameters:
  props - the properties being set
Parameters:
  o - the object
Parameters:
  context - the action context
Parameters:
  throwPropertyExceptions - boolean which tells whether it should throw exceptions forproblems setting the properties



setProperties
public static void setProperties(Map properties, Object o)(Code)
Sets the properties on the object using the default context, defaulting to not throwing exceptions for problems setting the properties.
Parameters:
  properties -
Parameters:
  o -



setProperties
public static void setProperties(Map properties, Object o, boolean throwPropertyExceptions)(Code)
Sets the properties on the object using the default context.
Parameters:
  properties - the property map to set on the object
Parameters:
  o - the object to set the properties into
Parameters:
  throwPropertyExceptions - boolean which tells whether it should throw exceptions forproblems setting the properties



setProperty
public static void setProperty(String name, Object value, Object o, Map context)(Code)
Sets the named property to the supplied value on the Object, defaults to not throwing property exceptions.
Parameters:
  name - the name of the property to be set
Parameters:
  value - the value to set into the named property
Parameters:
  o - the object upon which to set the property
Parameters:
  context - the context which may include the TypeConverter



setProperty
public static void setProperty(String name, Object value, Object o, Map context, boolean throwPropertyExceptions)(Code)
Sets the named property to the supplied value on the Object.
Parameters:
  name - the name of the property to be set
Parameters:
  value - the value to set into the named property
Parameters:
  o - the object upon which to set the property
Parameters:
  context - the context which may include the TypeConverter
Parameters:
  throwPropertyExceptions - boolean which tells whether it should throw exceptions forproblems setting the property



setValue
public static void setValue(String name, Map context, Object root, Object value) throws OgnlException(Code)
Wrapper around Ognl.setValue() to handle type conversion for collection elements. Ideally, this should be handled by OGNL directly.



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.