com.opensymphony.xwork.util |
|
Java Source File Name | Type | Comment |
CompoundRoot.java | Class | A Stack that is implemented using a List. |
CompoundRootAccessor.java | Class | A stack that is able to call methods on objects in the stack. |
DefaultObjectTypeDeterminer.java | Class |
This
ObjectTypeDeterminer looks at the Class-conversion.properties for entries that indicated what
objects are contained within Maps and Collections. |
DomHelper.java | Class | Helper class to create and retrieve information from location-enabled
DOM-trees. |
InstantiatingNullHandler.java | Class |
Provided that the key
InstantiatingNullHandler.CREATE_NULL_OBJECTS is in the action context with a value of true (this key is set
only during the execution of the
com.opensymphony.xwork.interceptor.ParametersInterceptor ), OGNL expressions
that have caused a NullPointerException will be temporarily stopped for evaluation while the system automatically
tries to solve the null references by automatically creating the object.
The following rules are used when handling null references:
- If the property is declared exactly as a
Collection or
List , then an ArrayList shall be
returned and assigned to the null references.
- If the property is declared as a
Map , then a HashMap will be returned and assigned to the null
references.
- If the null property is a simple bean with a no-arg constructor, it will simply be created using the
ObjectFactory.buildBean(java.lang.Classjava.util.Map) method.
For example, if a form element has a text field named person.name and the expression person evaluates
to null, then this class will be invoked. |
LocalizedTextUtil.java | Class | Provides support for localization in XWork.
Resource bundles are searched in the following order:
- ActionClass.properties
- BaseClass.properties (all the way to Object.properties)
- Interface.properties (every interface and sub-interface)
- ModelDriven's model (if implements ModelDriven), for the model object repeat from 1
- package.properties (of the directory where class is located and every parent directory all the way to the root directory)
- search up the i18n message key hierarchy itself
- global resource properties (webwork.custom.i18n.resources) defined in webwork.properties
To clarify #5, while traversing the package hierarchy, WW will look for a file package.properties:
com/
acme/
package.properties
actions/
package.properties
FooAction.java
FooAction.properties
If FooAction.properties does not exist, com/acme/action/package.properties will be searched for, if
not found com/acme/package.properties, if not found com/package.properties, etc.
A global resource bundle could be specified through the 'webwork.custom.i18n.resources' property in
webwork.properties. |
ObjectProxy.java | Class | An Object to use within OGNL to proxy other Objects
usually Collections that you set in a different place
on the ValueStack but want to retain the context information
about where they previously were. |
ObjectProxyPropertyAccessor.java | Class | Is able to access (set/get) properties on a given object. |
ObjectTypeDeterminer.java | Interface | Determines what the key and and element class of a Map or Collection should be. |
ObjectTypeDeterminerFactory.java | Class | Factory for getting an instance of
ObjectTypeDeterminer . |
OgnlContextState.java | Class | Manages variables in the OgnlContext and returns values
to be used by the application. |
OgnlUtil.java | Class | Utility class that provides common access to the Ognl APIs for
setting and getting properties from objects (usually Actions). |
OgnlValueStack.java | Class | OgnlValueStack allows multiple beans to be pushed in and dynamic Ognl expressions to be evaluated against it. |
TextParseUtil.java | Class | Utility class for text parsing. |
TypeConversionException.java | Class | |
XWorkBasicConverter.java | Class |
XWork will automatically handle the most common type conversion for you.
This includes support for converting to and from Strings for each of the following:
- String
- boolean / Boolean
- char / Character
- int / Integer, float / Float, long / Long, double / Double
- dates - uses the SHORT or RFC3339 format (
yyyy-MM-dd'T'HH:mm:ss ) for the Locale associated with the current request
- arrays - assuming the individual strings can be coverted to the individual items
- collections - if not object type can be determined, it is assumed to be a String and a new ArrayList is
created
Note: that with arrays the type conversion will defer to the type of the array elements and try to convert each
item individually. |
XWorkCollectionPropertyAccessor.java | Class | |
XWorkContinuationConfig.java | Class | RIFE Continuation configuration. |
XWorkConverter.java | Class | XWorkConverter is a singleton used by many of the WebWork's Ognl extention points,
such as InstantiatingNullHandler, XWorkListPropertyAccessor etc to do object
conversion.
Type conversion is great for situations where you need to turn a String in to a more complex object. |
XWorkEnumerationAcccessor.java | Class | |
XWorkIteratorPropertyAccessor.java | Class | |
XWorkList.java | Class | A simple list that guarantees that inserting and retrieving objects will always work regardless
of the current size of the list. |
XWorkListPropertyAccessor.java | Class | Overrides the list property accessor so in the case of trying
to add properties of a given bean and the JavaBean is not present,
this class will create the necessary blank JavaBeans. |
XWorkMap.java | Class | A simple map that guarantees that retrieving objects will never return null and insertions will
perform type conversion if necessary. |
XWorkMapPropertyAccessor.java | Class | Implementation of PropertyAccessor that sets and gets properties by storing and looking
up values in Maps. |
XWorkMethodAccessor.java | Class | Allows methods to be executed under normal cirumstances, except when
XWorkMethodAccessor.DENY_METHOD_EXECUTION is in the action context with a value of true. |
XWorkObjectPropertyAccessor.java | Class | |