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 ?

Thanks.

- Venkat



On 2/14/07, Venkata Krishnan <[EMAIL PROTECTED]> wrote:

Hi,

I have just looked at 'many valued properties' in the recent Assembly
Model specs and have some questions.  Could somebody please help me with
clarifications.

There are two samples on multivalued properties.  One where the property
is of simple type ..

   <component name="MyValueServiceComponent">
        <implementation.java class="services.myvalue.MyValueServiceImpl"/>
        <property name="currency">EURO</property>
        <property name="currency">Yen</property>
        <property name="currency">USDollar</property>
        <reference name="customerService"
            target="InternalCustomer/customerService"/>
        <reference name="StockQuoteService"/>
    </component>


and another where the property is of complex type...

<property name="complexFoo">
  <MyComplexPropertyValue1 xsi:type="foo:MyComplexType" attr="bar">
     <foo:a>AValue</foo:a>
     <foo:b>InterestingURI</foo:b>
  </MyComplexPropertyValue1>
  <MyComplexPropertyValue2 xsi:type="foo:MyComplexType" attr="zing">
     <foo:a>BValue</foo:a>
     <foo:b>BoringURI</foo:b>
  </MyComplexPropertyValue2>
</property>

Now, don't these two representations look different.  In the Simple-type
property every value is enclosed in a <property> tag and in the complex type
case all values are enclosed withing a single <property> tag.  I'd prefer
that even for the complex type property every value is enclosed in its own
<property> tag... i.e.

<property name="complexFoo">
  <MyComplexPropertyValue1 xsi:type="foo:MyComplexType" attr="bar">
     <foo:a>AValue</foo:a>
     <foo:b>InterestingURI</foo:b>
  </MyComplexPropertyValue1>
</property>
<property name="complexFoo">
  <MyComplexPropertyValue2 xsi:type="foo:MyComplexType" attr="zing">
     <foo:a>BValue</foo:a>
     <foo:b>BoringURI</foo:b>
  </MyComplexPropertyValue2>
</property>

I wish this, so that when we are loading them we may have a uniform way of
interpretting them immaterial of whether the property is of simple type or
complex type.

Am I missing a better rationale out here ?

Thanks

- Venkat


Reply via email to