Details
-
Type: Improvement
-
Status: Open
-
Priority: Major
-
Resolution: Unresolved
-
Affects Version/s: None
-
Fix Version/s: None
-
Component/s: None
-
Labels:None
-
Testcase included:yes
-
Number of attachments :
Description
While there are five constructors for the ComponentParameter from Pico:
ComponentParameter()
Expect any scalar paramter of the appropriate type or an Array.
ComponentParameter(boolean emptyCollection)
Expect any scalar paramter of the appropriate type or an Array.
ComponentParameter(Class componentValueType, boolean emptyCollection)
Expect any scalar paramter of the appropriate type or the collecting type Array,Collectionor Map.
ComponentParameter(Class componentKeyType, Class componentValueType, boolean emptyCollection)
Expect any scalar paramter of the appropriate type or the collecting type Array,Collectionor Map.
ComponentParameter(Object componentKey)
Expect a parameter matching a component of a specific key.
Only two of these are supported within the XMLContainerBuilder. This precludes important use cases such as empty List and Map support. See here:
http://www.picocontainer.org/Arrays,+Collections+and+Maps
I have modified the XMLContainerBuilder and the DTD to support three additional attributes: emptyCollection, componentValueType, and componentKeyType. I added copious documentation and error checking on these cases as well, as well as test cases.
Perhaps analogous support should be added for the other builders?
Activity
-
- Time Spent:
- 3 hours
- Finished the case for the XMLContainerBuilder. I think similar work needs to be done for the other builders.
Field | Original Value | New Value |
---|---|---|
Remaining Estimate | 3 hours [ 10800 ] | 6 hours [ 21600 ] |
Time Spent | 3 hours [ 10800 ] |
Attachment | Nano2-XMLContainerBuilder.patch [ 27493 ] |
Attachment | XMLContainerBuilder-MapSupport-test.patch [ 27494 ] |
Attachment | nanocontainer-xml-1_0.dtd [ 27502 ] |
This also required changing the TestModel to add two classes to show support for Lists and Maps.