Hi Jim, Thanks for responding.
My concern is that there is no need to create a factory for each of the multiple values since each of those values are of the same type. Hence a single factory instance is good enough to create as list of those values instead of a list of factories creating each value. Working further, I am faced with having to have two types of factories - one for creating a single value instance and another for creating a list. The reason for this being that the injectors simply pull out the value factory from a Property value and invoke the getInstance(). So when setting the value factory to a PropertyValue instance we have to choose between one of these two based on whether the property supports 'many' values or not. - Venkat On 2/21/07, Jim Marino <[EMAIL PROTECTED]> wrote:
On Feb 19, 2007, at 11:33 PM, Venkata Krishnan wrote: > Hi , > > To support multivalued properties I intend to change the > 'defaultValue' > field of Property and 'value' field of PropertyValue from the type > 'Document' to the type 'List<Document>'. When a property is > qualified as > 'many=false' this list must be constrained to contain only one > value and > when many='true' the list can contain more than one value. > > Among other things that need a change to support multivalued > properties I > see that the PropertyObjectFactory is one. I see that the > 'getInstance' > must be changed to support a list of intances instead of just one. > > I did look at the ArrayMultiplicityObjectFactory and > ListMultiplicityObjectFactory for some hints, but wonder if that > approach is > applicable here too. Though a property may have multiple values, my > understanding is that each of these values will conform to the same > type and > hence might require just one factory instance to create them all. > So my > suggestion is that these factories return a list of instances. In the > single valued case this list just contains one value while in other > cases it > contains multiple instances. > > Thoughts / Suggestions ? > Like you mentioned above, why couldn't this be done similar to ArrayMultiplicityObjectFactory? I don't think the builder should have any special knowledge about multivalued properties. Jim --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]